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.6
  • drupal_image: drupal:11.2.8-php8.4-apache
  • db_image: mariadb:11.4.5
  • memcached_image: memcached:1.6.10-alpine
  • nginx_image: digitalist/nginx:1.21.6
  • busybox_image: busybox:1.37.0
  • curl_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_cause Free-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: 1 Number of replicas for the Drupal Deployment.

Drupal pod resources

  • drupal_resources_requests_memory: 128Mi
  • drupal_resources_requests_cpu: 90m
  • drupal_resources_limits_memory: 1024Mi
  • drupal_resources_limits_cpu: 1000m

Database pod resources (MariaDB)

  • db_resources_requests_memory: 200Mi
  • db_resources_requests_cpu: 100m
  • db_resources_limits_memory: 1024Mi
  • db_resources_limits_cpu: 1000m

Memcached resources

  • memcached_resources_requests_memory: 70Mi
  • memcached_resources_requests_cpu: 10m
  • memcached_resources_limits_memory: 512Mi
  • memcached_resources_limits_cpu: 250m

Storage

Files PVC:

  • files_pvc Logical name / StorageClass reference used in the templates.
  • files_pvc_size: 250M
  • files_accessmode: ReadWriteMany

Database PVC:

  • db_pvc Logical name / StorageClass reference used in the templates.
  • db_pvc_size: 250M
  • db_container_port: 3306
  • db_port: 3306

PHP configuration

PHP-related settings:

  • drupal_php_memory_limit: 512M
  • drupal_php_post_max_size: 1024M
  • drupal_php_upload_max_filesize: 500M
  • drupal_php_ini_file: /usr/local/etc/php/conf.d/operator.ini
  • drupal_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/drupal
  • drupal_web_root: /opt/drupal/web
  • install_path: /opt/drupal/web/sites

DB and user defaults:

  • drupal_db: drupal
  • drupal_db_username: drupal
  • drupal_db_pass: d3upa1
  • drupal_db_port: "3306"
  • drupal_db_driver: "mysql"
  • drupal_db_namespace: 'Drupal\\Core\\Database\\Driver\\mysql'

Drupal admin and profile:

  • drupal_profile: standard
  • drupal_user: drupal
  • drupal_password: drupal
  • drupal_locale: en

Install/import behavior:

  • drupal_do_not_install: false If true, Drupal site-install is skipped (useful if you only import DB).

  • drupal_always_install: false If true, 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: false Controls 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: false Enables 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: true
  • drupal_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: true
  • drupal_cron_schedule: "*/5 * * * *"
  • drupal_cron_args: "cron"
  • drupal_cron_shell: /bin/bash
  • drupal_cron_activeDeadlineSeconds: 6000
  • drupal_cron_successfulJobsHistoryLimit: 1
  • drupal_cron_failedJobsHistoryLimit: 1

Automatic backups:

  • backup_db: false
  • backup_files: false
  • backup_db_cron_schedule: "0 3 * * *" # daily 03:00
  • backup_files_cron_schedule: "0 5 * * *" # daily 05:00
  • backup_db_cron_successfulJobsHistoryLimit: 1
  • backup_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: "" Extra volumes definitions.

  • drupal_extra_volumes_mounts: "" Extra volumeMounts on the main Drupal container.

Examples are in Sidecars & extra volumes.

Memcached

  • memcached (boolean in the Drupal spec) When true, the operator deploys a Memcached StatefulSet + Service.

Defaults:

  • memcached_image: memcached:1.6.10-alpine
  • memcached_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: false
  • drupal_serviceaccount: ""

User/group IDs:

  • drupal_run_as_user: 1000
  • drupal_run_as_group: 2000
  • drupal_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: false by default. Set to true to enable this mode.

When php_fpm is true, the operator creates:

  • Nginx ConfigMap: <name>-nginx-conf from nginx_conf
  • PHP-FPM ConfigMap: <name>-php-fpm-conf from php_fpm_conf

Defaults:

  • nginx_container_port: 8080
  • nginx_conf: large Nginx configuration optimized for Drupal
  • php_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.