diff --git a/charts/backend/charts/gem-call-events-handler-app-k8s/templates/deployment.yaml b/charts/backend/charts/gem-call-events-handler-app-k8s/templates/deployment.yaml index d958b31..4cfd1ca 100755 --- a/charts/backend/charts/gem-call-events-handler-app-k8s/templates/deployment.yaml +++ b/charts/backend/charts/gem-call-events-handler-app-k8s/templates/deployment.yaml @@ -40,11 +40,16 @@ spec: - sh - -c - | - cp /usr/lib/jvm/java-21-amazon-corretto/lib/security/cacerts /tmp/cacerts/cacerts && - keytool -import -trustcacerts -storepass changeit -noprompt \ - -alias gemcert \ - -file /app/resources/RootCA_${CERT_ALIAS}.crt \ - -keystore /tmp/cacerts/cacerts + cp /usr/lib/jvm/java-21-amazon-corretto/lib/security/cacerts /tmp/cacerts/cacerts + if keytool -list -keystore /tmp/cacerts/cacerts -storepass changeit -alias gemcert > /dev/null 2>&1; then + echo "Certificate with alias gemcert already exists, skipping import" + else + echo "Importing certificate with alias gemcert" + keytool -import -trustcacerts -storepass changeit -noprompt \ + -alias gemcert \ + -file /app/resources/RootCA_${CERT_ALIAS}.crt \ + -keystore /tmp/cacerts/cacerts + fi containers: - name: gem-call-events-handler-app image: "{{ .Values.global.dockerRegistryPrefix }}{{ .Chart.Name }}:{{ .Values.image.tag }}" @@ -52,8 +57,7 @@ spec: {{- include "global.env.cassandra" . | nindent 12 }} {{- include "global.env.kafka" . | nindent 12 }} {{- include "global.env.redis" . | nindent 12 }} - - name: KEYCLOAK_URL - value: {{ .Values.keycloak.url | quote }} + {{- include "global.env.general" . | nindent 12 }} - name: CHAT_HOST value: {{ .Values.chat.host | quote }} - name: CHAT_PORT