@@ -48,15 +48,15 @@ spec:
4848 podSecurityContext :
4949 {{- toYaml .Values.aiWorker.podSecurityContext | nindent 8 }}
5050 initContainers :
51- - name : wait-for-service
52- image : {{ .Values.aiWorker.image.repository }}:{{ .Values.aiWorker.image.tag }}
53- command :
54- - sh
55- - -c
56- - >-
57- until curl -sf https://{{ if .Values.aiWorker.useHostName }}{{ .Values.nextcloud.host }}/status.php {{- else }} http://{{ template "nextcloud.fullname" . }}:{{ .Values.service.port }}/status.php; {{- end }}
58- do echo waiting for service; sleep 5;
59- done
51+ - name : wait-for-service
52+ image : {{ .Values.aiWorker.image.repository }}:{{ .Values.aiWorker.image.tag }}
53+ command :
54+ - sh
55+ - -c
56+ - >-
57+ until curl -sf {{- if .Values.aiWorker.useHostName }}https:// {{ .Values.nextcloud.host }}/status.php{{- else }}http://{{ template "nextcloud.fullname" . }}:{{ .Values.service.port }}/status.php{{- end }};
58+ do echo waiting for service; sleep 5;
59+ done
6060 containers :
6161 - name : nextcloud-aiworker
6262 image : {{ include "nextcloud.image" . }}
6969 resources :
7070 {{- toYaml .Values.aiWorker.resources | nindent 12 }}
7171 volumeMounts :
72- {{- include "aiWorker.volumeMounts" . | trim | nindent 12 }}
72+ {{- include "nextcloud.volumeMounts" . | trim | nindent 12 }}
73+ {{- range $hook, $shell := .Values.nextcloud.hooks }}
74+ {{- if $shell }}
75+ - name : nextcloud-hooks
76+ mountPath : /docker-entrypoint-hooks.d/{{ $hook }}/helm.sh
77+ subPath : {{ $hook }}.sh
78+ readOnly : true
79+ {{- end }}
80+ {{- end }}
7381 volumes :
7482 - name : nextcloud-main
7583 {{- if .Values.persistence.enabled }}
8391 persistentVolumeClaim :
8492 claimName : {{ if .Values.persistence.nextcloudData.existingClaim }}{{ .Values.persistence.nextcloudData.existingClaim }}{{- else }}{{ template "nextcloud.fullname" . }}-nextcloud-data{{- end }}
8593 {{- end }}
94+ {{- if .Values.nextcloud.configs }}
95+ - name : nextcloud-config
96+ configMap :
97+ name : {{ template "nextcloud.fullname" . }}-config
98+ {{- end }}
99+ {{- if .Values.nextcloud.phpConfigs }}
100+ - name : nextcloud-phpconfig
101+ configMap :
102+ name : {{ template "nextcloud.fullname" . }}-phpconfig
103+ {{- end }}
104+ {{- if .Values.nginx.enabled }}
105+ - name : nextcloud-nginx-config
106+ configMap :
107+ name : {{ template "nextcloud.fullname" . }}-nginxconfig
108+ {{- end }}
109+ {{- if not (values .Values.nextcloud.hooks | compact | empty) }}
110+ - name : nextcloud-hooks
111+ configMap :
112+ name : {{ template "nextcloud.fullname" . }}-hooks
113+ defaultMode : 0o755
114+ {{- end }}
115+ {{- with .Values.nextcloud.extraVolumes }}
116+ {{- toYaml . | nindent 8 }}
117+ {{- end }}
86118 restartPolicy : Always
87119{{- end }}
0 commit comments