Drupal Custom Resource basics

The Drupal Operator defines a Drupal custom resource:

apiVersion: ozzi.io/v1alpha2
kind: Drupal

Creating a Drupal resource tells the operator to provision and manage a Drupal site.

This page explains a subset of the most important fields for basic usage. For a more complete list of options, see the Configuration reference.

Core spec fields

Image & runtime

  • drupal_image Docker image used for the Drupal container. Default (from operator vars): drupal:11.2.8-php8.4-apache

  • drupal_replicas Number of pod replicas for the Drupal Deployment. Default: 1

  • drupal_locale Drupal install locale (for example en, sv). Default: en

Database

Unless you explicitly disable it, the operator provisions a MariaDB instance for each Drupal site.

  • no_mariadb If true, do not create a MariaDB instance (you must provide your own DB). Default: false

  • drupal_db Database name. Default: drupal

  • drupal_db_username Database user. Default: drupal

  • drupal_db_pass Database password. Default: d3upa1

  • drupal_db_port Database port. Default: "3306"

The operator uses these values to generate:

  • Database secrets
  • A MariaDB StatefulSet
  • A Service for the DB

Initial site and admin

  • drupal_user Drupal admin username. Default: drupal

  • drupal_password Drupal admin password. Default: drupal

  • drupal_profile Drupal install profile (for example mycustom). Default: standard

  • drupal_do_not_install If true, the operator will not run drush si (site-install). Use this when you only want to import an existing database.

  • drupal_always_install If true, the operator will force a re-install by:

    • Dropping the database
    • Deleting the internal “installed” stat file

    Warning

    This will destroy existing data.

Services and exposure

  • drupal_nodeport If true, create a NodePort service to expose Drupal. Default: false

  • drupal_loadbalancer If true, create a LoadBalancer service. Default: false

  • drupal_loadbalancer_port / drupal_loadbalancer_target_port Ports used by the LoadBalancer service. Defaults: 80 / 80.

See Accessing your site for details on how to reach the service.

Cron

  • drupal_cron If true, the operator creates a Kubernetes CronJob to run Drupal cron. Default: true

  • drupal_cron_schedule Cron expression for when to run Drupal cron. Default: "*/5 * * * *"

Internally, the operator:

  • Suspends the CronJob when doing imports or major updates
  • Unsuspends it after the Drupal Deployment is ready again

This avoids cron running during critical maintenance operations.