Add flag to values for disableHttp 32/103732/1
authorIlanaP <ilanap@amdocs.com>
Mon, 16 Mar 2020 12:13:45 +0000 (14:13 +0200)
committerIlanaP <ilanap@amdocs.com>
Mon, 16 Mar 2020 12:13:45 +0000 (14:13 +0200)
Add a flag that can be used inside the charts and in the AUTO.json file with the http enabled status

Issue-ID: OJSI-102

Signed-off-by: IlanaP <ilanap@amdocs.com>
Signed-off-by: IlanaP <ilanap@amdocs.com>
Change-Id: Ieee2a4b4dea49d7a55eed0811ea29145dd17556a

kubernetes/sdc/charts/sdc-fe/templates/service.yaml
kubernetes/sdc/resources/config/environments/AUTO.json
kubernetes/sdc/values.yaml

index 1b9884a..2133990 100644 (file)
@@ -37,17 +37,24 @@ metadata:
 spec:
   type: {{ .Values.service.type }}
   ports:
+    {{ if not .Values.global.security.disableHttp }}
+    # setting http port only if enabled
     {{if eq .Values.service.type "NodePort" -}}
     - port: {{ .Values.service.internalPort }}
       nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
       name: {{ .Values.service.portName }}
-    - port: {{ .Values.service.internalPort2 }}
-      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
-      name: {{ .Values.service.portName }}2
     {{- else -}}
     - port: {{ .Values.service.externalPort }}
       targetPort: {{ .Values.service.internalPort }}
       name: {{ .Values.service.portName }}
+    {{ end }}
+    {{ end }}
+
+    {{if eq .Values.service.type "NodePort" -}}
+    - port: {{ .Values.service.internalPort2 }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
+      name: {{ .Values.service.portName }}2
+    {{- else -}}
     - port: {{ .Values.service.externalPort2 }}
       targetPort: {{ .Values.service.internalPort2 }}
       name: {{ .Values.service.portName }}2
index 2d99ab0..57d774e 100755 (executable)
@@ -8,7 +8,7 @@
     "chef_type": "environment",
 
     "default_attributes": {
-        "disableHttp": true,
+        "disableHttp": {{ .Values.global.security.disableHttp }},
         "CS_VIP": "{{.Values.global.cassandra.serviceName}}.{{include "common.namespace" .}}",
         "BE_VIP": "sdc-be.{{include "common.namespace" .}}",
         "ONBOARDING_BE_VIP": "sdc-onboarding-be.{{include "common.namespace" .}}",
index 3d35814..dfbd8c8 100644 (file)
@@ -39,7 +39,8 @@ global:
    replicaCount: 3
    clusterName: cassandra
    dataCenter: Pod
-
+  security:
+    disableHttp: true
 config:
   logstashServiceName: log-ls
   logstashPort: 5044