Files
media-charts/radarr/templates/deployment.yaml
2025-01-10 13:45:35 +01:00

93 lines
3.0 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "radarr.fullname" . }}
labels:
{{- include "radarr.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "radarr.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "radarr.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 | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: TZ
value: {{ .Values.env.TZ | quote }}
- name: PUID
value: {{ .Values.securityContext.PUID | quote }}
- name: PGID
value: {{ .Values.securityContext.PGID | quote }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
volumeMounts:
- name: config
mountPath: {{ .Values.persistence.config.mountPath }}
- name: movies
mountPath: {{ .Values.persistence.movies.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
{{- if .Values.persistence.config.enabled }}
persistentVolumeClaim:
claimName: {{ include "radarr.fullname" . }}-config
{{- else }}
emptyDir: {}
{{- end }}
- name: movies
{{- if .Values.persistence.movies.enabled }}
persistentVolumeClaim:
claimName: {{ include "radarr.fullname" . }}-movies
{{- else }}
emptyDir: {}
{{- end }}
- name: downloads
{{- if .Values.persistence.downloads.enabled }}
persistentVolumeClaim:
{{- if .Values.persistence.downloads.existingClaim }}
claimName: {{ .Values.persistence.downloads.existingClaim }}
{{- else }}
claimName: {{ include "radarr.fullname" . }}-downloads
{{- end }}
{{- else }}
emptyDir: {}
{{- 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 }}