82 lines
3 KiB
YAML
82 lines
3 KiB
YAML
|
|
apiVersion: apps/v1
|
||
|
|
kind: Deployment
|
||
|
|
metadata:
|
||
|
|
name: {{ include "vergabe.fullname" . }}
|
||
|
|
labels: {{- include "vergabe.labels" . | nindent 4 }}
|
||
|
|
spec:
|
||
|
|
replicas: {{ .Values.replicaCount }}
|
||
|
|
selector:
|
||
|
|
matchLabels: {{- include "vergabe.selectorLabels" . | nindent 6 }}
|
||
|
|
strategy:
|
||
|
|
type: RollingUpdate
|
||
|
|
rollingUpdate:
|
||
|
|
maxSurge: 1
|
||
|
|
maxUnavailable: 0
|
||
|
|
template:
|
||
|
|
metadata:
|
||
|
|
labels: {{- include "vergabe.selectorLabels" . | nindent 8 }}
|
||
|
|
spec:
|
||
|
|
securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||
|
|
containers:
|
||
|
|
- name: app
|
||
|
|
image: {{ include "vergabe.image" . | quote }}
|
||
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||
|
|
securityContext: {{- toYaml .Values.securityContext | nindent 12 }}
|
||
|
|
ports:
|
||
|
|
- name: http
|
||
|
|
containerPort: {{ .Values.service.targetPort }}
|
||
|
|
protocol: TCP
|
||
|
|
envFrom:
|
||
|
|
- secretRef:
|
||
|
|
name: {{ .Values.envSecretName | quote }}
|
||
|
|
env:
|
||
|
|
{{- range $k, $v := .Values.env }}
|
||
|
|
- name: {{ $k }}
|
||
|
|
value: {{ $v | quote }}
|
||
|
|
{{- end }}
|
||
|
|
{{- if .Values.probes.enabled }}
|
||
|
|
readinessProbe:
|
||
|
|
httpGet:
|
||
|
|
path: {{ .Values.probes.path }}
|
||
|
|
port: {{ .Values.probes.port }}
|
||
|
|
httpHeaders:
|
||
|
|
- name: Host
|
||
|
|
value: {{ .Values.probes.hostHeader | quote }}
|
||
|
|
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
|
||
|
|
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
|
||
|
|
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
|
||
|
|
failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
|
||
|
|
livenessProbe:
|
||
|
|
httpGet:
|
||
|
|
path: {{ .Values.probes.path }}
|
||
|
|
port: {{ .Values.probes.port }}
|
||
|
|
httpHeaders:
|
||
|
|
- name: Host
|
||
|
|
value: {{ .Values.probes.hostHeader | quote }}
|
||
|
|
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
|
||
|
|
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
|
||
|
|
timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds }}
|
||
|
|
failureThreshold: {{ .Values.probes.liveness.failureThreshold }}
|
||
|
|
{{- end }}
|
||
|
|
resources: {{- toYaml .Values.resources | nindent 12 }}
|
||
|
|
{{- if .Values.persistence.media.enabled }}
|
||
|
|
volumeMounts:
|
||
|
|
- name: media
|
||
|
|
mountPath: /app/media
|
||
|
|
{{- end }}
|
||
|
|
{{- if .Values.persistence.media.enabled }}
|
||
|
|
volumes:
|
||
|
|
- name: media
|
||
|
|
persistentVolumeClaim:
|
||
|
|
claimName: {{ include "vergabe.fullname" . }}-media
|
||
|
|
{{- end }}
|
||
|
|
{{- with .Values.nodeSelector }}
|
||
|
|
nodeSelector: {{- toYaml . | nindent 8 }}
|
||
|
|
{{- end }}
|
||
|
|
{{- with .Values.affinity }}
|
||
|
|
affinity: {{- toYaml . | nindent 8 }}
|
||
|
|
{{- end }}
|
||
|
|
{{- with .Values.tolerations }}
|
||
|
|
tolerations: {{- toYaml . | nindent 8 }}
|
||
|
|
{{- end }}
|