2021-07-02 18:32:29 +00:00
|
|
|
{{/* Define the configmap */}}
|
|
|
|
{{- define "nextcloud.configmap" -}}
|
|
|
|
|
|
|
|
{{- $hosts := "" }}
|
|
|
|
{{- if .Values.ingress.main.enabled }}
|
2021-09-08 20:14:48 +00:00
|
|
|
{{- range .Values.ingress }}
|
|
|
|
{{- range $index, $host := .hosts }}
|
2021-07-02 18:32:29 +00:00
|
|
|
{{- if $index }}
|
2021-07-03 09:28:35 +00:00
|
|
|
{{ $hosts = ( printf "%v %v" $hosts $host.host ) }}
|
2021-07-02 18:32:29 +00:00
|
|
|
{{- else }}
|
2021-07-03 09:28:35 +00:00
|
|
|
{{ $hosts = ( printf "%s" $host.host ) }}
|
2021-07-02 18:32:29 +00:00
|
|
|
{{- end }}
|
2021-09-08 20:14:48 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
2021-07-02 18:32:29 +00:00
|
|
|
{{- end }}
|
2022-07-06 11:25:34 +00:00
|
|
|
|
|
|
|
|
2021-07-02 18:32:29 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: nextcloudconfig
|
|
|
|
data:
|
2022-07-08 13:44:55 +00:00
|
|
|
{{- $aliasgroup1 := ( printf "http://%s" ( .Values.env.AccessIP | default ( printf "%v-%v" .Release.Name "nextcloud" ) ) ) }}
|
|
|
|
{{- if .Values.ingress.main.enabled }}
|
|
|
|
{{- with (first .Values.ingress.main.hosts) }}
|
|
|
|
{{- $aliasgroup1 = ( printf "https://%s" .host ) }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
aliasgroup1: {{ $aliasgroup1 }}
|
2022-07-06 11:25:34 +00:00
|
|
|
NEXTCLOUD_TRUSTED_DOMAINS: {{ ( printf "%v %v %v %v %v %v %v %v" "test.fakedomain.dns" "localhost" "127.0.0.1" ( printf "%v:%v" "127.0.0.1" .Values.service.main.ports.main.port ) ( .Values.env.AccessIP | default "localhost" ) ( printf "%v-%v" .Release.Name "nextcloud" ) ( printf "%v-%v" .Release.Name "nextcloud-backend" ) $hosts ) | quote }}
|
2021-07-03 10:12:04 +00:00
|
|
|
{{- if .Values.ingress.main.enabled }}
|
2021-07-03 10:22:52 +00:00
|
|
|
APACHE_DISABLE_REWRITE_IP: "1"
|
2021-07-03 09:52:03 +00:00
|
|
|
{{- end }}
|
2021-07-02 21:59:17 +00:00
|
|
|
|
2021-07-02 18:32:29 +00:00
|
|
|
{{- end -}}
|