Skip to content

Site initializer

site-initializer is an init container. It creates the content directory (/www/html) on the Site volume before the normal containers start (initializer/bin/initializer.sh). It needs the SITE_PATH environment variable and exits with an error when the variable is missing. It prints a version banner (IMAGE_TAG and /etc/build-date). It has no Service port, route, or probe. A failed initializer prevents the normal containers from starting.

Use cases

  • A new Site: the first start creates /www/html on the empty volume, so every other container finds a content directory.
  • A Site that starts on a fresh volume, for example after a migration.
  • "Site stuck in Init": the initializer exits with an error when SITE_PATH is missing, and the other containers do not start until it succeeds.

Example usage

Read its log in the Site Pod:

kubectl -n sites logs <site-id>-0 -c site-initializer

The log shows the version banner. A failure leaves the Pod in Init:Error.

Start order

flowchart LR
    I["site-initializer (init container)"] --> V[("Site PVC /www/html")]
    I --> N["site-oauth2, site-proxy, site-api, site-admin, ..."]
    N --> V