|
@@ -10,6 +10,22 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
|
|
|
command: ['sh', '-c', "until pg_isready -h {{ template "common.names.fullname" $postgres_values }}; do echo waiting for postgres; sleep 2; done"]
|
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
|
containers:
|
|
|
+ {{ if eq (include "nginx.certAvailable" .) "true" }}
|
|
|
+ - name: nginx
|
|
|
+ {{ include "common.containers.imageConfig" .Values.nginx.image | nindent 8 }}
|
|
|
+ volumeMounts:
|
|
|
+ - name: nginx-configuration
|
|
|
+ mountPath: /etc/nginx/nginx.conf
|
|
|
+ subPath: nginx.conf
|
|
|
+ {{ include "nginx.tlsKeysVolumeMount" . | nindent 10 }}
|
|
|
+ ports:
|
|
|
+ - name: nginx-http
|
|
|
+ containerPort: 8000
|
|
|
+ protocol: TCP
|
|
|
+ - name: nginx-https
|
|
|
+ containerPort: 443
|
|
|
+ protocol: TCP
|
|
|
+ {{ end }}
|
|
|
- name: {{ .Chart.Name }}
|
|
|
{{ include "common.containers.imageConfig" .Values.image | nindent 8 }}
|
|
|
env: {{ include "postgres.envVariableConfiguration" $postgres_values | nindent 10 }}
|
|
@@ -18,6 +34,11 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
|
|
|
{{ $envList = mustAppend $envList (dict "name" "POSTGRES_HOST" "value" (printf "%s:5432" (include "common.names.fullname" $postgres_values))) }}
|
|
|
{{ $envList = mustAppend $envList (dict "name" "POSTGRES_DB" "value" (include "postgres.DatabaseName" .)) }}
|
|
|
{{ $envList = mustAppend $envList (dict "name" "NEXTCLOUD_DATA_DIR" "value" .Values.nextcloud.datadir) }}
|
|
|
+ {{ if eq (include "nginx.certAvailable" .) "true" }}
|
|
|
+ {{ $envList = mustAppend $envList (dict "name" "APACHE_DISABLE_REWRITE_IP" "value" "1") }}
|
|
|
+ {{ $envList = mustAppend $envList (dict "name" "OVERWRITEHOST" "value" (printf "%v:%v" .Values.nextcloud.host .Values.service.nodePort)) }}
|
|
|
+ {{ $envList = mustAppend $envList (dict "name" "OVERWRITEPROTOCOL" "value" "https") }}
|
|
|
+ {{ end }}
|
|
|
{{ $envList = mustAppend $envList (dict "name" "NEXTCLOUD_TRUSTED_DOMAINS" "value" .Values.nextcloud.host) }}
|
|
|
{{ $envList = mustAppend $envList (dict "name" "NEXTCLOUD_ADMIN_USER" "valueFromSecret" true "secretName" $secretName "secretKey" "nextcloud-username") }}
|
|
|
{{ $envList = mustAppend $envList (dict "name" "NEXTCLOUD_ADMIN_PASSWORD" "valueFromSecret" true "secretName" $secretName "secretKey" "nextcloud-password") }}
|
|
@@ -53,7 +74,15 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
|
|
|
mountPath: {{ $hostPathConfiguration.mountPath }}
|
|
|
{{ end }}
|
|
|
{{ include "common.networking.dnsConfiguration" .Values | nindent 6 }}
|
|
|
-{{ include "common.storage.allAppVolumes" .Values | nindent 6 }}
|
|
|
+ volumes:
|
|
|
+ - name: nginx-configuration
|
|
|
+ configMap:
|
|
|
+ defaultMode: 0700
|
|
|
+ name: "nginx-configuration"
|
|
|
+{{ include "nginx.tlsKeysVolume" . | nindent 8 }}
|
|
|
+{{ if .Values.appVolumeMounts }}
|
|
|
+{{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
|
|
|
+{{ end }}
|
|
|
{{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
|
|
|
- name: extrappvolume-{{ $index }}
|
|
|
hostPath:
|