2222 imagePullSecrets :
2323 {{- toYaml . | nindent 8 }}
2424 {{- end }}
25+ securityContext :
26+ runAsUser : {{ .Values.userid }}
27+ runAsGroup : {{ .Values.groupid }}
2528 initContainers :
2629 - name : check-mongo
2730 image : " {{ $.Values.image.checks }}"
@@ -33,15 +36,23 @@ spec:
3336 name : {{ .Release.Name }}
3437 key : mongodb-uri
3538{{- if not (or .Values.storage.s3 .Values.minio.enabled) }}
36- - name : data-chown
37- command : [chown, "{{ .Values.userid }}:{{ .Values.groupid }}", /home/clowder/data]
39+ - name : chown-data-folder
3840 image : busybox:latest
41+ command : ["/bin/sh"]
42+ args :
43+ - -c
44+ - >-
45+ mkdir {{ .Values.tempfolder }} &&
46+ chown "{{ .Values.userid }}:{{ .Values.groupid }}" /home/clowder/data {{ .Values.tempfolder }}
3947 securityContext :
4048 runAsUser : 0
4149 runAsGroup : 0
4250 volumeMounts :
4351 - name : data
4452 mountPath : /home/clowder/data
53+ {{- with .Values.extraVolumeMounts }}
54+ {{- . | toYaml | nindent 10 }}
55+ {{- end }}
4556{{- end }}
4657{{- if .Values.users }}
4758{{- range $index, $element := .Values.users }}
@@ -73,16 +84,14 @@ spec:
7384 value : {{ .admin | quote }}
7485{{- end }}
7586{{- end }}
76- securityContext :
77- runAsUser : {{ .Values.userid }}
78- runAsGroup : {{ .Values.groupid }}
7987 containers :
8088 - name : {{ .Chart.Name }}
8189 image : " {{ .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
8290 imagePullPolicy : {{ .Values.image.pullPolicy }}
8391 command :
8492 - /home/clowder/clowder.sh
8593 - -mem {{ .Values.memory }}
94+ - -Djava.io.tmpdir={{ .Values.tempfolder }}
8695{{- range .Values.extraOptions }}
8796 - {{ . }}
8897{{- end }}
@@ -141,6 +150,9 @@ spec:
141150 - name : data
142151 mountPath : /home/clowder/data
143152{{- end }}
153+ {{- with .Values.extraVolumeMounts }}
154+ {{- . | toYaml | nindent 12 }}
155+ {{- end }}
144156 livenessProbe :
145157 tcpSocket :
146158 port : clowder
@@ -162,15 +174,18 @@ spec:
162174 path : custom.conf
163175 - key : play.plugins
164176 path : play.plugins
165- {{- if not (or .Values.storage.s3 .Values.minio.enabled) }}
177+ {{- if not (or .Values.storage.s3 .Values.minio.enabled) }}
166178 - name : data
167179 persistentVolumeClaim :
168- {{- if $.Values.persistence.existingClaim }}
180+ {{- if $.Values.persistence.existingClaim }}
169181 claimName : {{ $.Values.persistence.existingClaim }}
170- {{- else }}
182+ {{- else }}
171183 claimName : {{ include "clowder.fullname" . }}-data
172- {{- end }}
173- {{- end }}
184+ {{- end }}
185+ {{- end }}
186+ {{- with .Values.extraVolumes }}
187+ {{- . | toYaml | nindent 8 }}
188+ {{- end }}
174189 {{- with .Values.nodeSelector }}
175190 nodeSelector :
176191 {{- toYaml . | nindent 8 }}
0 commit comments