From 32e6f019f177c8fcfa758fe1dfecad587b38e18e Mon Sep 17 00:00:00 2001 From: demskeq8 Date: Tue, 9 May 2023 12:31:07 +0000 Subject: [SDNC] Add SDNR Websocket support new service and env for websocket in sdnr Issue-ID: OOM-3169 Change-Id: I4b890475a10cb0f8ebd5ec1955ed4c944914be98 Signed-off-by: demskeq8 (cherry picked from commit 852cb2531afc8ce2abb80409cc51948c7f67d0ff) --- kubernetes/sdnc/components/sdnc-web/templates/deployment.yaml | 2 ++ kubernetes/sdnc/components/sdnc-web/values.yaml | 2 +- kubernetes/sdnc/templates/service.yaml | 5 ++++- kubernetes/sdnc/templates/statefulset.yaml | 2 ++ kubernetes/sdnc/values.yaml | 8 +++++++- 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/kubernetes/sdnc/components/sdnc-web/templates/deployment.yaml b/kubernetes/sdnc/components/sdnc-web/templates/deployment.yaml index 803e3eaf6e..c99855d86c 100644 --- a/kubernetes/sdnc/components/sdnc-web/templates/deployment.yaml +++ b/kubernetes/sdnc/components/sdnc-web/templates/deployment.yaml @@ -83,6 +83,8 @@ spec: value: "{{ .Values.config.oauth.enabled | default "false" }}" - name: ENABLE_ODLUX_RBAC value: "{{ .Values.config.oauth.odluxRbac.enabled | default "false" }}" + - name: SDNRWEBSOCKETPORT + value: "{{ .Values.sdnrWebsocketPort | default "8182" }}" volumeMounts: - mountPath: /etc/localtime name: localtime diff --git a/kubernetes/sdnc/components/sdnc-web/values.yaml b/kubernetes/sdnc/components/sdnc-web/values.yaml index 3c4874f6e8..0487986801 100644 --- a/kubernetes/sdnc/components/sdnc-web/values.yaml +++ b/kubernetes/sdnc/components/sdnc-web/values.yaml @@ -31,7 +31,7 @@ config: webPort: 8080 sdnrProtocol: http sdnrHost: "sdnc" - sdnrPort: "8080" + sdnrPort: "8282" oauth: enabled: false odluxRbac: diff --git a/kubernetes/sdnc/templates/service.yaml b/kubernetes/sdnc/templates/service.yaml index c5ae5d5c10..052cfe16ad 100644 --- a/kubernetes/sdnc/templates/service.yaml +++ b/kubernetes/sdnc/templates/service.yaml @@ -47,6 +47,9 @@ spec: nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort4 }} {{ end }} {{ if .Values.config.sdnr.enabled }} + - name: "{{ .Values.service.portName }}-sdnrwebsocket" + port: {{ .Values.service.sdnrWebsocketPort | default "8182" }} + targetPort: {{ .Values.service.sdnrWebsocketPort }} sessionAffinity: ClientIP {{ end }} selector: @@ -188,4 +191,4 @@ spec: selector: app.kubernetes.io/name: {{ include "common.name" . }} app.kubernetes.io/instance: {{ include "common.release" . }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/kubernetes/sdnc/templates/statefulset.yaml b/kubernetes/sdnc/templates/statefulset.yaml index 8a844f4e9d..5e01832d79 100644 --- a/kubernetes/sdnc/templates/statefulset.yaml +++ b/kubernetes/sdnc/templates/statefulset.yaml @@ -322,6 +322,8 @@ spec: {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ves-collector-secret" "key" "login") | indent 12 }} - name: SDNR_VES_COLLECTOR_PASSWORD {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ves-collector-secret" "key" "password") | indent 12 }} + - name: SDNR_WEBSOCKET_PORT + value: "{{ .Values.sdnrWebsocketPort | default "8182"}}" volumeMounts: {{- if .Values.global.cmpv2Enabled }} diff --git a/kubernetes/sdnc/values.yaml b/kubernetes/sdnc/values.yaml index 0d8c89cc89..86a621cb6f 100644 --- a/kubernetes/sdnc/values.yaml +++ b/kubernetes/sdnc/values.yaml @@ -463,7 +463,7 @@ dgbuilder: ports: - name: http port: 3100 - nodePort: 03 + nodePort: "03" ingress: enabled: false @@ -496,6 +496,8 @@ elasticsearch: # enable sdnc-web: enabled: true + ## set if web socket port should not be default + # sdnrWebsocketPort: *sdnrWebsocketPort # default number of instances replicaCount: 1 @@ -545,6 +547,10 @@ service: callHomePort: &chport 4334 callHomeNodePort: 66 + ## set if web socket port should not be default + ## change in sdnc-web section as well + # sdnrWebsocketPort: &sdnrWebsocketPort 8182 + ## Persist data to a persitent volume persistence: -- cgit 1.2.3-korg