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_imageDocker image used for the Drupal container. Default (from operator vars):drupal:11.2.8-php8.4-apache -
drupal_replicasNumber of pod replicas for the Drupal Deployment. Default:1 -
drupal_localeDrupal install locale (for exampleen,sv). Default:en
Database
Unless you explicitly disable it, the operator provisions a MariaDB instance for each Drupal site.
-
no_mariadbIftrue, do not create a MariaDB instance (you must provide your own DB). Default:false -
drupal_dbDatabase name. Default:drupal -
drupal_db_usernameDatabase user. Default:drupal -
drupal_db_passDatabase password. Default:d3upa1 -
drupal_db_portDatabase 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_userDrupal admin username. Default:drupal -
drupal_passwordDrupal admin password. Default:drupal -
drupal_profileDrupal install profile (for examplemycustom). Default:standard -
drupal_do_not_installIftrue, the operator will not rundrush si(site-install). Use this when you only want to import an existing database. -
drupal_always_installIftrue, 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_nodeportIftrue, create a NodePort service to expose Drupal. Default:false -
drupal_loadbalancerIftrue, create a LoadBalancer service. Default:false -
drupal_loadbalancer_port/drupal_loadbalancer_target_portPorts used by the LoadBalancer service. Defaults:80/80.
See Accessing your site for details on how to reach the service.
Cron
-
drupal_cronIftrue, the operator creates a Kubernetes CronJob to run Drupal cron. Default:true -
drupal_cron_scheduleCron 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.