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

View file

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

View file

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