106 lines
3.8 KiB
YAML
Executable File
106 lines
3.8 KiB
YAML
Executable File
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "chat-app.fullname" . }}
|
|
labels:
|
|
{{- include "chat-app.labels" . | nindent 4 }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
app: {{ include "chat-app.name" . }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ include "chat-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.image.repository }}:{{ .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: {{ .Chart.Name }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
ports:
|
|
- containerPort: 9090
|
|
hostPort: 8085
|
|
- containerPort: 5005
|
|
hostPort: 5085
|
|
env:
|
|
{{- include "global.env.cassandra" . | nindent 12 }}
|
|
{{- include "global.env.kafka" . | nindent 12 }}
|
|
{{- include "global.env.redis" . | nindent 12 }}
|
|
- name: DEEPLINK_HOST
|
|
value: {{ .Values.env.DEEPLINK_HOST }}
|
|
- name: DEEPLINK_PORT
|
|
value: {{ include "chat-app.quote" .Values.env.DEEPLINK_PORT }}
|
|
- name: GEM_CALL_HOST
|
|
value: {{ .Values.env.GEM_CALL_HOST }}
|
|
- name: GEM_CALL_PORT
|
|
value: {{ include "chat-app.quote" .Values.env.GEM_CALL_PORT }}
|
|
- name: MESSAGE_HOST
|
|
value: {{ .Values.env.MESSAGE_HOST }}
|
|
- name: MESSAGE_PORT
|
|
value: {{ .Values.env.MESSAGE_PORT | quote }}
|
|
- name: SEARCH_HOST
|
|
value: {{ .Values.env.SEARCH_HOST }}
|
|
- name: SEARCH_PORT
|
|
value: {{ include "chat-app.quote" .Values.env.SEARCH_PORT }}
|
|
- name: USER_HOST
|
|
value: {{ .Values.env.USER_HOST }}
|
|
- name: USER_PORT
|
|
value: {{ include "chat-app.quote" .Values.env.USER_PORT }}
|
|
- name: KEYCLOAK_URL
|
|
value: {{ .Values.env.KEYCLOAK_URL }}
|
|
- name: LIVEKIT_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: livekit-secret
|
|
key: api-key
|
|
- name: LIVEKIT_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: livekit-secret
|
|
key: secret
|
|
- name: RECORDING_ACCESS_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: recording-secret
|
|
key: access-key
|
|
- name: RECORDING_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: recording-secret
|
|
key: secret
|
|
volumeMounts:
|
|
- name: cacerts-volume
|
|
mountPath: /usr/lib/jvm/java-21-amazon-corretto/lib/security/cacerts
|
|
subPath: cacerts
|
|
restartPolicy: Always
|