mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-24 16:09:08 +00:00
91 lines
2.8 KiB
YAML
91 lines
2.8 KiB
YAML
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: {{ template "deluge.fullname" . }}
|
||
|
labels:
|
||
|
app: {{ template "deluge.name" . }}
|
||
|
chart: {{ template "deluge.chart" . }}
|
||
|
release: {{ .Release.Name }}
|
||
|
heritage: {{ .Release.Service }}
|
||
|
spec:
|
||
|
replicas: {{ .Values.replicaCount }}
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: {{ template "deluge.name" . }}
|
||
|
release: {{ .Release.Name }}
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: {{ template "deluge.name" . }}
|
||
|
release: {{ .Release.Name }}
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: {{ .Chart.Name }}
|
||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||
|
ports:
|
||
|
- name: http
|
||
|
containerPort: 8112
|
||
|
protocol: TCP
|
||
|
- name: daemon
|
||
|
containerPort: 58846
|
||
|
protocol: TCP
|
||
|
- name: bt
|
||
|
containerPort: 51414
|
||
|
protocol: TCP
|
||
|
livenessProbe:
|
||
|
httpGet:
|
||
|
port: http
|
||
|
scheme: HTTP
|
||
|
initialDelaySeconds: 30
|
||
|
readinessProbe:
|
||
|
httpGet:
|
||
|
port: http
|
||
|
scheme: HTTP
|
||
|
initialDelaySeconds: 15
|
||
|
env:
|
||
|
- name: TZ
|
||
|
value: "{{ .Values.timezone }}"
|
||
|
- name: UMASK_SET
|
||
|
value: "{{ .Values.umask }}"
|
||
|
- 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 }}
|
||
|
resources:
|
||
|
{{ toYaml .Values.resources | indent 12 }}
|
||
|
volumes:
|
||
|
- name: config
|
||
|
{{- if .Values.persistence.config.enabled }}
|
||
|
persistentVolumeClaim:
|
||
|
claimName: {{ if .Values.persistence.config.existingClaim }}{{ .Values.persistence.config.existingClaim }}{{- else }}{{ template "deluge.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 "deluge.fullname" . }}-downloads{{- end }}
|
||
|
{{- else }}
|
||
|
emptyDir: {}
|
||
|
{{ 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 }}
|