Edit deployment.yaml
This commit is contained in:
parent
0edcd52da6
commit
c54f84d166
@ -15,11 +15,39 @@ spec:
|
|||||||
app: {{ include "search-event-handler-app.name" . }}
|
app: {{ include "search-event-handler-app.name" . }}
|
||||||
spec:
|
spec:
|
||||||
volumes:
|
volumes:
|
||||||
|
- name: ca-cert
|
||||||
|
configMap:
|
||||||
|
name: auth-app-ca-cert
|
||||||
|
items:
|
||||||
|
- key: RootCA_{{ .Values.global.cert_alias }}.crt
|
||||||
|
path: RootCA_{{ .Values.global.cert_alias }}.crt
|
||||||
- name: cacerts-volume
|
- name: cacerts-volume
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
initContainers:
|
||||||
|
- name: import-ca
|
||||||
|
image: "{{ .Values.global.dockerRegistryPrefix }}{{ .Chart.Name }}:{{ .Values.image.tag }}"
|
||||||
|
env:
|
||||||
|
- name: CERT_ALIAS
|
||||||
|
value: {{ .Values.global.cert_alias | quote }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: ca-cert
|
||||||
|
mountPath: /app/resources
|
||||||
|
- name: cacerts-volume
|
||||||
|
mountPath: /tmp/cacerts
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
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:
|
containers:
|
||||||
- name: search-event-handler-app
|
- name: search-event-handler-app
|
||||||
image: "{{ .Values.global.dockerRegistryPrefix }}{{ .Chart.Name }}:{{ .Values.image.tag }}"
|
image: "{{ .Values.global.dockerRegistryPrefix }}{{ .Chart.Name }}:{{ .Values.image.tag }}"
|
||||||
@ -36,5 +64,8 @@ spec:
|
|||||||
{{- include "global.env.general" . | nindent 12 }}
|
{{- include "global.env.general" . | nindent 12 }}
|
||||||
- name: POSTGRES_URL
|
- name: POSTGRES_URL
|
||||||
value: {{ .Values.env.postgres.url | quote }}
|
value: {{ .Values.env.postgres.url | quote }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: cacerts-volume
|
||||||
|
mountPath: /usr/lib/jvm/java-21-amazon-corretto/lib/security/cacerts
|
||||||
|
subPath: cacerts
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user