Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into DBP-000-moodle_hotfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JannikBadenhop committed Nov 11, 2024
2 parents 0dce331 + 2339f05 commit 429c01c
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 3 deletions.
3 changes: 2 additions & 1 deletion charts/dbp-moodle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ The Chart can be deployed without any modification but it is advised to set own
| etherpadlite.volumes[0].secret.items[0].path | string | `"APIKEY.txt"` | |
| etherpadlite.volumes[0].secret.secretName | string | `"moodle"` | |
| global.kubectl_version | string | `"1.28.7"` | |
| global.moodlePlugins | object | `{"adaptable":{"enabled":false},"booking":{"enabled":false},"boost_magnific":{"enabled":false},"boost_union":{"enabled":false},"certificate":{"enabled":false},"choicegroup":{"enabled":false},"coursecertificate":{"enabled":false},"dash":{"enabled":false},"etherpadlite":{"enabled":false},"geogebra":{"enabled":false},"groupselect":{"enabled":false},"heartbeat":{"enabled":false},"hvp":{"enabled":false},"jitsi":{"enabled":false},"kaltura":{"enabled":false},"oidc":{"enabled":false},"pdfannotator":{"enabled":false},"reengagement":{"enabled":false},"remuiformat":{"enabled":false},"saml2":{"enabled":false},"sharing_cart":{"enabled":false},"skype":{"enabled":false},"snap":{"enabled":false},"staticpage":{"enabled":false},"tiles":{"enabled":false},"topcoll":{"enabled":false},"unilabel":{"enabled":false},"xp":{"enabled":false},"zoom":{"enabled":false}}` | All plugins are disabled by default. if enabled, the plugin is installed on image startup |
| global.moodlePlugins | object | `{"adaptable":{"enabled":false},"booking":{"enabled":false},"boost_magnific":{"enabled":false},"boost_union":{"enabled":false},"certificate":{"enabled":false},"choicegroup":{"enabled":false},"coursecertificate":{"enabled":false},"dash":{"enabled":false},"etherpadlite":{"enabled":false},"flexsections":{"enabled":false},"geogebra":{"enabled":false},"groupselect":{"enabled":false},"heartbeat":{"enabled":false},"hvp":{"enabled":false},"jitsi":{"enabled":false},"kaltura":{"enabled":false},"multitopic":{"enabled":false},"oidc":{"enabled":false},"pdfannotator":{"enabled":false},"reengagement":{"enabled":false},"remuiformat":{"enabled":false},"saml2":{"enabled":false},"sharing_cart":{"enabled":false},"skype":{"enabled":false},"snap":{"enabled":false},"staticpage":{"enabled":false},"tiles":{"enabled":false},"topcoll":{"enabled":false},"unilabel":{"enabled":false},"xp":{"enabled":false},"zoom":{"enabled":false}}` | All plugins are disabled by default. if enabled, the plugin is installed on image startup |
| global.storageClass | string | `"nfs-client"` | Default storage class, should support ReadWriteMany |
| mariadb.auth.database | string | `"moodle"` | |
| mariadb.auth.existingSecret | string | `"moodle"` | |
Expand Down Expand Up @@ -239,6 +239,7 @@ The Chart can be deployed without any modification but it is advised to set own
| moodle.ingress.annotations."nginx.ingress.kubernetes.io/proxy-connect-timeout" | string | `"30s"` | |
| moodle.ingress.annotations."nginx.ingress.kubernetes.io/proxy-read-timeout" | string | `"20s"` | |
| moodle.ingress.enabled | bool | `true` | |
| moodle.ingress.extraHosts | list | `[]` | Any additional hostnames, needs to be "name: URL" value pairs |
| moodle.ingress.hostname | string | `"example.de"` | The hostname of the moodle application |
| moodle.ingress.tls | bool | `true` | |
| moodle.mariadb | object | `{"enabled":false}` | The mariadb included in bitnami/moodle chart. For this chart usage of mariadb.enabled with moodle.externalDatabase.type="mariadb" is recommended |
Expand Down
4 changes: 4 additions & 0 deletions charts/dbp-moodle/scripts/hook/moodle-update-preparation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ set -o errexit
set -o nounset
set -o pipefail

health_file="/tmp/healthy"

get_current_deployment_image() {
kubectl get "deploy/{{ .Release.Name }}" -n "{{ .Release.Namespace }}" -o jsonpath='{..image}' |\
tr -s '[:space:]' '\n' |\
grep '{{- .Values.moodle.image.repository -}}'
}

touch "${health_file}"

printf "Checking if update preparations are needed\n"

new_image="{{- .Values.moodle.image.registry -}}/{{- .Values.moodle.image.repository -}}:{{- .Values.moodle.image.tag -}}"
Expand Down
3 changes: 2 additions & 1 deletion charts/dbp-moodle/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,6 @@ adaptable:theme_adaptable:theme/adaptable: {{- .Values.glob
boost_union:theme_boost_union:theme/boost_union: {{- .Values.global.moodlePlugins.boost_union.enabled }}{{"\n"}}
boost_magnific:theme_boost_magnific:theme/boost_magnific: {{- .Values.global.moodlePlugins.boost_magnific.enabled }}{{"\n"}}
snap:theme_snap:theme/snap: {{- .Values.global.moodlePlugins.snap.enabled }}{{"\n"}}

flexsections:format_flexsections:format/flexsections: {{- .Values.global.moodlePlugins.flexsections.enabled }}{{"\n"}}
multitopic:format_multitopic:format/multitopic: {{- .Values.global.moodlePlugins.multitopic.enabled }}{{"\n"}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ spec:
- name: script-volume
mountPath: /moodle-update-preparation.sh
subPath: moodle-update-preparation.sh
livenessProbe:
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds: 10
periodSeconds: 10
affinity: {{ .Values.dbpMoodle.moodleUpdatePreparationJob.affinity | toYaml }}
tolerations: {{ .Values.dbpMoodle.moodleUpdatePreparationJob.tolerations | toYaml }}
serviceAccountName: "{{ .Release.Name }}-moodle-update-preparation-hook-serviceaccount"
Expand Down
6 changes: 6 additions & 0 deletions charts/dbp-moodle/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ global:
enabled: false
snap:
enabled: false
flexsections:
enabled: false
multitopic:
enabled: false

dbpMoodle:
name: infra
Expand Down Expand Up @@ -272,6 +276,8 @@ moodle:
enabled: true
# -- The hostname of the moodle application
hostname: "example.de"
# -- Any additional hostnames, needs to be "name: URL" value pairs
extraHosts: []
tls: true
annotations:
cert-manager.io/cluster-issuer: sc-cert-manager-clusterissuer-letsencrypt
Expand Down
4 changes: 3 additions & 1 deletion moodle/scripts/install/downloadPlugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,6 @@ moosh plugin-download -v "$major_minor" mod_coursecertificate
moosh plugin-download -v "$major_minor" theme_adaptable
moosh plugin-download -v "$major_minor" theme_boost_union
moosh plugin-download -v "$major_minor" theme_boost_magnific
moosh plugin-download -v "$major_minor" theme_snap
moosh plugin-download -v "$major_minor" theme_snap
moosh plugin-download -v "$major_minor" theme_flexsections
moosh plugin-download -v "$major_minor" theme_multitopic
2 changes: 2 additions & 0 deletions moodle/scripts/test/test-plugin-install-uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ adaptable:theme_adaptable:theme/adaptable
boost_union:theme_boost_union:theme/boost_union
boost_magnific:theme_boost_magnific:theme/boost_magnific
snap:theme_snap:theme/snap
flexsections:format_flexsections:format/flexsections
multitopic:format_multitopic:format/multitopic
EOF
)

Expand Down

0 comments on commit 429c01c

Please sign in to comment.