fix: Add initcontainer to force refresh TRUSTED_DOMAINS (#930)
* reverse useless changes (+1 squashed commits) Squashed commits: [fc6a76660] bump version (+19 squashed commit) Squashed commit: [ef82c37d7] trry a more... direct... script [feffd5fb8] try moving config injector to nextcloud container [9f89377fd] don't create folder and leave it at that [d00abcd3f] create dir of not exists [2b95c9277] try more [b28ff0f57] try yet another solution [b5b65ac6d] try this [744bc21af] slightly different [d3b3ec75f] fix mistake [8c4b311af] move to command [43a9f0116] try one line scripting [5e8ff9f2b] add some verbosity [a7c13abc6] try adding extra tooling to deal with the config [abdb26807] mode 777 [938651c7b] add subpath [810858849] disable readonly on configmap mount [8b5a48d65] usefilename as mountpath [3609d1198] fix this [99d115d97] fix: adds an override nextcloud config to force trusted_domains * add nextcloud config
This commit is contained in:
parent
0aa2131b28
commit
6910a43d35
|
@ -33,4 +33,4 @@ sources:
|
|||
- https://github.com/nextcloud/docker
|
||||
- https://github.com/nextcloud/helm
|
||||
type: application
|
||||
version: 3.7.14
|
||||
version: 3.7.15
|
||||
|
|
|
@ -3,13 +3,15 @@
|
|||
|
||||
{{- $hosts := "" }}
|
||||
{{- if .Values.ingress.main.enabled }}
|
||||
{{ range $index, $host := .Values.ingress.main.hosts }}
|
||||
{{- range .Values.ingress }}
|
||||
{{- range $index, $host := .hosts }}
|
||||
{{- if $index }}
|
||||
{{ $hosts = ( printf "%v %v" $hosts $host.host ) }}
|
||||
{{- else }}
|
||||
{{ $hosts = ( printf "%s" $host.host ) }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
|
|
|
@ -81,6 +81,33 @@ initContainers:
|
|||
secretKeyRef:
|
||||
name: dbcreds
|
||||
key: plainhost
|
||||
- name: injectconfig
|
||||
image: nextcloud:22.1.1
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: nextcloudconfig
|
||||
command:
|
||||
- "su"
|
||||
- "-p"
|
||||
- "www-data"
|
||||
- "-s"
|
||||
- "/bin/sh"
|
||||
- "-c"
|
||||
args:
|
||||
- if [ -f /var/www/html/occ ]; then
|
||||
if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then
|
||||
echo "setting trusted domains…";
|
||||
NC_TRUSTED_DOMAIN_IDX=1;
|
||||
for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do
|
||||
DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//');
|
||||
php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN;
|
||||
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1));
|
||||
done;
|
||||
fi;
|
||||
fi;
|
||||
volumeMounts:
|
||||
- mountPath: /var/www/html
|
||||
name: data
|
||||
|
||||
|
||||
podSecurityContext:
|
||||
|
|
Loading…
Reference in New Issue