Settings and defaults

This page lists the main settings used by the Drupal Operator and their default values.

Note

Not all of these are necessarily exposed directly as fields in the Drupal custom resource; some are internal defaults used by templates and Ansible tasks. This list is intended as a reference.

Operator and images

  • drupal_operator_image: ozziio/drupal-operator:3.1.6
  • busybox_image: busybox:1.37.0
  • curl_image: curlimages/curl:8.16.0
  • db_image: mariadb:11.4.5
  • memcached_image: memcached:1.6.10-alpine
  • drupal_image: drupal:9.5.10-php8.2-apache
  • nginx_image: digitalist/nginx:1.21.6
  • change_cause: update

Backups

  • backup_db: false
  • backup_files: false
  • backup_db_cron_schedule: "0 3 * * *"
  • backup_db_cron_successfulJobsHistoryLimit: 1
  • backup_db_cron_failedJobsHistoryLimit: 1
  • backup_files_cron_schedule: "0 5 * * *"
  • drupal_backup_secret: "backup-secret"
  • drupal_s3_alias: "s3"
  • drupal_sla: "nosla"

Database (MariaDB)

  • db_extra_config: ""
  • db_resources_requests_memory: 200Mi
  • db_resources_requests_cpu: 100m
  • db_resources_limits_memory: 1024Mi
  • db_resources_limits_cpu: 1000m
  • mysql_root_password: root
  • no_mariadb: false
  • db_pvc: default
  • db_pvc_size: 250M
  • db_container_port: 3306
  • db_port: 3306
  • db_client: mariadb
  • db_dump_client: mariadb-dump

Services (Drupal)

  • drupal_nodeport: true
  • drupal_loadbalancer: false
  • drupal_loadbalancer_port: 80
  • drupal_loadbalancer_target_port: 80

Drupal runtime and resources

  • drupal_name: drupal
  • drupal_ports_container_port: 80
  • drupal_ports_port: 80
  • drupal_replicas: 1
  • drupal_resources_requests_memory: 128Mi
  • drupal_resources_requests_cpu: 90m
  • drupal_resources_limits_memory: 1024Mi
  • drupal_resources_limits_cpu: 1000m

Drupal locale and language

  • drupal_locale: en
  • drupal_locale_update: false
  • drupal_translation_path: "sites/default/files/translations"
  • drupal_translations_path: "translations"

Drupal image pulling

  • drupal_image_secret: true
  • drupal_image_reg_secret: ""
  • drupal_image_pull_policy: "Always"

Probes (Drupal)

  • drupal_readinessProbe_initialDelaySeconds: 5
  • drupal_readinessProbe_periodSeconds: 5
  • drupal_readinessProbe_timeoutSeconds: 120
  • drupal_livenessProbe_tcpSocket_port: 80
  • drupal_livenessProbe_initialDelaySeconds: 10
  • drupal_livenessProbe_periodSeconds: 10
  • drupal_livenessProbe_timeoutSeconds: 3
  • drupal_liveness_probe: true
  • drupal_custom_liveness_probe: ""
  • drupal_custom_readiness_probe: ""

PHP settings (Drupal)

  • 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"
  • 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 }}';

Drupal paths

  • drupal_root: "/opt/drupal"
  • drupal_web_root: "/opt/drupal/web"
  • install_path: /opt/drupal/web/sites
  • tmp_dir: /tmp

Drupal site credentials and DB config

  • drupal_user: "drupal"
  • drupal_password: "drupal"
  • drupal_reset_admin: false
  • drupal_db: "drupal"
  • drupal_db_username: "drupal"
  • drupal_db_pass: "d3upa1"
  • drupal_db_prefix: ""
  • drupal_db_port: "3306"
  • drupal_db_driver: "mysql"
  • drupal_db_namespace: 'Drupal\\Core\\Database\\Driver\\mysql'

Drupal install behavior

  • drupal_profile: standard
  • drupal_import_database: false
  • drupal_database_backup_path: ""
  • drupal_import_files: false
  • drupal_files_backup_path: ""
  • drupal_do_not_install: false
  • drupal_always_install: false
  • drupal_drush_post_install_command: false
  • drupal_config_split: false
  • drupal_config_import: true
  • drupal_set_uuid: true
  • drupal_uuid: "a0bb6f1c-dda6-477b-938a-4f0219775c28"
  • drupal_drush_update_database_command: "updb -y"
  • drupal_drush_config_import_command: "cim -y"
  • drupal_drush_config_import_first_command: "cim --partial -y"
  • drupal_drush_config_export_command: "csex -y"
  • drush_path: drush

Drupal settings.php and hash salt

  • drupal_hash_salt: "4f041a096d1e36706d472a50b7316a2c"
  • drupal_local_settings_php: ""
  • drupal_pre_settings_php: ""
  • drupal_settings_php:
      <?php
      {{ drupal_pre_settings_php }}
      $settings['container_yamls'][] = DRUPAL_ROOT . '/sites/default/services.yml';
      $config['system.performance']['css']['preprocess'] = '{{ drupal_config_system_performance_css_preprocess }}';
      $config['system.performance']['js']['preprocess'] = '{{ drupal_config_system_performance_js_preprocess }}';
      $databases['default']['default'] = [
        'database' => getenv('MYSQL_DATABASE'),
        'username' => getenv('MYSQL_USER'),
        'password' => getenv('MYSQL_PASSWORD'),
        'prefix' => '{{ drupal_db_prefix }}',
        'host' => '{{ ansible_operator_meta.name }}-db',
        'port' => '{{ drupal_db_port }}',
        'namespace' => '{{ drupal_db_namespace }}',
        'driver' => '{{ drupal_db_driver }}',
      ];
      $settings['hash_salt'] = '{{ drupal_hash_salt }}';
      $settings['trusted_host_patterns'] = ['{{ trusted_host_patterns | default('^.+$', true) }}'];
      $config['locale.settings']['translation']['path'] = '{{ drupal_translation_path }}';
      {{ drupal_local_settings_php }}
  • drupal_config_system_performance_css_preprocess: "TRUE"
  • drupal_config_system_performance_js_preprocess: "TRUE"

Cron (Drupal)

  • 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
  • drupal_cron_restartPolicy: Never
  • drupal_cron_concurrencyPolicy: Forbid

Files storage (Drupal)

  • files_pvc: default
  • files_pvc_size: 250M
  • files_accessmode: ReadWriteMany

Labels and annotations

  • drupal_annotations: ""
  • drupal_labels:
      digitalist.cloud/operator: drupal
  • deployment_custom_annotations: ""

Extra env, sidecars, volumes

  • drupal_extra_envs: ""
  • drupal_sidecars: ""
  • drupal_extra_volumes_mounts: ""
  • drupal_extra_volumes: ""

Post start / init scripts

  • drupal_post_start_commands: (multiline): ""

  • drupal_init: (shell script content, used as init script)

  • drupal_startup: (shell script content, used at startup)

Both are defined as large Bash scripts in vars/main.yaml and rendered into ConfigMaps (<name>-drupal-init and <name>-drupal-startup).

PHP-FPM and Nginx

  • php_fpm: false
  • nginx_container_port: 8080
  • nginx_conf: (large Nginx configuration block)
  • php_fpm_conf: (PHP-FPM pool configuration block)

Memcached

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

User and security context

  • drupal_uid: 82
  • drupal_guid: 82
  • drupal_run_as_user: 1000
  • drupal_run_as_group: 2000
  • drupal_fsgroup: 2000
  • drupal_fix_file_permissions: false
  • drupal_php_fpm_container_security_context:
      allowPrivilegeEscalation: false
      readOnlyRootFilesystem: true
      capabilities:
        drop: ["ALL"]
  • drupal_apache_container_security_context:
      allowPrivilegeEscalation: false

Service accounts

  • drupal_use_serviceaccount: false
  • drupal_serviceaccount: ""

Miscellaneous

  • drupal_files_backup_path: ""
  • drupal_import_files: false
  • drupal_db_client: mariadb (deprecated, use db_client)
  • drupal_guid / drupal_uid: 82

For explanations and how these settings are used, see: