fix(mycloud-nextcloud): update

This commit is contained in:
WrenIX 2024-02-02 11:30:49 +01:00
parent d1baf04a2b
commit b1600ed81a
Signed by: wrenix
GPG key ID: 7AFDB012974B1BB5
3 changed files with 52 additions and 37 deletions

View file

@ -233,7 +233,7 @@ image::https://img.shields.io/badge/Version-application-informational?style=flat
| helm.nextcloud.chart | helm.nextcloud.chart
| string | string
| `"a4fb1cb316b1184c82637b59e0166030fd35728c"` | `"6378227fe4a3b36c9d968e6ece377036b6c2df1a"`
| version of the helm chart (current on git) | version of the helm chart (current on git)
| ingress.annotations | ingress.annotations
@ -295,6 +295,11 @@ image::https://img.shields.io/badge/Version-application-informational?style=flat
| string | string
| `nil` | `nil`
| default quota for an user | default quota for an user
| theme.color
| string
| `nil`
| set theme color in nextcloud
|=== |===
Autogenerated from chart metadata using https://github.com/norwoodj/helm-docs[helm-docs] Autogenerated from chart metadata using https://github.com/norwoodj/helm-docs[helm-docs]

View file

@ -79,6 +79,51 @@ spec:
mountPath: /var/www/html/config mountPath: /var/www/html/config
subPath: "config" subPath: "config"
{{- end }} {{- end }}
extraEnv:
- name: NC_HOOK_OIDC_CLIENT_ID
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-auth-authentik-application
key: clientID
- name: NC_HOOK_OIDC_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-auth-authentik-application
key: clientSecret
hooks:
# docu for theming: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/theming.html#configure-theming-through-cli
# /var/www/html/occ theming:config logo "{{ .Values.commons.theme.logo }}";
#
# TODO add group mapping after fix is there
# https://github.com/nextcloud/user_oidc/issues/744
# 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:";
/var/www/html/occ user_oidc:provider mycloud \
--clientid $NC_HOOK_OIDC_CLIENT_ID \
--clientsecret $NC_HOOK_OIDC_CLIENT_SECRET \
--discoveryuri "https://{{ .Values.commons.auth.host | default (printf "auth.%s" .Values.commons.ingress.domain) }}/application/o/mycloud-nextcloud/.well-known/openid-configuration" \
--scope "openid email profile" \
--extra-claims=scope \
--mapping-uid={{ .Values.auth.idMapping }} \
--mapping-email=email \
--mapping-display-name=name \
--mapping-quota=quota \
--mapping-groups=groups \
--check-bearer=true \
--unique-uid=0;
appManagement: appManagement:
enabled: true enabled: true
@ -112,41 +157,6 @@ spec:
{{- toYaml . | nindent 10 }} {{- toYaml . | nindent 10 }}
{{- end }} {{- end }}
hooks:
before-starting:
# docu for theming: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/theming.html#configure-theming-through-cli
# /var/www/html/occ theming:config logo "{{ .Values.commons.theme.logo }}";
#
# TODO add group mapping after fix is there
# https://github.com/nextcloud/user_oidc/issues/744
# https://codeberg.org/wrenix/flux-charts/issues/7
shell: |-
#!/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:";
/var/www/html/occ user_oidc:provider mycloud \
--clientid {{ .Values.auth.clientID | default (derivePassword 1 "long" .Values.commons.masterPassword "nextcloud" "auth.clientID") | squote }} \
--clientsecret {{ .Values.auth.clientSecret | default (derivePassword 1 "long" .Values.commons.masterPassword "nextcloud" "auth.clientSecret") | squote }} \
--discoveryuri "https://{{ .Values.commons.auth.host | default (printf "auth.%s" .Values.commons.ingress.domain) }}/application/o/mycloud-nextcloud/.well-known/openid-configuration" \
--scope "openid email profile" \
--extra-claims=scope \
--mapping-uid={{ .Values.auth.idMapping }} \
--mapping-email=email \
--mapping-display-name=name \
--mapping-quota=quota \
--mapping-groups=groups \
--check-bearer=true \
--unique-uid=0;
phpClientHttpsFix: phpClientHttpsFix:
enabled: true enabled: true

View file

@ -54,7 +54,7 @@ commons:
helm: helm:
nextcloud: nextcloud:
# -- version of the helm chart (current on git) # -- version of the helm chart (current on git)
chart: "a4fb1cb316b1184c82637b59e0166030fd35728c" chart: "6378227fe4a3b36c9d968e6ece377036b6c2df1a"
# -- generated by .Values.commons.masterPassword # -- generated by .Values.commons.masterPassword
adminPassword: adminPassword: