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 }}
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: nextcloudconfig
|
|
|
|
data:
|
2021-07-04 17:39:33 +00:00
|
|
|
NEXTCLOUD_TRUSTED_DOMAINS: {{ ( printf "%v %v %v %v %v" "test.fakedomain.dns" ( .Values.env.NODE_IP | default "localhost" ) ( printf "%v-%v" .Release.Name "nextcloud" ) ( printf "%v-%v" .Release.Name "nextcloud-hpb" ) $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-04 17:39:33 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: hpbconfig
|
|
|
|
data:
|
|
|
|
NEXTCLOUD_URL: {{ ( printf "%v-%v" .Release.Name "nextcloud" ) | quote }}
|
|
|
|
|
2021-07-02 18:32:29 +00:00
|
|
|
{{- end -}}
|