wordpress

by groundhog2k

Helm chartv0.16.9App 7.1.5-apache

A Helm chart for Wordpress on Kubernetes

About this chart

Wordpress

Changelog

see RELEASENOTES.md

A Helm chart for Wordpress on Kubernetes

TL;DR

helm repo add groundhog2k https://groundhog2k.github.io/helm-charts/
helm install my-release groundhog2k/wordpress

Introduction

This chart uses the original Wordpress from Docker to deploy Wordpress in Kubernetes.

It fully supports deployment of the multi-architecture docker image.

Prerequisites

  • Kubernetes 1.12+
  • Helm 3.x
  • PV provisioner support in the underlying infrastructure

Installing the Chart

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

helm install my-release groundhog2k/wordpress

Uninstalling the Chart

To uninstall/delete the my-release deployment:

helm uninstall my-release

Requirements

RepositoryNameVersion
@groundhog2kmariadb0.3.14

Common parameters

KeyTypeDefaultDescription
fullnameOverridestring""Fully override the deployment name
nameOverridestring""Partially override the deployment name

Deployment parameters

KeyTypeDefaultDescription
image.pullPolicystring"IfNotPresent"Image pull policy
image.registrystring"docker.io"Image registry
image.repositorystring"wordpress"Image name
image.tagstring""Image tag
imagePullSecretslist[]Image pull secrets
extraInitContainerslist[]Extra init containers
extaContainerslist[]Extra containers for usage as sidecars
strategyobject{}Pod deployment strategy
livenessProbeobjectsee values.yamlLiveness probe configuration
startupProbeobjectsee values.yamlStartup probe configuration
readinessProbeobjectsee values.yamlReadiness probe configuration
customLivenessProbeobject{}Custom liveness probe (overwrites default liveness probe configuration)
customStartupProbeobject{}Custom startup probe (overwrites default startup probe configuration)
customReadinessProbeobject{}Custom readiness probe (overwrites default readiness probe configuration)
resourcesobject{}Resource limits and requests
priorityClassNamestring""Deployment priority class name
nodeSelectorobject{}Deployment node selector
customLabelsobject{}Additional labels for Deployment or StatefulSet
customAnnotationsobject{}Additional annotations for Deployment or StatefulSet
podAnnotationsobject{}Additional pod annotations
podLabelsobject{}Additional pod labels
podSecurityContextobjectsee values.yamlPod security context
securityContextobjectsee values.yamlContainer security context
envlist[]Additional container environmment variables
argslist[]Arguments for the container entrypoint process
serviceAccount.createboolfalseEnable service account creation
serviceAccount.namestring""Optional name of the service account
serviceAccount.annotationsobject{}Additional service account annotations
affinityobject{}Affinity for pod assignment
tolerationslist[]Tolerations for pod assignment
topologySpreadConstraintsobject{}Topology spread constraints for pods
containerPortint8000Internal http container port
replicaCountint1Number of replicas (ignored when autoscaling is enabled)
revisionHistoryLimitintnilMaximum number of revisions maintained in revision history
podDisruptionBudgetobject{}Pod disruption budget
podDisruptionBudget.minAvailableintnilMinimum number of pods that must be available after eviction
podDisruptionBudget.maxUnavailableintnilMaximum number of pods that can be unavailable after eviction
autoscaling.enabledboolfalseEnable horizontal pod autoscaler
autoscaling.minReplicasint1Minimum number of replicas
autoscaling.maxReplicasint10Maximum number of replicas
autoscaling.targetCPUUtilizationPercentageint80Target CPU utilization percentage
autoscaling.targetMemoryUtilizationPercentageintnilTarget memory utilization percentage
autoscaling.annotationsobject{}Additional HPA annotations
autoscaling.behaviorobject{}HPA behavior configuration

Service paramters

KeyTypeDefaultDescription
service.portint80Wordpress HTTP service port
service.typestring"ClusterIP"Service type
service.nodePortintnilThe node port (only relevant for type LoadBalancer or NodePort)
service.clusterIPstringnilThe cluster ip address (only relevant for type LoadBalancer or NodePort)
service.loadBalancerIPstringnilThe load balancer ip address (only relevant for type LoadBalancer)
service.loadBalancerSourceRangeslist[]The list of IP CIDR ranges that are allowed to access the load balancer (only relevent for type LoadBalancer)
service.annotationsobject{}Additional service annotations
service.labelsobject{}Additional service labels

Ingress parameters

KeyTypeDefaultDescription
ingress.enabledboolfalseEnable ingress for Wordpress service
ingress.classNamestringnilOptional ingress class name
ingress.annotationsobject{}Additional annotations for ingress
ingress.labelsobject{}Additional ingress lables
ingress.hosts[0].hoststring""Hostname for the ingress endpoint
ingress.hosts[0].host.paths[0].pathstring"/"Default root path
ingress.hosts[0].host.paths[0].pathTypestringImplementationSpecificIngress path type (ImplementationSpecific, Prefix, Exact)
ingress.tlslist[]Ingress TLS parameters
ingress.maxBodySizestring"64m"Maximum body size for post requests

HTTPRoute parameters

KeyTypeDefaultDescription
httpRoute.enabledboolfalseEnable HTTPRoute for the Management UI service
httpRoute.annotationsobject{}Additional HTTPRoute annotations
httpRoute.labelsobject{}Additional HTTPRoute labels
httpRoute.parentRefslist[]Gateway parent references (required when httpRoute is enabled and listenerSet is disabled)
httpRoute.hostnameslist[]Hostnames for the HTTPRoute
httpRoute.ruleslistsee values.yamlHTTPRoute rules for the Management UI service

ListenerSet parameters

KeyTypeDefaultDescription
listenerSet.enabledboolfalseEnable ListenerSet for Gateway API
listenerSet.annotationsobject{}Additional ListenerSet annotations
listenerSet.labelsobject{}Additional ListenerSet labels
listenerSet.parentRefobject{}Gateway parent reference (required)
listenerSet.listenerslist[]Listeners to attach to the parent Gateway

Network policies

Allows to define optional network policies for ingress and egress The policyTypes will be automatically set

KeyTypeDefaultDescription
networkPolicy.ingressobject{}Ingress network policies
networkPolicy.egressobject{}Egress network policies

Database settings

KeyTypeDefaultDescription
externalDatabase.hoststringnilExternal database host
externalDatabase.namestring"wordpress"External database name
externalDatabase.userstringnilExternal database user name
externalDatabase.passwordstringnilExternal database user password
mariadb.enabledboolfalseEnable MariaDB deployment (will disable external database settings)
mariadb.settings.rootPasswordstringnilMariaDB root user password
mariadb.storagestringnilMariaDB storage settings
mariadb.userDatabase.namestringnilMariaDB wordpress database name
mariadb.userDatabase.passwordstringnilMariaDB wordpress database user
mariadb.userDatabase.userstringnilMariaDB wordpress database user password

Wordpress parameters

KeyTypeDefaultDescription
apacheDefaultSiteConfigstring""Overwrite default apache 000-default.conf
apachePortsConfigstring""Overwrite default apache ports.conf
customPhpConfigstring""Additional PHP custom.ini
settings.tablePrefixstringnilDatabase table name prefix
settings.maxFileUploadSizestring64MMaximum file upload size
settings.memoryLimitstring128MPHP memory limit
settings.configExtrastringnilExtra values embedded inside wp-config.php
extraEnvSecretslist[]A list of existing secrets that will be mounted into the container as environment variables
extraEnvConfigslist[]A list of existing configmaps that will be mounted into the container as environment variables
extraSecretslist[]A list of additional existing secrets that will be mounted into the container

Storage parameters

KeyTypeDefaultDescription
storage.accessModes[0]string"ReadWriteOnce"Storage access mode
storage.persistentVolumeClaimNamestringnilPVC name when existing storage volume should be used
storage.requestedSizestringnilSize for new PVC, when no existing PVC is used
storage.classNamestringnilStorage class name
storage.keepPvcboolfalseKeep a created Persistent volume claim when uninstalling the helm chart
storage.annotationsobject{}Additional storage annotations
storage.labelsobject{}Additional storage labels

Deploy wordpress with OpenTenant

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