Merge "[SDNC] Fix dependencies for SDNRONLY mode"
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Mon, 15 Nov 2021 16:19:43 +0000 (16:19 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 15 Nov 2021 16:19:43 +0000 (16:19 +0000)
kubernetes/sdnc/templates/statefulset.yaml

index 06b8649..fc584d8 100644 (file)
@@ -130,11 +130,11 @@ spec:
         image: {{ include "repositoryGenerator.image.envsubst" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-update-config
-      {{ if .Values.dgbuilder.enabled -}}
+      {{ if or .Values.dgbuilder.enabled .Values.config.sdnr.enabled -}}
       - command:
         - /app/ready.py
         args:
-        {{ if or .Values.dgbuilder.enabled .Values.config.sdnr.enabled -}}
+        {{ if .Values.dgbuilder.enabled -}}
         - --container-name
         - {{ include "common.mariadbService" . }}
         - --job-name
@@ -200,8 +200,10 @@ spec:
             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
             periodSeconds: {{ .Values.readiness.periodSeconds }}
           env:
+          {{ if and .Values.config.sdnr.enabled .Values.config.sdnr.sdnronly -}}
           - name: MYSQL_ROOT_PASSWORD
             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
+          {{ end -}}
           - name: ODL_ADMIN_USERNAME
             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
           - name: ODL_USER