directus

by felipegfalcao

Helm chartv2.1.0App 12.0.2

A Helm chart for installing Directus on Kubernetes. Directus is a real-time API and App dashboard for managing SQL database content.

About this chart

directus

A Helm chart for installing Directus on Kubernetes. Directus is a real-time API and App dashboard for managing SQL database content.

Homepage: https://directus.io/

Maintainers

NameEmailUrl
mykhailo-sindieiev[email protected]https://github.com/directus-labs/helm-chart

Source Code

Requirements

RepositoryNameVersion
oci://registry-1.docker.io/bitnamichartsmysql~14.0.3
oci://registry-1.docker.io/bitnamichartspostgresql~16.7.27
oci://registry-1.docker.io/bitnamichartsredis~23.2.6

Values

KeyTypeDefaultDescription
adminEmailstring"[email protected]"
affinityobject{}
applicationSecretNamestring"directus-application-secret"
attachExistingSecretslist[]
autoscaling.enabledboolfalse
autoscaling.maxReplicasint100
autoscaling.minReplicasint1
autoscaling.targetCPUUtilizationPercentageint80
createApplicationSecretbooltrueThis setting enables the creation of ADMIN_PASSWORD, KEY, and SECRET variables in k8s secrets. If it is set to false, you MUST set these variables manually via existing secret resource and set its name below.
createMysqlSecretbooltrueCreate MySQL secret in Directus chart If set to enable, mysql secret with values of mysql-root-password, mysql-replication-password and mysql-password variables will be created. Please consult the official bitnami mysql values file - https://github.com/bitnami/charts/blob/main/bitnami/mysql/values.yaml#L152. If set to false, you MUST create a secret resource in k8s for mysql installation and set the correct value to the existingSecret in the mysql settings section.
createPostgresqlSecretboolfalseCreate PostgreSQL secret in Directus chart If set to enable, postgresql secret with values of postgres-password, password, and replication-password variables will be created. Please consult the official bitnami postgres values file - https://github.com/bitnami/charts/blob/main/bitnami/postgresql/values.yaml#L164. If set to false, you MUST create a secret resource in k8s for postgresql installation and set the correct value to the existingSecret in the postgresql settings setion.
databaseEnginestring"mysql"Database engine. Could be set to one value from the following list: mysql, postgresql. Please disable installations for other database engines in this chart. Please note if you use mariadb server, set databaseEngine to mysql value. Details are here - https://directus.io/docs/configuration/database.
extraEnvVarslist[]
extraVolumeMountslist[]
extraVolumeslist[]
fullnameOverridestring""Completely overrides Chart name
image.pullPolicystring"IfNotPresent"Pull policy for docker image
image.repositorystring"directus/directus"Directus image docker repository
image.tagstring""Overrides the image tag whose default is the chart appVersion.
imagePullSecretslist[]Image Pull Secrets in k8s for docker image
ingress.annotationsobject{}Ingress annotations. Usually used in cloud environments
ingress.classNamestring""
ingress.enableTLSbooltrueEnable TLS in PUBLIC_URL
ingress.enabledboolfalse
ingress.hosts[0]object{"host":"chart-example.local","paths":[{"path":"/","pathType":"Prefix"}]}Hostname to expose. You should create CNAME DNS record with this hostname to redirect to ALB DNS name
ingress.tlslist[]
initContainerslist[]Init Containers for Directus pod
livenessProbe.enabledbooltrue
livenessProbe.httpGet.pathstring"/"
livenessProbe.httpGet.portstring"http"
mysql.auth.databasestring"directus_mysql"
mysql.auth.existingSecretstring"directus-mysql-secret"
mysql.auth.usernamestring"directus_mysql"
mysql.enableInstallationbooltrueThe switch to switch off the installation of the mysql. The rest of the settings are being used during the installation and for DB connection. Link to the values.yaml file in bitnami repo - https://github.com/bitnami/charts/blob/main/bitnami/mysql/values.yaml
mysql.globalobject{"security":{"allowInsecureImages":true}}Global security settings for mysql image. Set to true to allow insecure images from bitnamilegacy repository
mysql.imageobject{"registry":"docker.io","repository":"bitnamilegacy/mysql","tag":"9.4.0-debian-12-r1"}MySQL image settings
mysql.mysqlPortstring""
mysql.mysqlURLstring""
nameOverridestring""Helm name override in Chart.yaml. This name is being used for resource naming
nodeSelectorobject{}
podAnnotationsobject{}
podSecurityContextobject{}
postgresql.auth.databasestring"directus_postgres"
postgresql.auth.existingSecretstring"directus-postgresql-secret"
postgresql.auth.usernamestring"directus_postgres"
postgresql.enableInstallationboolfalseThe switch to switch off the installation of the postgresql. The rest of the settings are being used during the installation and for DB connection. Link to the values.yaml file in bitnami repo - https://github.com/bitnami/charts/blob/main/bitnami/postgresql/values.yaml
postgresql.globalobject{"security":{"allowInsecureImages":true}}Global security settings for postgresql image. Set to true to allow insecure images from bitnamilegacy repository
postgresql.imageobject{"registry":"docker.io","repository":"bitnamilegacy/postgresql","tag":"17.6.0-debian-12-r4"}PostgreSQL image settings
postgresql.postgresqlPortstring""
postgresql.postgresqlURLstring""
readinessProbe.enabledbooltrue
readinessProbe.httpGet.pathstring"/"
readinessProbe.httpGet.portstring"http"
redis.auth.existingSecretstring""Existing secret name with Redis password
redis.auth.existingSecretPasswordKeystring""The key in the secret with password
redis.enabledbooltrueSwitch to enable Redis
redis.globalobject{"security":{"allowInsecureImages":true}}Global security settings for redis image. Set to true to allow insecure images from bitnamilegacy repository
redis.imageobject{"registry":"docker.io","repository":"bitnamilegacy/redis","tag":"8.2.1-debian-12-r0"}Redis image settings
redis.replica.replicaCountint0Amount of Redis replicas
replicaCountint1
resourcesobject{}
securityContextobject{}
service.annotationsobject{}Service annotations. Usually used in cloud environments
service.portint80
service.typestring"ClusterIP"
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
sidecar.commandlist["/bin/sh","-c","sleep 3600;"]Command to run in sidecar docker image
sidecar.enabledboolfalseSidecars for Directus pod
sidecar.pullPolicystring"Always"
sidecar.repositorystring"busybox"
sidecar.securityContextobject{}
sidecar.tagstring"latest"
sidecarslist[]Sidecars for Directus pod
startupProbe.enabledboolfalse
startupProbe.httpGet.pathstring"/"
startupProbe.httpGet.portstring"http"
tolerationslist[]
updateStrategyobject{"type":"RollingUpdate"}Or: updateStrategy: type: Recreate

Deploy directus with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has directus 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 chartdirectus is pinned at v2.1.0 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