typo3

by christianhuth

Helm chartv8.0.8App legacy-13.4.40Verified publisher

TYPO3 — the Professional, Flexible Content Management System

About this chart

typo3

TYPO3 — the Professional, Flexible Content Management System

TL;DR;

helm repo add christianhuth https://charts.christianhuth.de
helm repo update
helm install my-release christianhuth/typo3

Or install it from the OCI registry:

helm install my-release oci://ghcr.io/christianhuth/helm-charts/typo3

Introduction

This chart bootstraps the Content Management System TYPO3 using the Helm package manager.

Prerequisites

  • Kubernetes 1.26+
  • The mariadb-operator if the bundled MariaDB database is used (mariadb.enabled: true, the default)

Installing the mariadb-operator

The chart bundles the database as a custom resource of the mariadb-operator (via the upstream chart mariadb-cluster). The operator itself is not part of this chart, as it is installed once per Kubernetes cluster:

helm upgrade --install mariadb-operator-crds oci://ghcr.io/mariadb-operator/charts/mariadb-operator-crds --namespace mariadb-operator --create-namespace
helm upgrade --install mariadb-operator oci://ghcr.io/mariadb-operator/charts/mariadb-operator --namespace mariadb-operator --wait

Installing the Chart

To install the chart with the release name my-release:

helm repo add christianhuth https://charts.christianhuth.de
helm repo update
helm install my-release christianhuth/typo3

The chart is also published as an OCI artifact which can be installed like this:

helm install my-release oci://ghcr.io/christianhuth/helm-charts/typo3

These commands deploy typo3 on the Kubernetes cluster in the default configuration. The Values section lists the values that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall the my-release deployment:

helm uninstall my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuring TYPO3

The chart uses the crinis/typo3 image for non-Composer ("legacy") TYPO3 projects, which ships the TYPO3 sources. TYPO3 runs rootless as www-data and listens on port 8080.

On the first start, i.e. if typo3conf/system/settings.php does not exist yet, TYPO3 is set up automatically with the database and the admin user configured in the values (typo3.setup, typo3.admin). Use typo3.setup.createSite to create a site for a given URL during the setup. On every start, an init container updates the database connection in typo3conf/system/settings.php from the values (typo3.modifyConfiguration), so changing the database or its password needs no manual change of the TYPO3 configuration. The admin password has to satisfy the password policy of TYPO3, a random one is generated if none is given:

kubectl create secret generic typo3-admin --from-literal=password='<password>'
typo3:
  admin:
    username: admin
    email: [email protected]
    existingSecret: typo3-admin

Set typo3.scheduler.enabled to run the TYPO3 scheduler every five minutes in a sidecar container. Uploaded files (fileadmin) and the configuration including extensions (typo3conf) are persisted in PersistentVolumeClaims (persistence.*).

Configuring the Database

The image supports MariaDB and MySQL.

Bundled MariaDB with an existing Secret (recommended)

kubectl create secret generic typo3-database --from-literal=password='<password>'
mariadb:
  mariadb:
    passwordSecretKeyRef:
      name: typo3-database
      key: password
      generate: false

If no Secret is referenced, the operator generates a random password and stores it in the Secret <release>-mariadb-password. By default the database runs as a Galera cluster with 3 instances. To upgrade to another MariaDB release series, change the tag of mariadb.mariadb.image; the operator migrates the system schema, but downgrades are not supported. See the values of the upstream chart for all options.

External MariaDB or MySQL

mariadb:
  enabled: false

externalDatabase:
  hostname: mariadb.example.com
  port: 3306
  database: typo3
  username: typo3
  existingSecret: typo3-database
  existingSecretPasswordKey: password

Instead of externalDatabase.existingSecret you can set externalDatabase.password, which lets the chart create the Secret.

Values

KeyTypeDefaultDescription
affinityobject{}Affinity settings for pod assignment
autoscaling.enabledboolfalse
autoscaling.maxReplicasint100
autoscaling.minReplicasint1
autoscaling.targetCPUUtilizationPercentageint80
deploymentStrategyobject{}Update strategy for the deployment. Set type: Recreate if the persistence uses ReadWriteOnce volumes, as a rolling update starts the new Pod before stopping the old one and it can't mount the volume on another node.
externalDatabase.databasestring"typo3"Name of the database to use
externalDatabase.existingSecretstring""Name of an existing Secret containing the password of the user
externalDatabase.existingSecretPasswordKeystring"password"Key in the existing Secret containing the password
externalDatabase.hostnamestring""Hostname of the external MariaDB or MySQL database. Used if mariadb.enabled is false.
externalDatabase.passwordstring""Password of the user. Ignored if externalDatabase.existingSecret is set.
externalDatabase.portint3306Port of the external database
externalDatabase.usernamestring"typo3"Name of the user to use
fullnameOverridestring""String to fully override "typo3.fullname"
image.pullPolicystring"Always"image pull policy
image.registrystring"docker.io"image registry
image.repositorystring"crinis/typo3"image repository
image.tagstring"legacy-13.4.40"Overrides the image tag
imagePullSecretslist[]If defined, uses a Secret to pull an image from a private Docker registry or repository.
ingress.annotationsobject{}
ingress.classNamestring""
ingress.enabledboolfalse
ingress.hosts[0].hoststring"chart-example.local"
ingress.hosts[0].paths[0].pathstring"/"
ingress.hosts[0].paths[0].pathTypestring"ImplementationSpecific"
ingress.tlslist[]
livenessProbe.failureThresholdint3Failure threshold for livenessProbe
livenessProbe.httpGet.pathstring"/typo3/"Path for livenessProbe
livenessProbe.initialDelaySecondsint0Initial delay seconds for livenessProbe
livenessProbe.periodSecondsint10Period seconds for livenessProbe
livenessProbe.successThresholdint1Success threshold for livenessProbe
livenessProbe.timeoutSecondsint5Timeout seconds for livenessProbe
mariadb.enabledbooltrueEnable a MariaDB instance managed by the mariadb-operator. Requires the operator to be installed in the cluster (see README).
mariadb.mariadb.databasestring"typo3"Name of the database to create
mariadb.mariadb.galera.enabledbooltrueEnable Galera to run multiple instances
mariadb.mariadb.imagestring"mariadb:12.3"MariaDB image. The tag only pins the release series (12.3 is the current long-term support release), so restarted instances get its latest patch version.
mariadb.mariadb.imagePullPolicystring"Always"Pull the image on every start to get the latest patch version of the release series
mariadb.mariadb.passwordSecretKeyRef.generatebooltrueLet the operator generate the Secret with a random password if it does not exist
mariadb.mariadb.passwordSecretKeyRef.keystring"password"Key of the password inside the Secret
mariadb.mariadb.passwordSecretKeyRef.namestring""Name of an existing Secret containing the password of the user. If empty, the Secret <release>-mariadb-password is used.
mariadb.mariadb.replicasint3Number of MariaDB instances. More than one instance requires Galera or replication.
mariadb.mariadb.storage.sizestring"8Gi"Size of the PVC of each instance
mariadb.mariadb.updateStrategy.mariadbAutoUpgradeEnabledbooltrueRun mariadb-upgrade on start, so that changing the release series in image migrates the system schema. It is a no-op if there is nothing to migrate.
mariadb.mariadb.usernamestring"typo3"Name of the user to create
nameOverridestring""Provide a name in place of typo3
nodeSelectorobject{}Node labels for pod assignment
persistence.fileadmin.accessModeslist["ReadWriteOnce"]the desired access modes the volume should have.
persistence.fileadmin.annotationsobject{}Annotations to be added to the PersistentVolumeClaim
persistence.fileadmin.enabledbooltrueuse a PVC to persist fileadmin data
persistence.fileadmin.existingClaimstring""provide an existing PersistentVolumeClaim
persistence.fileadmin.resourcesobject{"requests":{"storage":"5Gi"}}represents the minimum and maximum resources the volume should have.
persistence.fileadmin.storageClassNamestring""Name of the StorageClass required by the claim.
persistence.typo3conf.accessModeslist["ReadWriteOnce"]the desired access modes the volume should have.
persistence.typo3conf.annotationsobject{}Annotations to be added to the PersistentVolumeClaim
persistence.typo3conf.enabledbooltrueuse a PVC to persist typo3conf data
persistence.typo3conf.existingClaimstring""provide an existing PersistentVolumeClaim
persistence.typo3conf.resourcesobject{"requests":{"storage":"1Gi"}}represents the minimum and maximum resources the volume should have.
persistence.typo3conf.storageClassNamestring""Name of the StorageClass required by the claim.
podAnnotationsobject{}Annotations to be added to exporter pods
podSecurityContextobjectsee values.yamlpod-level security context. TYPO3 runs rootless as www-data (33) and listens on port 8080. The image expects the user to be a member of the root group (supplementalGroups), as /var/www/html belongs to it.
readinessProbe.failureThresholdint3Failure threshold for readinessProbe
readinessProbe.httpGet.pathstring"/typo3/"Path for readinessProbe
readinessProbe.initialDelaySecondsint0Initial delay seconds for readinessProbe
readinessProbe.periodSecondsint10Period seconds for readinessProbe
readinessProbe.successThresholdint1Success threshold for readinessProbe
readinessProbe.timeoutSecondsint5Timeout seconds for readinessProbe
replicaCountint1Number of replicas
resourcesobject{}Resource limits and requests for the headwind pods.
revisionHistoryLimitint10The number of old ReplicaSets to retain
route.main.additionalRuleslist[]Additional custom rules that can be added to the route
route.main.annotationsobject{}Add annotations to the route
route.main.apiVersionstring"gateway.networking.k8s.io/v1"Set the route apiVersion, e.g. gateway.networking.k8s.io/v1 or gateway.networking.k8s.io/v1alpha2
route.main.enabledboolfalseEnables or disables the route
route.main.filterslist[]Filters define the filters that are applied to requests that match this rule.
route.main.hostnameslist[]Hostnames to be matched
route.main.httpsRedirectboolfalseadds a filter for redirecting to https (HTTP 301 Moved Permanently). To redirect HTTP traffic to HTTPS, you need to have a Gateway with both HTTP and HTTPS listeners. Matches and filters do not take effect if enabled. Ref. https://gateway-api.sigs.k8s.io/guides/http-redirect-rewrite/
route.main.kindstring"HTTPRoute"Set the route kind Valid options are GRPCRoute, HTTPRoute, TCPRoute, TLSRoute, UDPRoute
route.main.labelsobject{}Add labels to the route
route.main.matcheslistsee values.yamldefine conditions used for matching the rule against incoming HTTP requests.
route.main.parentRefslist[]Parent references (Gateway)
route.main.timeoutsobject{}defines the timeouts that can be configured for an HTTP request
securityContextobjectsee values.yamlcontainer-level security context
service.portint8080Kubernetes port where service is exposed
service.typestring"ClusterIP"Kubernetes service type
serviceAccount.annotationsobject{}Annotations to add to the service account
serviceAccount.createbooltrueSpecifies whether a service account should be created
serviceAccount.namestring""The name of the service account to use. If not set and create is true, a name is generated using the fullname template
startupProbe.failureThresholdint60Failure threshold for startupProbe
startupProbe.httpGet.pathstring"/typo3/"Path for startupProbe
startupProbe.initialDelaySecondsint10Initial delay seconds for startupProbe
startupProbe.periodSecondsint10Period seconds for startup

Deploy typo3 with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has typo3 on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the charttypo3 is pinned at v8.0.8 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply