From d75a17648a156cb509581374914db8918098f828 Mon Sep 17 00:00:00 2001 From: inikulin Date: Wed, 23 Jul 2025 10:43:21 +0000 Subject: [PATCH] Edit deployment.yaml --- .../templates/deployment.yaml | 36 ++++++------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/charts/backend/charts/auth-event-handler-app-k8s/templates/deployment.yaml b/charts/backend/charts/auth-event-handler-app-k8s/templates/deployment.yaml index 42f2828..7622cc7 100755 --- a/charts/backend/charts/auth-event-handler-app-k8s/templates/deployment.yaml +++ b/charts/backend/charts/auth-event-handler-app-k8s/templates/deployment.yaml @@ -59,11 +59,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: {{ .Chart.Name }} securityContext: @@ -75,26 +80,7 @@ spec: containerPort: {{ .Values.service.port }} protocol: TCP env: - - name: ADMIN_CLIENT_ID - value: {{ .Values.env.adminClientId | quote }} - - name: ADMIN_REALM - value: {{ .Values.env.adminRealm | quote }} - - name: ADMIN_URL - value: {{ .Values.env.adminUrl | quote }} - - name: ADMIN_USERNAME - value: {{ .Values.env.adminUsername | quote }} - - name: CLIENT_ID - value: {{ .Values.env.clientId | quote }} - - name: CLIENT_ISSUER_IRI - value: {{ .Values.env.clientIssuerIri | quote }} - - name: CLIENT_REALM - value: {{ .Values.env.clientRealm | quote }} - - name: REALM - value: {{ .Values.env.realm | quote }} - - name: SECURITY_ADMIN_REALM - value: {{ .Values.env.securityAdminRealm | quote }} - - name: SECURITY_OAUTH2_CLIENT_ISSUER_URI - value: {{ .Values.env.securityOauth2ClientIssuerUri | quote }} + {{- include "global.env.general" . | nindent 12 }} {{- include "global.env.cassandra" . | nindent 12 }} {{- include "global.env.kafka" . | nindent 12 }} {{- include "global.env.redis" . | nindent 12 }}