83 lines
3.1 KiB
YAML
Executable File
83 lines
3.1 KiB
YAML
Executable File
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "realtime-app.fullname" . }}
|
|
labels:
|
|
app: {{ include "realtime-app.name" . }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
app: {{ include "realtime-app.name" . }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ include "realtime-app.name" . }}
|
|
spec:
|
|
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
|
|
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 &&
|
|
keytool -import -trustcacerts -storepass changeit -noprompt \
|
|
-alias gemcert \
|
|
-file /app/resources/RootCA_${CERT_ALIAS}.crt \
|
|
-keystore /tmp/cacerts/cacerts
|
|
containers:
|
|
- name: realtime-app
|
|
image: "{{ .Values.global.dockerRegistryPrefix }}{{ .Chart.Name }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
env:
|
|
{{- include "global.env.cassandra" . | nindent 12 }}
|
|
{{- include "global.env.kafka" . | nindent 12 }}
|
|
{{- include "global.env.redis" . | nindent 12 }}
|
|
- name: KEYCLOAK_URL
|
|
value: {{ .Values.env.keycloakUrl | quote }}
|
|
- name: CHAT_HOST
|
|
value: {{ .Values.env.services.chat.host | quote }}
|
|
- name: CHAT_PORT
|
|
value: {{ .Values.env.services.chat.port | quote }}
|
|
- name: GEM_CALL_HOST
|
|
value: {{ .Values.env.services.gemCall.host | quote }}
|
|
- name: GEM_CALL_PORT
|
|
value: {{ .Values.env.services.gemCall.port | quote }}
|
|
- name: MESSAGE_HOST
|
|
value: {{ .Values.env.services.message.host | quote }}
|
|
- name: MESSAGE_PORT
|
|
value: {{ .Values.env.services.message.port | quote }}
|
|
- name: USER_HOST
|
|
value: {{ .Values.env.services.user.host | quote }}
|
|
- name: USER_PORT
|
|
value: {{ .Values.env.services.user.port | quote }}
|
|
ports:
|
|
{{- range .Values.ports }}
|
|
- name: {{ .name }}
|
|
containerPort: {{ .containerPort }}
|
|
protocol: TCP
|
|
{{- end }}
|
|
volumeMounts:
|
|
- name: cacerts-volume
|
|
mountPath: /usr/lib/jvm/java-21-amazon-corretto/lib/security/cacerts
|
|
subPath: cacerts
|
|
restartPolicy: Always
|