fix(mycloud-nextcloud): use official helm-chart

This commit is contained in:
WrenIX 2024-03-19 17:35:36 +01:00
parent fabb9118c6
commit e1cdb09953
Signed by: wrenix
GPG key ID: 7AFDB012974B1BB5
3 changed files with 44 additions and 57 deletions

View file

@ -7,9 +7,9 @@ spec:
chart:
spec:
sourceRef:
kind: GitRepository
kind: HelmRepository
name: "nextcloud"
chart: "./charts/nextcloud"
chart: "nextcloud"
# TODO delete later
# https://codeberg.org/wrenix/flux-charts/issues/6
reconcileStrategy: "Revision"
@ -100,17 +100,14 @@ spec:
# https://codeberg.org/wrenix/flux-charts/issues/7
before-starting: |-
#!/bin/sh
echo "update all apps:";
/var/www/html/occ app:update --all;
echo "setup theming:";
/var/www/html/occ theming:config disable-user-theming yes;
/var/www/html/occ theming:config name "{{ .Values.commons.theme.title }}";
{{- with .Values.theme.color }}
/var/www/html/occ theming:config color {{ . | quote }};
{{- end }}
echo "setup oidc:";
{{- $app := "user_oidc" }}
echo "=== manage: {{ $app }} ==="
echo "--- install: {{ $app }} ---"
/var/www/html/occ app:install {{ $app }};
/var/www/html/occ app:enable {{ $app }};
echo "--- configure: {{ $app }} ---"
/var/www/html/occ config:app:set -n {{ $app }} allow_multiple_user_backends --value="0"
/var/www/html/occ config:app:set -n {{ $app }} provider-1-groupProvisioning --value="1"
/var/www/html/occ user_oidc:provider mycloud \
--clientid $NC_HOOK_OIDC_CLIENT_ID \
--clientsecret $NC_HOOK_OIDC_CLIENT_SECRET \
@ -125,36 +122,37 @@ spec:
--check-bearer=true \
--unique-uid=0;
appManagement:
enabled: true
apps:
user_oidc:
enabled: true
config:
allow_multiple_user_backends: "0"
provider-1-groupProvisioning: "1"
##
# collabora
##
{{- with .Values.apps.richdocuments }}
{{- if .enabled }}
richdocuments:
enabled: true
{{- with .config }}
config:
{{- with (get . "wopi_url") }}
wopi_url: {{ . }}
{{- else }}
wopi_url: "https://collabora.{{ $.Values.commons.ingress.domain }}"
{{- end }}
{{- with (omit . "wopi_url") }}
{{- toYaml . | nindent 14 }}
{{- end }}
{{- end }}{{/* with .config */}}
{{- end }}{{/* end-if .enabled */}}
{{- end }}{{/* end-with .richdocuments */}}
{{- with (omit .Values.apps "richdocuments") }}
{{- toYaml . | nindent 10 }}
{{- range $app,$appConfig := .Values.apps }}
echo "=== manage app: {{ $app }} ===";
{{- if $appConfig.enabled }}
echo "--- install: {{ $app }} ---"
/var/www/html/occ app:install {{ $app }}
/var/www/html/occ app:enable {{ $app }}
# config of app
echo "--- config: {{ $app }} ---"
{{- range $key, $value := $appConfig.config }}
/var/www/html/occ config:app:set -n {{ $app }} {{ $key }} --value={{ $value | quote }}
{{- end}}
{{- else }}
echo "--- disable: {{ $app }} ---"
/var/www/html/occ app:disable {{ $app }}
{{- end }}
{{- end }}{{/* end-range */}}
{{- if .Values.apps.richdocuments.enabled }}
echo "=== manage: richdocuments -> configure for mycloud-collabora ==="
/var/www/html/occ config:app:set -n richdocuments wopi_url --value={{ get .Values.apps.richdocuments.config "wopi_url" | default (printf "https://collabora.%s" $.Values.commons.ingress.domain) | quote }}
{{- end }}{{/* end-else-if richdocuments.enable */}}
echo "update all apps:";
/var/www/html/occ app:update --all;
echo "setup theming:";
/var/www/html/occ theming:config disable-user-theming yes;
/var/www/html/occ theming:config name "{{ .Values.commons.theme.title }}";
{{- with .Values.theme.color }}
/var/www/html/occ theming:config color {{ . | quote }};
{{- end }}
phpClientHttpsFix:

View file

@ -1,14 +1,8 @@
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: nextcloud
spec:
url: https://github.com/wrenix/nextcloud-helm.git
ref:
{{- with .Values.helm.nextcloud.chart }}
commit: {{ . }}
{{- else }}
branch: main
{{- end }}
url: https://nextcloud.github.io/helm/
interval: 10m

View file

@ -54,11 +54,6 @@ commons:
redis:
replicas: 0
helm:
nextcloud:
# -- version of the helm chart (current on git)
chart: "616d6ef694c862733932040293ba0cef8b1e7335"
# -- generated by .Values.commons.masterPassword
adminPassword: