From ebf425a6431f7b7a56f09b4ae14f87ccf710fb6c Mon Sep 17 00:00:00 2001 From: Klazomenai <19855141+Klazomenai@users.noreply.github.com> Date: Wed, 7 Oct 2020 12:33:28 +0000 Subject: [PATCH] Enabling the WS-RPC server via variables --- stable/autonity/CHANGELOG.md | 3 ++- stable/autonity/Chart.yaml | 2 +- stable/autonity/README.md | 21 ++++++++++++------- .../templates/deployments_autonity_node.yaml | 14 +++++++++---- stable/autonity/values.yaml | 13 ++++++++++++ 5 files changed, 39 insertions(+), 14 deletions(-) diff --git a/stable/autonity/CHANGELOG.md b/stable/autonity/CHANGELOG.md index dcb1cf6..d7f9c92 100644 --- a/stable/autonity/CHANGELOG.md +++ b/stable/autonity/CHANGELOG.md @@ -4,7 +4,8 @@ All notable changes to this chart will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [1.3.1] +- Enabling the WS-RPC server via variables [issue #62](Enable the WS-RPC server via variables #62) - Enabling the HTTP-RPC server via variables [issue #60](https://github.com/clearmatics/charts-ose-helm3/issues/60) - Enabling GraphQL query capabilities on top of HTTP RPC [issue #57](https://github.com/clearmatics/charts-ose-helm3/issues/57) - Setting the pprof server and its flags as variables in the values file [issue #52](https://github.com/clearmatics/charts-ose-helm3/issues/52) diff --git a/stable/autonity/Chart.yaml b/stable/autonity/Chart.yaml index 13e32e1..373f604 100644 --- a/stable/autonity/Chart.yaml +++ b/stable/autonity/Chart.yaml @@ -1,6 +1,6 @@ name: autonity apiVersion: v1 -version: 1.3.1 +version: 1.3.2 kubeVersion: ">=1.15.11-0" description: Deploy a single Autonity instance keywords: diff --git a/stable/autonity/README.md b/stable/autonity/README.md index f8ff7e8..77ac3a9 100644 --- a/stable/autonity/README.md +++ b/stable/autonity/README.md @@ -80,19 +80,24 @@ You can send `autonity` metrics to InfluxDB cloud. (Disabled by default). ## Configuration The following table lists some of the configurable parameters of the Autonity chart and their default values. This table needs extending fully. -| Parameter | Description | Default | -|---------------------|-------------------------------------------------------------------------|-------------| -| `debug_enabled` | Prepends log messages with call-site location | `false` | -| `graphql_enabled` | graphql is for enabling GraphQL query capabilities on top of HTTP RPC | `false` | +| Parameter | Description | Default | +|---------------------|--------------------------------------------------------------------------------|----------------------------------------| +| `debug_enabled` | Prepends log messages with call-site location | `false` | +| `graphql_enabled` | graphql is for enabling GraphQL query capabilities on top of HTTP RPC | `false` | | `http_rpc.enabled | Enabling the HTTP-RPC server | `true` | | `http_rpc.address` | Setting the HTTP-RPC server listening interface | `127.0.0.1` | | `http_rpc.port` | Setting the HTTP-RPC server listening port | `8545` | | `http_rpc.api` | A list of APIs offered over the HTTP-RPC interface | `eth,web3,net,tendermint,txpool,debug` | | `http_rpc.vhosts` | A comma separated list of virtual hostnames from which to accept requests from | `\*` | -| `logging_verbosity` | Logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail | `3` | -| `pprof.enabled` | HTTP server for visualization and analysis of profiling data | `true` | -| `pprof.address` | The address the pprof server will listen on | `127.0.0.1` | -| `pprof.port` | The port the pprof server will start on | `6060` | +| `logging_verbosity` | Logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail | `3` | +| `pprof.enabled` | HTTP server for visualization and analysis of profiling data | `true` | +| `pprof.address` | The address the pprof server will listen on | `127.0.0.1` | +| `pprof.port` | The port the pprof server will start on | `6060` | +| `ws_rpc.enabled` | Enabling the WS-RPC server | `true` | +| `ws_rpc.address` | Setting the WS-RPC server listening interface | `127.0.0.1` | +| `ws_rpc.port` | Setting the WS-RPC server listening port | `8546` | +| `ws_rpc.api` | A list of APIs offered over the HTTP-RPC interface | `eth,web3,net,tendermint` | +| `ws_rpc.origins` | A comma separated list of origins from which to accept websockets requests | `\*` | ## Workshops * [Initial ceremony](./docs/workshop_initial_ceremony.md) Setup new network with validator nodes on different clouds (`EKS` and `GKE`) diff --git a/stable/autonity/templates/deployments_autonity_node.yaml b/stable/autonity/templates/deployments_autonity_node.yaml index 0cddaf4..99c9ad8 100644 --- a/stable/autonity/templates/deployments_autonity_node.yaml +++ b/stable/autonity/templates/deployments_autonity_node.yaml @@ -78,11 +78,17 @@ spec: - "--http.vhosts" - "{{ .Values.http_rpc.vhosts }}" {{ end }} +{{ if eq .Values.ws_rpc.enabled true }} - "--ws" - - "--wsapi" - - "eth,web3,net,tendermint" - - "--wsorigins" - - "*" + - "--ws.addr" + - "{{ .Values.ws_rpc.address }}" + - "--ws.port" + - "{{ .Values.ws_rpc.port }}" + - "--ws.api" + - "{{ .Values.ws_rpc.api }}" + - "--ws.origins" + - "{{ .Values.ws_rpc.origins }}" +{{ end }} - "--metrics" - "--networkid" - "{{ .Values.networkid }}" diff --git a/stable/autonity/values.yaml b/stable/autonity/values.yaml index 56e06bb..99a7456 100644 --- a/stable/autonity/values.yaml +++ b/stable/autonity/values.yaml @@ -51,6 +51,19 @@ http_rpc: # vhosts is a comma separated list of virtual hostnames from which to accept requests vhosts: "*" +# ws_rpc is for enabling and configuring the WS-RPC server +ws_rpc: + # enabled is setting the WS-RPC server as enabled + enabled: false + # address for the WS-RPC listening interface + address: 127.0.0.1 + # port for the WS-RPC listening port + port: 8546 + # apis offered over the HTTP-RPC interface + api: "eth,web3,net,tendermint" + # origins from which to accept websockets requests + origins: "*" + # pprof is for enabling the pprof HTTP server for visualization and analysis of profiling data pprof: # enabled is setting the pprof server as enabled