apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "backend.fullname" . }} labels: {{- include "backend.labels" . | nindent 4 }} spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} selector: matchLabels: {{- include "backend.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "backend.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: backend image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} ports: - name: http containerPort: 8080 protocol: TCP envFrom: - secretRef: name: {{ include "backend.fullname" . }}-secrets env: {{- range $k, $v := .Values.env }} - name: {{ $k }} value: {{ $v | quote }} {{- end }} {{- if .Values.persistence.uploads.enabled }} volumeMounts: - name: uploads mountPath: /app/uploads {{- end }} livenessProbe: httpGet: path: /api/v1/app-settings port: http initialDelaySeconds: 15 periodSeconds: 30 failureThreshold: 3 readinessProbe: httpGet: path: /api/v1/app-settings port: http initialDelaySeconds: 5 periodSeconds: 10 resources: {{- toYaml .Values.resources | nindent 12 }} {{- if .Values.persistence.uploads.enabled }} volumes: - name: uploads persistentVolumeClaim: claimName: {{ include "backend.fullname" . }}-uploads {{- end }}