From c2d726d584dcfbe44a91693fd80c6e1cb5b7fd3f Mon Sep 17 00:00:00 2001 From: Krish Date: Wed, 9 Aug 2017 09:40:41 +0200 Subject: [PATCH] Support proper Websocket host and port settings in root API endpoint (#1715) * Support proper Websocket host and port settings in root API endpoint * Documentation change --- .../node-config-map-and-secrets.rst | 8 ++++++++ k8s/bigchaindb/bigchaindb-dep.yaml | 15 +++++++++++++++ k8s/configuration/config-map.yaml | 6 +++++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/docs/server/source/production-deployment-template/node-config-map-and-secrets.rst b/docs/server/source/production-deployment-template/node-config-map-and-secrets.rst index ddc9a22c..de7443ad 100644 --- a/docs/server/source/production-deployment-template/node-config-map-and-secrets.rst +++ b/docs/server/source/production-deployment-template/node-config-map-and-secrets.rst @@ -123,6 +123,14 @@ receive requests from NGINX instance. It is set to ``80`` by default. +vars.bigchaindb-wsserver-advertised-scheme +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``bigchaindb-wsserver-advertised-scheme`` is the protocol used to access +the WebSocket API in BigchainDB. This can be set to ``wss`` or ``ws``. +It is set to ``wss`` by default. + + vars.bigchaindb-api-port, vars.bigchaindb-ws-port and Similar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/k8s/bigchaindb/bigchaindb-dep.yaml b/k8s/bigchaindb/bigchaindb-dep.yaml index b2011d32..8f11b143 100644 --- a/k8s/bigchaindb/bigchaindb-dep.yaml +++ b/k8s/bigchaindb/bigchaindb-dep.yaml @@ -49,11 +49,26 @@ spec: configMapKeyRef: name: vars key: bigchaindb-ws-interface + - name: BIGCHAINDB_WSSERVER_ADVERTISED_HOST + valueFrom: + configMapKeyRef: + name: vars + key: cluster-fqdn - name: BIGCHAINDB_WSSERVER_PORT valueFrom: configMapKeyRef: name: vars key: bigchaindb-ws-port + - name: BIGCHAINDB_WSSERVER_ADVERTISED_PORT + valueFrom: + configMapKeyRef: + name: vars + key: cluster-frontend-port + - name: BIGCHAINDB_WSSERVER_ADVERTISED_SCHEME + valueFrom: + configMapKeyRef: + name: vars + key: bigchaindb-wsserver-advertised-scheme - name: BIGCHAINDB_KEYPAIR_PUBLIC valueFrom: configMapKeyRef: diff --git a/k8s/configuration/config-map.yaml b/k8s/configuration/config-map.yaml index 99f31088..198c5dfd 100644 --- a/k8s/configuration/config-map.yaml +++ b/k8s/configuration/config-map.yaml @@ -95,6 +95,10 @@ data: # the MongoDB backend. bigchaindb-database-name: "bigchain" + # bigchaindb-wsserver-advertised-scheme is the protocol used to access the + # WebSocket API in BigchainDB; can be 'ws' or 'wss' (default). + bigchaindb-wsserver-advertised-scheme: "wss" + --- apiVersion: v1 kind: ConfigMap @@ -128,4 +132,4 @@ data: bigchaindb-database-connection-timeout: "5000" # bigchaindb-log-level is the log level used to log to the console. - bigchaindb-log-level: "debug" \ No newline at end of file + bigchaindb-log-level: "debug"