### camelCase --- apiVersion: m4e.krestomat.io/v1alpha1 kind: Moodle metadata: # name should be less than 26 characters name: moodle-sample spec: ## Moodle new instance # moodleNewInstance: true moodleNewInstanceAgreeLicense: true moodleNewInstanceFullname: Demo site moodleNewInstanceShortname: demo moodleNewInstanceSummary: A demo site ## Admin credentials. MUST CHANGED moodleNewInstanceAdminuser: admin moodleNewInstanceAdminmail: admin@example.com ## Set a new admin password with a BCrypt compatible hash. Example for 'changeme' hash as password: moodleNewAdminpassHash: $2b$10$zbRuwPil1wNWQUkvlkchwe3/rOljJvoheydndKH1X0bdIIigy0xim ## Database connection and credentials ### You could use postgres-operator (see below for section "Other integrations" about how to do so). ### Otherwise, set the following variables for a connection to a running db instance: # moodleConfigDbhost: dbHost # moodleConfigDbname: dbName # moodleConfigDbuser: dbUser # moodleConfigDbpass: dbPass ## Moodle config.php # moodleConfigAdditionalCfg: # property_name_one: "one" # property_name_two: 2 # moodleConfigAdditionalBlock: | # $CFG->property_name_one = 'value'; # $CFG->property_name_two = 2; ## Whether the operator do minor and major updates as soon as version code in images changes ## Default is: # moodleUpdateMinor: true # moodleUpdateMajor: false ## Moodle host and protocol. Default is 'http' # moodleHost: "m4e.krestomat.io" # moodleProtocol: http ## Moodledata storage # moodlePvcDataStorageAccessMode: ReadWriteOnce # moodlePvcDataStorageClassName: standard ### Autoexpansion: if storage available is less than 20% or 'moodlePvcDataAutoexpansionIncrementGib', adjust PVC storage size according to 'moodlePvcDataAutoexpansionIncrementGib' and 'moodlePvcDataAutoexpansionCapGib': # * Kubernetes cluster and PVC must support expansion of volumes # * In older cluster versions, pods require restart when autoexpanding if Kubernetes feature gate # 'ExpandInUsePersistentVolumes' is false. See: # https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/ ### Enable autoexpansion # moodlePvcDataAutoexpansion: true ### Every time autoexpansion is required, increment 5 GiB # moodlePvcDataAutoexpansionIncrementGib: 5 ### But no more than 25 GiB # moodlePvcDataAutoexpansionCapGib: 25 ## Fixed size, overwrites autoexpansion # moodlePvcDataSize: 1Gi ## Number of replicas # moodleSize: 1 # nginxSize: 1 ## php conf ### php.ini extra config phpFpmPhpExtraIni: |- upload_max_filesize = 10M post_max_size = 10M ### php-fpm extra conf phpFpmExtraConfig: |- [global] log_level = debug emergency_restart_threshold = 10 emergency_restart_interval = 1m [www] pm = static pm.max_children = 20 security.limit_extensions = .php ## nginx conf ### nginx extra conf nginxExtraConfig: |- # This passes 404 pages to Moodle so they can be themed error_page 404 /error/index.php; error_page 403 =404 /error/index.php; ## Container images # moodleImage: quay.io/krestomatio/moodle # nginxImage: quay.io/krestomatio/moodle # phpFpmImage: quay.io/krestomatio/moodle ## Other integrations ### postgres-operator: ### If using Krestomatio postgres-operator, just set 'moodlePostgresMetaName' ### to a Postgres CR name created in the same namespace. Credentials will be fetch with that variable. Ex, for a Postgres CR named 'postgres-sample': # moodlePostgresMetaName: postgres-sample ### keydb-operator: ### If using Krestomatio keydb-operator for redis cache, just set 'moodleKeydbMetaName' ### to a Keydb CR name created in the same namespace. Credentials and respective moodle config will be done using that variable. Ex, for a Keydb CR named 'keydb-sample': # moodleKeydbMetaName: 'keydb-sample' ### nfs-operator: ### If using Krestomatio nfs-operator for moodledata shared storage, just set 'moodleNfsMetaName' ### to a Server CR name created in the same namespace. An inline csi nfs volume source will be use from that variable, instead of creating a PVC: # moodleNfsMetaName: 'server-sample'