[AAI] Service Mesh compatibility
[oom.git] / kubernetes / aai / components / aai-sparky-be / templates / deployment.yaml
index 51d577b..3768e62 100644 (file)
@@ -39,6 +39,7 @@ spec:
       name: {{ include "common.name" . }}
     spec:
       initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
+      {{- if ( include "common.needTLS" .) }}
       - command:
         - sh
         args:
@@ -47,6 +48,11 @@ spec:
           echo "*** retrieve Truststore and Keystore password"
           export $(cat {{ .Values.certInitializer.credsPath }}/mycreds.prop \
             | xargs -0)
+          if [ -z "$KEYSTORE_PASSWORD" ]
+          then
+            echo " /!\ certificates retrieval failed"
+            exit 1
+          fi
           echo "*** write them in portal part"
           cd /config-input
           for PFILE in `ls -1 .`
@@ -61,6 +67,7 @@ spec:
         image: {{ include "repositoryGenerator.image.envsubst" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-update-config
+      {{- end }}
       - command:
         - /app/ready.py
         args: