apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "qbittorrent.fullname" . }} labels: {{- include "qbittorrent.labels" . | nindent 4 }} spec: replicas: 1 strategy: type: Recreate selector: matchLabels: {{- include "qbittorrent.selectorLabels" . | nindent 6 }} template: metadata: labels: {{- include "qbittorrent.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: web containerPort: {{ .Values.service.webPort }} protocol: TCP - name: bittorrent containerPort: {{ .Values.service.btPort }} protocol: TCP volumeMounts: - name: config mountPath: {{ .Values.persistence.config.mountPath }} - name: media mountPath: {{ .Values.persistence.media.mountPath }} {{- with .Values.volumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} livenessProbe: httpGet: path: / port: web readinessProbe: httpGet: path: / port: web resources: {{- toYaml .Values.resources | nindent 12 }} volumes: - name: config persistentVolumeClaim: claimName: {{ .Values.persistence.config.claimName }} - name: media persistentVolumeClaim: claimName: {{ .Values.persistence.media.claimName }} {{- with .Values.volumes }} {{- toYaml . | nindent 8 }} {{- 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 }}