charts/sonarr/templates/deployment.yaml

118 lines
4.2 KiB
YAML
Raw Normal View History

2019-03-10 11:24:37 +00:00
apiVersion: apps/v1
2019-03-31 05:17:01 +00:00
kind: Deployment
metadata:
name: {{ include "sonarr.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "sonarr.name" . }}
helm.sh/chart: {{ include "sonarr.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
2019-03-31 05:17:01 +00:00
replicas: 1
strategy:
type: {{ .Values.strategyType }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "sonarr.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "sonarr.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.podAnnotations }}
annotations:
{{- range $key, $value := .Values.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 8989
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
2019-12-14 15:15:02 +00:00
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
failureThreshold: {{ .Values.probes.liveness.failureThreshold }}
timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds }}
readinessProbe:
httpGet:
path: /
port: http
2019-12-14 15:15:02 +00:00
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
env:
- name: TZ
value: "{{ .Values.timezone }}"
- name: PUID
value: "{{ .Values.puid }}"
- name: PGID
value: "{{ .Values.pgid }}"
volumeMounts:
- mountPath: /config
name: config
- mountPath: /downloads
name: downloads
{{- if .Values.persistence.downloads.subPath }}
subPath: {{ .Values.persistence.downloads.subPath }}
{{- end }}
- mountPath: /tv
name: tv
{{- if .Values.persistence.tv.subPath }}
subPath: {{ .Values.persistence.tv.subPath }}
{{- end }}
{{- range .Values.persistence.extraExistingClaimMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
readOnly: {{ .readOnly }}
{{- end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
volumes:
2019-03-31 05:17:01 +00:00
- name: config
{{- if .Values.persistence.config.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.config.existingClaim }}{{ .Values.persistence.config.existingClaim }}{{- else }}{{ template "sonarr.fullname" . }}-config{{- end }}
{{- else }}
emptyDir: {}
{{- end }}
- name: downloads
{{- if .Values.persistence.downloads.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.downloads.existingClaim }}{{ .Values.persistence.downloads.existingClaim }}{{- else }}{{ template "sonarr.fullname" . }}-downloads{{- end }}
{{- else }}
emptyDir: {}
{{- end }}
- name: tv
{{- if .Values.persistence.tv.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.tv.existingClaim }}{{ .Values.persistence.tv.existingClaim }}{{- else }}{{ template "sonarr.fullname" . }}-tv{{- end }}
{{- else }}
emptyDir: {}
{{- end }}
{{- range .Values.persistence.extraExistingClaimMounts }}
- name: {{ .name }}
persistentVolumeClaim:
claimName: {{ .existingClaim }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}