Configuration reference
This page summarizes important configuration options used by the Drupal Operator.
Default values are taken from roles/setup/vars/main.yaml.
This is not a complete API reference of the CRD, but it covers the most commonly used and relevant settings.
Images
drupal_operator_image:ozziio/drupal-operator:3.1.6drupal_image:drupal:11.2.8-php8.4-apachedb_image:mariadb:11.4.5memcached_image:memcached:1.6.10-alpinenginx_image:digitalist/nginx:1.21.6busybox_image:busybox:1.37.0curl_image:curlimages/curl:8.16.0
These can be overridden (where exposed) via fields in the Drupal spec or
through your own overlays/templates.
General behavior & resources
-
change_causeFree-form string used when calculating checksums to decide if the operator needs to trigger a new deployment or import. Change this when you want to force a reconcile/update. -
drupal_replicas:1Number of replicas for the Drupal Deployment.
Drupal pod resources
drupal_resources_requests_memory:128Midrupal_resources_requests_cpu:90mdrupal_resources_limits_memory:1024Midrupal_resources_limits_cpu:1000m
Database pod resources (MariaDB)
db_resources_requests_memory:200Midb_resources_requests_cpu:100mdb_resources_limits_memory:1024Midb_resources_limits_cpu:1000m
Memcached resources
memcached_resources_requests_memory:70Mimemcached_resources_requests_cpu:10mmemcached_resources_limits_memory:512Mimemcached_resources_limits_cpu:250m
Storage
Files PVC:
files_pvcLogical name / StorageClass reference used in the templates.files_pvc_size:250Mfiles_accessmode:ReadWriteMany
Database PVC:
db_pvcLogical name / StorageClass reference used in the templates.db_pvc_size:250Mdb_container_port:3306db_port:3306
PHP configuration
PHP-related settings:
drupal_php_memory_limit:512Mdrupal_php_post_max_size:1024Mdrupal_php_upload_max_filesize:500Mdrupal_php_ini_file:/usr/local/etc/php/conf.d/operator.inidrupal_php_ini_subPath:operator.ini
The operator generates a ConfigMap containing drupal_php_ini, which by
default is:
drupal_php_ini: |-
post_max_size='{{ drupal_php_post_max_size }}';
upload_max_filesize='{{ drupal_php_upload_max_filesize }}';
memory_limit='{{ drupal_php_memory_limit }}';
This file is then mounted into the PHP container at drupal_php_ini_file.
To change upload sizes or memory limits, adjust these values in your Drupal
spec or overrides and update change_cause to force a redeploy.
Drupal installation & behavior
Paths:
drupal_root:/opt/drupaldrupal_web_root:/opt/drupal/webinstall_path:/opt/drupal/web/sites
DB and user defaults:
drupal_db:drupaldrupal_db_username:drupaldrupal_db_pass:d3upa1drupal_db_port:"3306"drupal_db_driver:"mysql"drupal_db_namespace:'Drupal\\Core\\Database\\Driver\\mysql'
Drupal admin and profile:
drupal_profile:standarddrupal_user:drupaldrupal_password:drupaldrupal_locale:en
Install/import behavior:
-
drupal_do_not_install:falseIftrue, Drupal site-install is skipped (useful if you only import DB). -
drupal_always_install:falseIftrue, the operator:- Drops the database
- Always re-runs site-install !!! warning This will destroy existing data.
This is useful for development environments, when you want to reinstall the site from scratch.
-
drupal_import_database:falseControls whether the database import job should run. -
drupal_database_backup_path:""Path inside the container/image for the database dump used in imports. -
drupal_import_files:falseEnables the files import job. -
drupal_files_backup_path:""Path inside the container/image for the files archive.
Hash salt and UUID:
drupal_hash_salt:"4f041a096d1e36706d472a50b7316a2c"drupal_set_uuid:truedrupal_uuid:"a0bb6f1c-dda6-477b-938a-4f0219775c28"
These feed into the generated settings.php (via drupal_settings_php).
Cron and scheduled tasks
Drupal cron:
drupal_cron:truedrupal_cron_schedule:"*/5 * * * *"drupal_cron_args:"cron"drupal_cron_shell:/bin/bashdrupal_cron_activeDeadlineSeconds:6000drupal_cron_successfulJobsHistoryLimit:1drupal_cron_failedJobsHistoryLimit:1
Automatic backups:
backup_db:falsebackup_files:falsebackup_db_cron_schedule:"0 3 * * *"# daily 03:00backup_files_cron_schedule:"0 5 * * *"# daily 05:00backup_db_cron_successfulJobsHistoryLimit:1backup_db_cron_failedJobsHistoryLimit:1
When enabled, the operator creates CronJobs:
<name>-auto-db-backup<name>-auto-files-backup
See Importing DB & files and Cron & scheduled tasks for details.
Extra environment, sidecars, and volumes
These are YAML snippets injected into the templates:
-
drupal_extra_envs:""Extra environment variables for the Drupal container. -
drupal_sidecars:""Additional containers to run alongside Drupal. -
drupal_extra_volumes:""Extravolumesdefinitions. -
drupal_extra_volumes_mounts:""ExtravolumeMountson the main Drupal container.
Examples are in Sidecars & extra volumes.
Memcached
memcached(boolean in theDrupalspec) Whentrue, the operator deploys a Memcached StatefulSet + Service.
Defaults:
memcached_image:memcached:1.6.10-alpinememcached_container_port:11211
You can then configure Drupal (via settings.php or configuration) to use this Memcached service as a cache backend.
See Memcached & performance for more information.
Security and runtime
Service accounts:
drupal_use_serviceaccount:falsedrupal_serviceaccount:""
User/group IDs:
drupal_run_as_user:1000drupal_run_as_group:2000drupal_fsgroup:2000
Permissions:
drupal_fix_file_permissions:false
Security contexts (as YAML snippets used in templates):
drupal_php_fpm_container_security_context`:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
drupal_apache_container_security_context`:
allowPrivilegeEscalation: false
These are applied to containers in the generated Deployments/Pods. You can customize them in your own overlays if you have stricter security policies.
PHP-FPM and Nginx
To use Nginx + PHP-FPM mode:
php_fpm:falseby default. Set totrueto enable this mode.
When php_fpm is true, the operator creates:
- Nginx ConfigMap:
<name>-nginx-conffromnginx_conf - PHP-FPM ConfigMap:
<name>-php-fpm-conffromphp_fpm_conf
Defaults:
nginx_container_port:8080nginx_conf: large Nginx configuration optimized for Drupalphp_fpm_conf: PHP-FPM pool configuration (ondemand, memory limit, etc.)
See PHP & web server tuning for deeper details on these configurations and how to customize them.