[SDNC] Provide proxy settings for sdnr mountpointRegistrar
[oom.git] / kubernetes / sdnc / templates / statefulset.yaml
index 488c050..91ad64c 100644 (file)
@@ -62,12 +62,24 @@ spec:
           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
         - name: SDNC_DB_PASSWORD
           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
+        - name: ODL_ADMIN_USERNAME
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 10 }}
+        - name: ODL_ADMIN_PASSWORD
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 10 }}
+        {{ if and .Values.config.sdnr.dmaapProxy.enabled  .Values.config.sdnr.dmaapProxy.usepwd }}
+        - name: DMAAP_HTTP_PROXY_USERNAME
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-proxy-creds" "key" "login") | indent 10 }}
+        - name: DMAAP_HTTP_PROXY_PASSWORD
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-proxy-creds" "key" "password") | indent 10 }}
+        {{- end }}
+
+
         volumeMounts:
         - mountPath: /config-input
           name: config-input
         - mountPath: /config
           name: properties
-        image: "{{ .Values.global.envsubstImage }}"
+        image: {{ include "repositoryGenerator.image.envsubst" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-update-config
       {{ if .Values.dgbuilder.enabled -}}
@@ -88,7 +100,7 @@ spec:
             fieldRef:
               apiVersion: v1
               fieldPath: metadata.namespace
-        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+        image: {{ include "repositoryGenerator.image.readiness" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-readiness
         {{ end -}}
@@ -96,7 +108,7 @@ spec:
 
       {{ if .Values.global.cmpv2Enabled }}
       - name: certs-init
-        image: "{{ .Values.global.repository }}/{{ .Values.global.platform.certServiceClient.image }}"
+        image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.platform.certServiceClient.image }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         env:
           - name: REQUEST_URL
@@ -137,7 +149,7 @@ spec:
       {{ end }}
 
       - name: {{ include "common.name" . }}-chown
-        image: {{ .Values.global.busyboxRepository | default .Values.busyboxRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
+        image: {{ include "repositoryGenerator.image.busybox" . }}
         command:
         - sh
         args:
@@ -152,15 +164,10 @@ spec:
             name: {{ include "common.fullname" . }}-data
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-          {{- if not .Values.config.sdnr.enabled }}
           command: ["/bin/bash"]
           args: ["-c", "/opt/onap/sdnc/bin/startODL.sh"]
-          {{ else }}
-          command: ["/bin/bash"]
-          args: ["-c", "{{ .Values.config.binDir }}/startODL.oom.sh"]
-          {{ end }}
           ports:
           - containerPort: {{ .Values.service.internalPort }}
           - containerPort: {{ .Values.service.internalPort2 }}
@@ -230,12 +237,6 @@ spec:
           - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
             name: sdnc-logging-cfg-config
             subPath: org.ops4j.pax.logging.cfg
-          - mountPath: {{ .Values.config.binDir }}/startODL.sh
-            name: bin
-            subPath: startODL.sh
-          - mountPath: {{ .Values.config.binDir }}/startODL.oom.sh
-            name: bin
-            subPath: startODL.oom.sh
           - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
             name: bin
             subPath: installSdncDb.sh
@@ -299,7 +300,7 @@ spec:
 
         # side car containers
         - name: filebeat-onap
-          image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+          image: {{ include "repositoryGenerator.image.logging" . }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           volumeMounts:
           - mountPath: /usr/share/filebeat/filebeat.yml