Files
charts/tatort/templates/deployment.yaml
2025-03-05 16:42:56 +01:00

101 lines
3.0 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "tatort.fullname" . }}
labels:
app: {{ template "tatort.name" . }}
chart: {{ template "tatort.chart" . }}
component: tatort
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.deploymentLabels }}
{{- toYaml .Values.deploymentLabels | nindent 4 }}
{{- end }}
spec:
strategy:
{{ toYaml .Values.updateStrategy | nindent 4 }}
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "tatort.name" . }}
component: tatort
release: {{ .Release.Name }}
template:
metadata:
annotations:
labels:
app: {{ template "tatort.name" . }}
component: tatort
release: {{ .Release.Name }}
{{- if .Values.podLabels }}
{{- toYaml .Values.podLabels | nindent 8 }}
{{- end }}
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
serviceAccountName: {{ template "tatort.serviceAccountName" . }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
terminationMessagePolicy: FallbackToLogsOnError
ports:
- name: http
containerPort: {{ .Values.service.port }}
env:
{{- range $key := .Values.env }}
{{- if .value }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
{{- end }}
{{- range $key := .Values.secretEnv }}
- name: {{ .name }}
valueFrom:
secretKeyRef:
name: {{ template "tatort.fullname" $ }}-secret
key: {{ .name }}
{{- end }}
envFrom:
{{- with .Values.extraEnvFrom }}
{{- tpl . $ | nindent 10 }}
{{- end }}
readinessProbe:
httpGet:
path: /
port: {{ .Values.service.port }}
initialDelaySeconds: 20
livenessProbe:
httpGet:
path: /
port: {{ .Values.service.port }}
initialDelaySeconds: 60
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{ if .Values.sharedDataFolder.enabled }}
volumeMounts:
- name: shared-data-volume
mountPath: /data
{{ end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{ toYaml .Values.affinity | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{ if .Values.sharedDataFolder.enabled }}
volumes:
- name: shared-data-volume
persistentVolumeClaim:
claimName: {{ template "tatort.fullname" . }}-shared-data
{{ end }}