diff --git a/charts/dbp-moodle/README.md b/charts/dbp-moodle/README.md index 54a0490..d4c3291 100644 --- a/charts/dbp-moodle/README.md +++ b/charts/dbp-moodle/README.md @@ -95,7 +95,8 @@ The Chart can be deployed without any modification but it is advised to set own | backup-cronjob.serviceAccount.create | bool | `false` | | | backup-cronjob.serviceAccount.name | string | `"moodle-backup-job"` | | | backup-cronjob.tolerations | list | `[]` | | -| dbpMoodle.allowInternalNetworkingOnly | bool | `false` | disallows all egress from release namespace for the moodle deployment | +| dbpMoodle | object | `{"allowInternalNetworkingOnly":false,"backup":{"cluster_name":"","enabled":false,"endpoint":"","gpg_key_names":"","gpgkeys":{"existingSecret":"","gpgkey.dbpinfra.pub.asc":"","gpgkey.dbpinfra.sec.asc":""},"max_full_backup_age":"1W","retention_time":"6M","rules":[{"apiGroups":["apps"],"resources":["deployments"],"verbs":["get","patch","list","watch"]},{"apiGroups":["batch"],"resources":["cronjobs","jobs"],"verbs":["get","patch"]}],"s3_bucket_name":"","s3_certificate_secret":{"enabled":false,"key":"certificate.crt","mountpath":"/certs","name":"s3-certificate"},"secrets":{"existingSecret":"","s3_access_key":"","s3_access_secret":"","s3_endpoint_url":""}},"hpa":{"deployment_name_ref":"moodle","enabled":false,"max_replicas":4,"min_replicas":1,"scale_down_stabilization_window_seconds":0,"scale_up_stabilization_window_seconds":0,"scaledown_cooldown":60,"scaledown_value":25,"scaleup_cooldown":15,"scaleup_value":50,"target_average_cpu_utilization":50},"moodleExternalPVC":{"accessModes":["ReadWriteMany"],"annotations":{"helm.sh/resource-policy":"keep"},"enabled":true,"name":"moodle-data","size":"8Gi","storage_class":"nfs-client"},"moodleUpdatePreparationHook":{"rules":[{"apiGroups":["apps"],"resources":["deployments"],"verbs":["get","patch"]},{"apiGroups":["batch"],"resources":["cronjobs","jobs"],"verbs":["get","list","create","patch","watch"]}]},"moodleUpdatePreparationJob":{"affinity":{},"enabled":false,"image":"moodle-tools","repository":"ghcr.io/dbildungsplattform","resources":{},"tag":"1.0.8","tolerations":[]},"moodlecronjob":{"rules":[{"apiGroups":[""],"resources":["pods","pods/exec"],"verbs":["get","list","create","watch"]}],"wait_timeout":"15m"},"phpConfig":{"additional":"","debug":false,"existingConfig":"","extendedLogging":false},"redis":{"host":"moodle-redis-master","password":"","port":6379},"restore":{"affinity":{},"enabled":false,"existingSecretDatabaseConfig":"moodle-database","existingSecretDatabasePassword":"moodle","existingSecretGPG":"","existingSecretKeyDatabasePassword":"","existingSecretKeyS3Access":"","existingSecretKeyS3Secret":"","existingSecretS3":"","image":"moodle-tools","repository":"ghcr.io/dbildungsplattform","resources":{"limits":{"cpu":"2000m","memory":"16Gi"},"requests":{"cpu":"1000m","memory":"8Gi"}},"rules":[{"apiGroups":["apps"],"resources":["deployments/scale","deployments"],"verbs":["get","list","scale","patch"]}],"tag":"1.0.8","tolerations":[]},"secrets":{"database_password":"","database_root_password":"","etherpad_api_key":"","etherpad_postgresql_password":"","moodle_password":"","useChartSecret":true}}` | Settings specific to the umbrella chart -- Either extend functionality of one chart or connects/configures services from two charts | +| dbpMoodle.allowInternalNetworkingOnly | bool | `false` | Disallows all egress from release namespace for the moodle deployment | | dbpMoodle.backup | object | `{"cluster_name":"","enabled":false,"endpoint":"","gpg_key_names":"","gpgkeys":{"existingSecret":"","gpgkey.dbpinfra.pub.asc":"","gpgkey.dbpinfra.sec.asc":""},"max_full_backup_age":"1W","retention_time":"6M","rules":[{"apiGroups":["apps"],"resources":["deployments"],"verbs":["get","patch","list","watch"]},{"apiGroups":["batch"],"resources":["cronjobs","jobs"],"verbs":["get","patch"]}],"s3_bucket_name":"","s3_certificate_secret":{"enabled":false,"key":"certificate.crt","mountpath":"/certs","name":"s3-certificate"},"secrets":{"existingSecret":"","s3_access_key":"","s3_access_secret":"","s3_endpoint_url":""}}` | Backup configuration. Set enabled=true to enable the backup-cronjob. Also set s3 location credentials | | dbpMoodle.backup.gpgkeys.existingSecret | string | `""` | Existing secret for gpg keys | | dbpMoodle.backup.max_full_backup_age | string | `"1W"` | Defines the maximum age of a full backup before a new full backup is created. The backups in between are incremental | @@ -104,33 +105,20 @@ The Chart can be deployed without any modification but it is advised to set own | dbpMoodle.backup.s3_certificate_secret.key | string | `"certificate.crt"` | Path where the certificate is mounted | | dbpMoodle.backup.secrets | object | `{"existingSecret":"","s3_access_key":"","s3_access_secret":"","s3_endpoint_url":""}` | Either provide an existing secret, or set each secret value here. If both are set the existingSecret is used | | dbpMoodle.backup.secrets.existingSecret | string | `""` | Existing secret for s3 endpoint | -| dbpMoodle.external_pvc.accessModes[0] | string | `"ReadWriteMany"` | | -| dbpMoodle.external_pvc.annotations."helm.sh/resource-policy" | string | `"keep"` | | -| dbpMoodle.external_pvc.enabled | bool | `true` | | -| dbpMoodle.external_pvc.name | string | `"moodle-data"` | | -| dbpMoodle.external_pvc.size | string | `"8Gi"` | | -| dbpMoodle.external_pvc.storage_class | string | `"nfs-client"` | | -| dbpMoodle.hpa | object | `{"average_cpu_utilization":50,"deployment_name_ref":"moodle","enabled":false,"max_replicas":4,"min_replicas":1,"scaledown_cooldown":60,"scaledown_value":25,"scaleup_cooldown":15,"scaleup_value":50}` | Horizontal pod autoscaling values | +| dbpMoodle.hpa | object | `{"deployment_name_ref":"moodle","enabled":false,"max_replicas":4,"min_replicas":1,"scale_down_stabilization_window_seconds":0,"scale_up_stabilization_window_seconds":0,"scaledown_cooldown":60,"scaledown_value":25,"scaleup_cooldown":15,"scaleup_value":50,"target_average_cpu_utilization":50}` | Horizontal pod autoscaling values | +| dbpMoodle.hpa.deployment_name_ref | string | `"moodle"` | The deployment to scale | +| dbpMoodle.hpa.max_replicas | int | `4` | Maximum replicas of deployment | +| dbpMoodle.hpa.min_replicas | int | `1` | Minimum replicas of deployment | | dbpMoodle.hpa.scaledown_cooldown | int | `60` | How many seconds to wait between downscaling adjustments | | dbpMoodle.hpa.scaledown_value | int | `25` | The max amount in percent to scale down in one step per cooldown period | | dbpMoodle.hpa.scaleup_cooldown | int | `15` | How many seconds to wait between upscaling adjustments | | dbpMoodle.hpa.scaleup_value | int | `50` | The max amount in percent to scale up in one step per cooldown period | -| dbpMoodle.moodleUpdatePreparationHook.rules[0].apiGroups[0] | string | `"apps"` | | -| dbpMoodle.moodleUpdatePreparationHook.rules[0].resources[0] | string | `"deployments"` | | -| dbpMoodle.moodleUpdatePreparationHook.rules[0].verbs[0] | string | `"get"` | | -| dbpMoodle.moodleUpdatePreparationHook.rules[0].verbs[1] | string | `"patch"` | | -| dbpMoodle.moodleUpdatePreparationHook.rules[1].apiGroups[0] | string | `"batch"` | | -| dbpMoodle.moodleUpdatePreparationHook.rules[1].resources[0] | string | `"cronjobs"` | | -| dbpMoodle.moodleUpdatePreparationHook.rules[1].resources[1] | string | `"jobs"` | | -| dbpMoodle.moodleUpdatePreparationHook.rules[1].verbs[0] | string | `"get"` | | -| dbpMoodle.moodleUpdatePreparationHook.rules[1].verbs[1] | string | `"list"` | | -| dbpMoodle.moodleUpdatePreparationHook.rules[1].verbs[2] | string | `"create"` | | -| dbpMoodle.moodleUpdatePreparationHook.rules[1].verbs[3] | string | `"patch"` | | -| dbpMoodle.moodleUpdatePreparationHook.rules[1].verbs[4] | string | `"watch"` | | -| dbpMoodle.moodleUpdatePreparationJob | object | `{"affinity":{},"enabled":false,"image":"moodle-tools","repository":"ghcr.io/dbildungsplattform","resources":{},"tag":"1.0.8","tolerations":[]}` | A preperation job which disables the php-cronjob, scales down the deployment and creates a backup if dbpMoodle.backup.enabled=true | +| dbpMoodle.hpa.target_average_cpu_utilization | int | `50` | The average cpu utilization of all pods in deployment to aim for, if exceeded for stabilization_window_seconds the deployment is scaled | +| dbpMoodle.moodleExternalPVC | object | `{"accessModes":["ReadWriteMany"],"annotations":{"helm.sh/resource-policy":"keep"},"enabled":true,"name":"moodle-data","size":"8Gi","storage_class":"nfs-client"}` | Creates a PVC for the moodle chart, this allows for additional configuration | +| dbpMoodle.moodleUpdatePreparationJob | object | `{"affinity":{},"enabled":false,"image":"moodle-tools","repository":"ghcr.io/dbildungsplattform","resources":{},"tag":"1.0.8","tolerations":[]}` | The dbp update process to migrate moodle data when container image versions are increased -- A preperation job which disables the php-cronjob, scales down the deployment and creates a backup if dbpMoodle.backup.enabled=true | | dbpMoodle.moodleUpdatePreparationJob.repository | string | `"ghcr.io/dbildungsplattform"` | Which kubectl image to use | | dbpMoodle.moodlecronjob | object | `{"rules":[{"apiGroups":[""],"resources":["pods","pods/exec"],"verbs":["get","list","create","watch"]}],"wait_timeout":"15m"}` | Configuration for the moodle-cronjob which runs moodles cron.php. This is required since moodle does not run as root | -| dbpMoodle.name | string | `"infra"` | | +| dbpMoodle.phpConfig | object | `{"additional":"","debug":false,"existingConfig":"","extendedLogging":false}` | These settings affect the config.php of the moodle container | | dbpMoodle.phpConfig.additional | string | `""` | Any additional text to be included into the config.php | | dbpMoodle.phpConfig.debug | bool | `false` | Moodle debugging is not safe for production | | dbpMoodle.phpConfig.existingConfig | string | `""` | Provide an existing secret containing the config.php instead of generating it from chart -- Remember to adjust moodle.extraVolumes & moodle.extraVolumeMounts when setting this. -- Secret key is by default expected to be config.php | @@ -138,7 +126,6 @@ The Chart can be deployed without any modification but it is advised to set own | dbpMoodle.redis | object | `{"host":"moodle-redis-master","password":"","port":6379}` | Configurations for the optional redis | | dbpMoodle.restore | object | `{"affinity":{},"enabled":false,"existingSecretDatabaseConfig":"moodle-database","existingSecretDatabasePassword":"moodle","existingSecretGPG":"","existingSecretKeyDatabasePassword":"","existingSecretKeyS3Access":"","existingSecretKeyS3Secret":"","existingSecretS3":"","image":"moodle-tools","repository":"ghcr.io/dbildungsplattform","resources":{"limits":{"cpu":"2000m","memory":"16Gi"},"requests":{"cpu":"1000m","memory":"8Gi"}},"rules":[{"apiGroups":["apps"],"resources":["deployments/scale","deployments"],"verbs":["get","list","scale","patch"]}],"tag":"1.0.8","tolerations":[]}` | This restores moodle to the latest snapshot. Requires an existing s3 backup. ONLY USE FOR ROLLBACK | | dbpMoodle.secrets | object | `{"database_password":"","database_root_password":"","etherpad_api_key":"","etherpad_postgresql_password":"","moodle_password":"","useChartSecret":true}` | Creates a secret with all relevant credentials for moodle -- Set useChartSecret: false to provide your own secret -- If you create your own secret, also set moodle.existingSecret (and moodle.externalDatabase.existingSecret if you bring your own DB) | -| dbpMoodle.stage | string | `"infra"` | | | etherpad-postgresql.auth.database | string | `"etherpad"` | | | etherpad-postgresql.auth.enablePostgresUser | bool | `false` | | | etherpad-postgresql.auth.existingSecret | string | `"moodle"` | | @@ -192,8 +179,37 @@ The Chart can be deployed without any modification but it is advised to set own | etherpadlite.volumes[0].secret.items[0].key | string | `"etherpad-api-key"` | | | 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},"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.moodlePlugins | object | `{"adaptable":{"enabled":false},"booking":{"enabled":false},"boost_magnific":{"enabled":false},"boost_union":{"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}}` | Moodle Plugins that are enabled will be installed on container startup -- If a plugin is changed from enabled to disabled, or vice versa, with an upgrade, the plugin will be installed/ uninstalled to match the new state | +| global.moodlePlugins.adaptable | object | `{"enabled":false}` | [Adaptable](https://moodle.org/plugins/theme_adaptable) | +| global.moodlePlugins.booking | object | `{"enabled":false}` | [Booking](https://moodle.org/plugins/mod_booking) | +| global.moodlePlugins.boost_magnific | object | `{"enabled":false}` | [Boost Magnific](https://moodle.org/plugins/theme_boost_magnific) | +| global.moodlePlugins.boost_union | object | `{"enabled":false}` | [Boost Union](https://moodle.org/plugins/theme_boost_union) | +| global.moodlePlugins.choicegroup | object | `{"enabled":false}` | [Group choice](https://moodle.org/plugins/mod_choicegroup) | +| global.moodlePlugins.coursecertificate | object | `{"enabled":false}` | [Workplace course certificate](https://moodle.org/plugins/mod_coursecertificate) | +| global.moodlePlugins.dash | object | `{"enabled":false}` | [Dash](https://moodle.org/plugins/block_dash) | +| global.moodlePlugins.etherpadlite | object | `{"enabled":false}` | [Etherpad Lite](https://moodle.org/plugins/mod_etherpadlite) | +| global.moodlePlugins.flexsections | object | `{"enabled":false}` | [Flexible sections format](https://moodle.org/plugins/format_flexsections) | +| global.moodlePlugins.geogebra | object | `{"enabled":false}` | [GeoGebra](https://moodle.org/plugins/mod_geogebra) | +| global.moodlePlugins.groupselect | object | `{"enabled":false}` | [Group self-selection](https://moodle.org/plugins/mod_groupselect) | +| global.moodlePlugins.heartbeat | object | `{"enabled":false}` | [Heartbeat check](https://moodle.org/plugins/tool_heartbeat) | +| global.moodlePlugins.hvp | object | `{"enabled":false}` | [Interactive Content – H5P](https://moodle.org/plugins/mod_hvp) | +| global.moodlePlugins.jitsi | object | `{"enabled":false}` | [Jitsi](https://moodle.org/plugins/mod_jitsi) | +| global.moodlePlugins.kaltura | object | `{"enabled":false}` | [Kaltura Video Package](https://moodle.org/plugins/view.php?id=447) | +| global.moodlePlugins.multitopic | object | `{"enabled":false}` | [Multitopic format](https://moodle.org/plugins/format_multitopic) | +| global.moodlePlugins.oidc | object | `{"enabled":false}` | [OpenID Connect](https://moodle.org/plugins/auth_oidc) | +| global.moodlePlugins.pdfannotator | object | `{"enabled":false}` | [PDF Annotation](https://moodle.org/plugins/mod_pdfannotator) | +| global.moodlePlugins.reengagement | object | `{"enabled":false}` | [Reengagement](https://moodle.org/plugins/mod_reengagement) | +| global.moodlePlugins.remuiformat | object | `{"enabled":false}` | [Edwiser Course Formats](https://moodle.org/plugins/format_remuiformat) | +| global.moodlePlugins.saml2 | object | `{"enabled":false}` | [SAML2 Single sign on](https://moodle.org/plugins/auth_saml2) | +| global.moodlePlugins.sharing_cart | object | `{"enabled":false}` | [Sharing Cart](https://moodle.org/plugins/block_sharing_cart) | +| global.moodlePlugins.skype | object | `{"enabled":false}` | [Skype](https://moodle.org/plugins/mod_skype) | +| global.moodlePlugins.snap | object | `{"enabled":false}` | [Snap](https://moodle.org/plugins/theme_snap) | +| global.moodlePlugins.staticpage | object | `{"enabled":false}` | [Static Pages](https://moodle.org/plugins/local_staticpage) | +| global.moodlePlugins.tiles | object | `{"enabled":false}` | [Tiles format](https://moodle.org/plugins/format_tiles) | +| global.moodlePlugins.topcoll | object | `{"enabled":false}` | [Collapsed Topics](https://moodle.org/plugins/format_topcoll) | +| global.moodlePlugins.unilabel | object | `{"enabled":false}` | [Unilabel](https://moodle.org/plugins/mod_unilabel) | +| global.moodlePlugins.xp | object | `{"enabled":false}` | [Level Up XP - Gamification](https://moodle.org/plugins/block_xp) | +| global.moodlePlugins.zoom | object | `{"enabled":false}` | [Zoom meeting](https://moodle.org/plugins/mod_zoom) | | global.storageClass | string | `"nfs-client"` | Default storage class, should support ReadWriteMany | | mariadb.auth.database | string | `"moodle"` | | | mariadb.auth.existingSecret | string | `"moodle"` | | diff --git a/charts/dbp-moodle/scripts/config.php b/charts/dbp-moodle/scripts/config.php index a149abb..b161375 100644 --- a/charts/dbp-moodle/scripts/config.php +++ b/charts/dbp-moodle/scripts/config.php @@ -30,7 +30,7 @@ $CFG->session_redis_host = '{{ .Values.dbpMoodle.redis.host }}'; $CFG->session_redis_port = {{ .Values.dbpMoodle.redis.port }}; $CFG->session_redis_database = 0; -$CFG->session_redis_auth = '{{ .Values.dbpMoodle.redis.password }}'; +$CFG->session_redis_auth = '{{ include "dbpMoodle.secrets.redis_password" . }}'; $CFG->session_redis_prefix = 'mdl_'; $CFG->session_redis_acquire_lock_timeout = 60; $CFG->session_redis_acquire_lock_warn = 0; diff --git a/charts/dbp-moodle/templates/_helpers.tpl b/charts/dbp-moodle/templates/_helpers.tpl index eb8036e..122c949 100644 --- a/charts/dbp-moodle/templates/_helpers.tpl +++ b/charts/dbp-moodle/templates/_helpers.tpl @@ -1,6 +1,6 @@ {{- define "dbpMoodle.moodlePvc.name" -}} -{{- if .Values.dbpMoodle.external_pvc.enabled }} -{{- .Values.dbpMoodle.external_pvc.name -}} +{{- if .Values.dbpMoodle.moodleExternalPVC.enabled }} +{{- .Values.dbpMoodle.moodleExternalPVC.name -}} {{- else if .Values.moodle.persistence.enabled }} {{- .Release.Name }}-moodle {{- else }} diff --git a/charts/dbp-moodle/templates/chart-hooks/moodle-update-preparation-job.yaml b/charts/dbp-moodle/templates/chart-hooks/moodle-update-preparation-job.yaml index 09ee60a..86434e8 100644 --- a/charts/dbp-moodle/templates/chart-hooks/moodle-update-preparation-job.yaml +++ b/charts/dbp-moodle/templates/chart-hooks/moodle-update-preparation-job.yaml @@ -1,4 +1,4 @@ -{{ if and .Values.dbpMoodle.moodleUpdatePreparationJob.enabled (not .Values.dbpMoodle.restore.enabled) }} +{{ if and .Values.dbpMoodle.updateMigration.enabled (not .Values.dbpMoodle.restore.enabled) }} apiVersion: batch/v1 kind: Job metadata: diff --git a/charts/dbp-moodle/templates/hpa.yaml b/charts/dbp-moodle/templates/hpa.yaml index 1a91267..6d2689e 100644 --- a/charts/dbp-moodle/templates/hpa.yaml +++ b/charts/dbp-moodle/templates/hpa.yaml @@ -17,16 +17,17 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.dbpMoodle.hpa.average_cpu_utilization }} + averageUtilization: {{ .Values.dbpMoodle.hpa.target_average_cpu_utilization }} behavior: scaleUp: - stabilizationWindowSeconds: 0 + stabilizationWindowSeconds: {{ .Values.dbpMoodle.hpa.scale_up_stabilization_window_seconds }} selectPolicy: Max policies: - type: Percent value: {{ .Values.dbpMoodle.hpa.scaleup_value }} periodSeconds: {{ .Values.dbpMoodle.hpa.scaleup_cooldown }} scaleDown: + stabilizationWindowSeconds: {{ .Values.dbpMoodle.hpa.scale_down_stabilization_window_seconds }} selectPolicy: Max policies: - type: Percent diff --git a/charts/dbp-moodle/templates/pvcs/moodle-pvc.yaml b/charts/dbp-moodle/templates/pvcs/moodle-pvc.yaml index 10ea76f..0cb05b9 100644 --- a/charts/dbp-moodle/templates/pvcs/moodle-pvc.yaml +++ b/charts/dbp-moodle/templates/pvcs/moodle-pvc.yaml @@ -1,22 +1,22 @@ -{{- if .Values.dbpMoodle.external_pvc.enabled -}} +{{- if .Values.dbpMoodle.moodleExternalPVC.enabled -}} apiVersion: v1 kind: PersistentVolumeClaim metadata: annotations: - {{- with .Values.dbpMoodle.external_pvc.annotations }} + {{- with .Values.dbpMoodle.moodleExternalPVC.annotations }} {{- toYaml . | nindent 4 }} {{- end }} - name: "{{ .Values.dbpMoodle.external_pvc.name }}" + name: "{{ .Values.dbpMoodle.moodleExternalPVC.name }}" namespace: "{{ .Release.Namespace }}" spec: - storageClassName: "{{ .Values.dbpMoodle.external_pvc.storage_class }}" + storageClassName: "{{ .Values.dbpMoodle.moodleExternalPVC.storage_class }}" accessModes: - {{- if not (empty .Values.dbpMoodle.external_pvc.accessModes) }} - {{- range .Values.dbpMoodle.external_pvc.accessModes }} + {{- if not (empty .Values.dbpMoodle.moodleExternalPVC.accessModes) }} + {{- range .Values.dbpMoodle.moodleExternalPVC.accessModes }} - {{ . | quote }} {{- end }} {{- end }} resources: requests: - storage: "{{ .Values.dbpMoodle.external_pvc.size }}" + storage: "{{ .Values.dbpMoodle.moodleExternalPVC.size }}" {{- end }} \ No newline at end of file diff --git a/charts/dbp-moodle/values.yaml b/charts/dbp-moodle/values.yaml index 5754d0e..a9939e1 100644 --- a/charts/dbp-moodle/values.yaml +++ b/charts/dbp-moodle/values.yaml @@ -1,79 +1,108 @@ global: - kubectl_version: "1.28.7" # -- Default storage class, should support ReadWriteMany storageClass: "nfs-client" - # -- All plugins are disabled by default. if enabled, the plugin is installed on image startup + # -- Moodle Plugins that are enabled will be installed on container startup + # -- If a plugin is changed from enabled to disabled, or vice versa, with an upgrade, the plugin will be installed/ uninstalled to match the new state moodlePlugins: + # -- [Kaltura Video Package](https://moodle.org/plugins/view.php?id=447) kaltura: enabled: false + # -- [Etherpad Lite](https://moodle.org/plugins/mod_etherpadlite) etherpadlite: enabled: false + # -- [Interactive Content – H5P](https://moodle.org/plugins/mod_hvp) hvp: enabled: false + # -- [Group self-selection](https://moodle.org/plugins/mod_groupselect) groupselect: enabled: false - jitsi: - enabled: false + # -- [PDF Annotation](https://moodle.org/plugins/mod_pdfannotator) pdfannotator: enabled: false - tiles: + # -- [Jitsi](https://moodle.org/plugins/mod_jitsi) + jitsi: enabled: false + # -- [Skype](https://moodle.org/plugins/mod_skype) skype: enabled: false + # -- [Zoom meeting](https://moodle.org/plugins/mod_zoom) zoom: enabled: false + # -- [Booking](https://moodle.org/plugins/mod_booking) booking: enabled: false + # -- [Reengagement](https://moodle.org/plugins/mod_reengagement) reengagement: enabled: false + # -- [Unilabel](https://moodle.org/plugins/mod_unilabel) unilabel: enabled: false + # -- [GeoGebra](https://moodle.org/plugins/mod_geogebra) geogebra: enabled: false + # -- [Group choice](https://moodle.org/plugins/mod_choicegroup) choicegroup: enabled: false + # -- [Static Pages](https://moodle.org/plugins/local_staticpage) staticpage: enabled: false + # -- [Heartbeat check](https://moodle.org/plugins/tool_heartbeat) heartbeat: enabled: false + # -- [Edwiser Course Formats](https://moodle.org/plugins/format_remuiformat) remuiformat: enabled: false + # -- [Tiles format](https://moodle.org/plugins/format_tiles) + tiles: + enabled: false + # -- [Collapsed Topics](https://moodle.org/plugins/format_topcoll) topcoll: enabled: false + # -- [Flexible sections format](https://moodle.org/plugins/format_flexsections) + flexsections: + enabled: false + # -- [Multitopic format](https://moodle.org/plugins/format_multitopic) + multitopic: + enabled: false + # -- [OpenID Connect](https://moodle.org/plugins/auth_oidc) oidc: enabled: false + # -- [SAML2 Single sign on](https://moodle.org/plugins/auth_saml2) saml2: enabled: false + # -- [Dash](https://moodle.org/plugins/block_dash) dash: enabled: false + # -- [Sharing Cart](https://moodle.org/plugins/block_sharing_cart) sharing_cart: enabled: false + # -- [Level Up XP - Gamification](https://moodle.org/plugins/block_xp) xp: enabled: false - certificate: - enabled: false + # -- [Workplace course certificate](https://moodle.org/plugins/mod_coursecertificate) coursecertificate: enabled: false + # -- [Adaptable](https://moodle.org/plugins/theme_adaptable) adaptable: enabled: false + # -- [Boost Union](https://moodle.org/plugins/theme_boost_union) boost_union: enabled: false + # -- [Boost Magnific](https://moodle.org/plugins/theme_boost_magnific) boost_magnific: enabled: false + # -- [Snap](https://moodle.org/plugins/theme_snap) snap: enabled: false - flexsections: - enabled: false - multitopic: - enabled: false -dbpMoodle: - name: infra - stage: infra - # -- disallows all egress from release namespace for the moodle deployment +# -- Settings specific to the umbrella chart +# -- Either extend functionality of one chart or connects/configures services from two charts +dbpMoodle: + # -- Disallows all egress from release namespace for the moodle deployment allowInternalNetworkingOnly: false + # -- These settings affect the config.php of the moodle container phpConfig: # -- Extended php logging extendedLogging: false @@ -92,7 +121,8 @@ dbpMoodle: port: 6379 password: "" - external_pvc: + # -- Creates a PVC for the moodle chart, this allows for additional configuration + moodleExternalPVC: enabled: true name: "moodle-data" size: "8Gi" @@ -112,6 +142,7 @@ dbpMoodle: etherpad_postgresql_password: "" etherpad_api_key: "" + # -- The dbp update process to migrate moodle data when container image versions are increased # -- A preperation job which disables the php-cronjob, scales down the deployment and creates a backup if dbpMoodle.backup.enabled=true moodleUpdatePreparationJob: enabled: false @@ -210,10 +241,18 @@ dbpMoodle: # -- Horizontal pod autoscaling values hpa: enabled: false + # -- The deployment to scale deployment_name_ref: "moodle" + # -- Minimum replicas of deployment min_replicas: 1 + # -- Maximum replicas of deployment max_replicas: 4 - average_cpu_utilization: 50 + # -- The average cpu utilization of all pods in deployment to aim for, if exceeded for stabilization_window_seconds the deployment is scaled + target_average_cpu_utilization: 50 + # How long to wait before scaling up when utilization exceeds target_average_cpu_utilization + scale_up_stabilization_window_seconds: 0 + # How long to wait before scaling down when utilization is below target_average_cpu_utilization + scale_down_stabilization_window_seconds: 0 # -- The max amount in percent to scale down in one step per cooldown period scaledown_value: 25 # -- How many seconds to wait between downscaling adjustments