apiVersion: apps/v1 kind: StatefulSet metadata: name: {{ include "radarr.fullname" . }} labels: {{- include "radarr.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} serviceName: {{ include "radarr.fullname" . }} selector: matchLabels: {{- include "radarr.selectorLabels" . | nindent 6 }} template: metadata: labels: {{- include "radarr.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "radarr.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} command: ports: - name: radarr containerPort: 7878 protocol: TCP livenessProbe: tcpSocket: port: 7878 readinessProbe: tcpSocket: port: 7878 resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - name: radarr-config mountPath: /config - name: radarr-media mountPath: /movies subPath: movies volumes: - name: radarr-config persistentVolumeClaim: claimName: {{ .Values.config.configPvc }} - name: radarr-media persistentVolumeClaim: claimName: {{ .Values.mediaPvc }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}