fix(mycloud-nextcloud): use official helm-chart
This commit is contained in:
parent
fabb9118c6
commit
e1cdb09953
3 changed files with 44 additions and 57 deletions
|
@ -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: {{ . }}
|
||||
|
||||
{{- 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 }}
|
||||
wopi_url: "https://collabora.{{ $.Values.commons.ingress.domain }}"
|
||||
echo "--- disable: {{ $app }} ---"
|
||||
/var/www/html/occ app:disable {{ $app }}
|
||||
{{- 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 }}
|
||||
{{- 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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue