apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "sonarr.fullname" . }} labels: {{- include "sonarr.labels" . | nindent 4 }} spec: replicas: 1 selector: matchLabels: {{- include "sonarr.selectorLabels" . | nindent 6 }} template: metadata: labels: {{- include "sonarr.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: {{- range .Values.env }} - name: {{ .name }} value: {{ .value | quote }} {{- end }} ports: - name: http containerPort: {{ .Values.service.port }} protocol: TCP volumeMounts: - name: config mountPath: {{ .Values.persistence.config.mountPath }} - name: tv mountPath: {{ .Values.persistence.tv.mountPath }} - name: downloads mountPath: {{ .Values.persistence.downloads.mountPath }} livenessProbe: httpGet: path: / port: http readinessProbe: httpGet: path: / port: http resources: {{- toYaml .Values.resources | nindent 12 }} volumes: - name: config persistentVolumeClaim: claimName: {{ .Values.persistence.config.claimName }} - name: tv persistentVolumeClaim: claimName: {{ .Values.persistence.tv.claimName }} - name: downloads persistentVolumeClaim: claimName: {{ .Values.persistence.downloads.claimName }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}