diff --git a/charts/backend/charts/message-app-k8s/templates/deployment.yaml b/charts/backend/charts/message-app-k8s/templates/deployment.yaml index eb89723..852a428 100755 --- a/charts/backend/charts/message-app-k8s/templates/deployment.yaml +++ b/charts/backend/charts/message-app-k8s/templates/deployment.yaml @@ -39,11 +39,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: message-app image: "{{ .Values.global.dockerRegistryPrefix }}{{ .Chart.Name }}:{{ .Values.image.tag }}" @@ -64,9 +69,15 @@ spec: - name: DEEPLINK_PORT value: {{ .Values.env.deeplink.port | quote }} - name: LIVEKIT_API_KEY - value: {{ .Values.env.livekit.api_key | quote }} + valueFrom: + secretKeyRef: + name: {{ .Values.secrets.livekit.name }} + key: {{ .Values.secrets.livekit.apiKeyKey }} - name: LIVEKIT_SECRET - value: {{ .Values.env.livekit.secret | quote }} + valueFrom: + secretKeyRef: + name: {{ .Values.secrets.livekit.name }} + key: {{ .Values.secrets.livekit.secretKey }} - name: KEYSPACE value: {{ .Values.env.keyspace | quote }} - name: SEARCH_HOST