Skip to content

Commit

Permalink
dbp-moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
dbp-moodle-gha committed Nov 19, 2024
1 parent e3a8db6 commit 8e76a7a
Show file tree
Hide file tree
Showing 9 changed files with 115 additions and 60 deletions.
2 changes: 1 addition & 1 deletion automation/dbp-moodle/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ dependencies:
repository: https://burningalchemist.github.io/sql_exporter/
version: 0.6.1
digest: sha256:c2d696cb5b0cfe3096fabb66d1fbdf72969e84cf33898a25fd8f218e6bdca87b
generated: "2024-11-19T08:28:57.924552927Z"
generated: "2024-11-19T16:50:27.756670842Z"
4 changes: 2 additions & 2 deletions automation/dbp-moodle/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
appVersion: 4.1.14
appVersion: DBP-000
dependencies:
- name: moodle
repository: https://charts.bitnami.com/bitnami
Expand Down Expand Up @@ -47,4 +47,4 @@ description: 'This is a Helm Chart bundling some of the bitnami resources to dep
home: https://dbildungsplattform.github.io/dbp-moodle/
name: dbp-moodle
type: application
version: 0.0.11
version: 0.0.0-dbp-000-20241119-1650
66 changes: 41 additions & 25 deletions automation/dbp-moodle/README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion automation/dbp-moodle/scripts/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions automation/dbp-moodle/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -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 }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if and .Values.dbpMoodle.update_migration.enabled (not .Values.dbpMoodle.restore.enabled) }}
{{ if and .Values.dbpMoodle.updateMigration.enabled (not .Values.dbpMoodle.restore.enabled) }}
apiVersion: batch/v1
kind: Job
metadata:
Expand Down
5 changes: 3 additions & 2 deletions automation/dbp-moodle/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions automation/dbp-moodle/templates/pvcs/moodle-pvc.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
76 changes: 57 additions & 19 deletions automation/dbp-moodle/values.yaml
Original file line number Diff line number Diff line change
@@ -1,83 +1,112 @@
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

# -- The dbp update process to migrate moodle data when moodle versions are increased
update_migration:
# -- Settings specific to the umbrella chart
# -- Either extend functionality of one chart or connects/configures services from two charts
dbpMoodle:
# -- The dbp update process to migrate moodle data when container image versions are increased
updateMigration:
enabled: false

# -- disallows all egress from release namespace for the moodle deployment
# -- 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
Expand All @@ -96,7 +125,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"
Expand Down Expand Up @@ -203,10 +233,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
Expand Down

0 comments on commit 8e76a7a

Please sign in to comment.