cw-infra-apps/charts/backend2/charts/call-app-k8s/templates/deployment.yaml
2026-04-12 13:05:39 +03:00

81 lines
2.7 KiB
YAML
Executable File

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "call-app-k8s.fullname" . }}
labels:
{{- include "call-app-k8s.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "call-app-k8s.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "call-app-k8s.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
{{- include "cw-common.volumes.cacerts" . | nindent 8 }}
initContainers:
{{- include "cw-common.initContainer.importCA" . | nindent 8 }}
containers:
- name: {{ include "call-app-k8s.fullname" . }}
image: {{ include "cw-common.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
{{- if .Values.service.debugPort }}
- containerPort: {{ .Values.service.debugPort }}
protocol: TCP
{{- end }}
- containerPort: {{ .Values.service.targetPort }}
protocol: TCP
env:
{{- range .Values.env.globalEnvIncludes }}
{{- include (printf "global.env.%s" .) $ | nindent 12 }}
{{- end }}
{{- range $prefix, $serviceKey := .Values.env.serviceHostPort }}
{{- $svc := index $.Values.global.services $serviceKey }}
- name: {{ $prefix }}_HOST
value: {{ $svc.host | quote }}
- name: {{ $prefix }}_PORT
value: {{ $svc.port | quote }}
{{- end }}
{{- with .Values.env.extraEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
{{- include "cw-common.volumeMounts.cacerts" . | nindent 12 }}
resources:
{{- include "cw-common.resources" . | nindent 12 }}
{{- with (include "cw-common.livenessProbe" .) }}
livenessProbe:
{{- . | nindent 12 }}
{{- end }}
{{- with (include "cw-common.readinessProbe" .) }}
readinessProbe:
{{- . | nindent 12 }}
{{- end }}
{{- with .Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}