1+ apiVersion : apps/v1
2+ kind : Deployment
3+ metadata :
4+ name : {{ .Values.appName }}
5+ namespace : {{ .Values.namespace }}
6+ labels :
7+ app : {{ .Values.appName }}
8+ spec :
9+ selector :
10+ matchLabels :
11+ app : {{ .Values.appName }}
12+ replicas : 1
13+ strategy :
14+ type : Recreate
15+ template :
16+ metadata :
17+ labels :
18+ app : {{ .Values.appName }}
19+ spec :
20+ containers :
21+ - name : {{ .Values.appName }}
22+ image : " {{ .Values.image.repository }}:{{ .Values.image.tag }}"
23+ imagePullPolicy : {{ .Values.image.imagePullPolicy }}
24+ resources :
25+ requests :
26+ cpu : {{ .Values.resources.requests.cpu }}
27+ memory : {{ .Values.resources.requests.memory }}
28+ limits :
29+ cpu : {{ .Values.resources.limits.cpu }}
30+ memory : {{ .Values.resources.limits.memory }}
31+ env :
32+ - name : TZ
33+ value : " {{ .Values.env.TZ }}"
34+ - name : PUID
35+ value : " {{ .Values.env.PUID }}"
36+ - name : PGID
37+ value : " {{ .Values.env.PGID }}"
38+ - name : DOCKER_MODS
39+ value : " {{ .Values.env.DOCKER_MODS }}"
40+ ports :
41+ - containerPort : {{ .Values.service.port }}
42+ name : {{ .Values.appName }}
43+ volumeMounts :
44+ - name : config
45+ mountPath : {{ .Values.persistence.config.mountPath }}
46+ {{ if .Values.persistence.backups.enabled }}
47+ - name : backups
48+ mountPath : {{ .Values.persistence.backups.mountPath }}
49+ {{ end }}
50+ {{ if .Values.persistence.books.enabled }}
51+ - name : books
52+ mountPath : {{ .Values.persistence.books.mountPath }}
53+ {{ end }}
54+ {{ if .Values.persistence.audioBooks.enabled }}
55+ - name : audiobooks
56+ mountPath : {{ .Values.persistence.audiobooks.mountPath }}
57+ {{ end }}
58+ {{ if .Values.persistence.torrent.enabled }}
59+ - name : torrent
60+ mountPath : {{ .Values.persistence.torrent.mountPath }}
61+ {{ end }}
62+ {{ if .Values.persistence.news.enabled }}
63+ - name : news
64+ mountPath : {{ .Values.persistence.news.mountPath }}
65+ {{ end }}
66+ {{ if .Values.persistence.customServices.enabled }}
67+ - name : custom-services
68+ mountPath : {{ .Values.persistence.customServices.mountPath }}
69+ {{ end }}
70+ {{ if .Values.persistence.customContInit.enabled }}
71+ - name : custom-cont-init
72+ mountPath : {{ .Values.persistence.customContInit.mountPath }}
73+ {{ end }}
74+ volumes :
75+ - name : config
76+ hostPath :
77+ path : {{ .Values.persistence.config.hostPath }}
78+ {{ if .Values.persistence.backups.enabled }}
79+ - name : backups
80+ persistentVolumeClaim :
81+ claimName : {{ .Values.persistence.backups.existingClaim }}
82+ {{ end }}
83+ {{ if .Values.persistence.books.enabled }}
84+ - name : books
85+ persistentVolumeClaim :
86+ claimName : {{ .Values.persistence.books.existingClaim }}
87+ {{ end }}
88+ {{ if .Values.persistence.audioBooks.enabled }}
89+ - name : audiobooks
90+ persistentVolumeClaim :
91+ claimName : {{ .Values.persistence.audiobooks.existingClaim }}
92+ {{ end }}
93+ {{ if .Values.persistence.torrent.enabled }}
94+ - name : torrent
95+ hostPath :
96+ path : {{ .Values.persistence.torrent.hostPath }}
97+ {{ end }}
98+ {{ if .Values.persistence.news.enabled }}
99+ - name : news
100+ hostPath :
101+ path : {{ .Values.persistence.news.hostPath }}
102+ {{ end }}
103+ {{ if .Values.persistence.customServices.enabled }}
104+ - name : custom-services
105+ hostPath :
106+ path : {{ .Values.persistence.customServices.hostPath }}
107+ {{ end }}
108+ {{ if .Values.persistence.customContInit.enabled }}
109+ - name : custom-cont-init
110+ hostPath :
111+ path : {{ .Values.persistence.customContInit.hostPath }}
112+ {{ end }}
113+ restartPolicy : Always
0 commit comments