wordpress

by sammyeby

Helm chartv3.0.1App 7.1.3Verified publisher

A Helm chart for WordPress using SamSoft non-root Docker image (runs as UID 1001 on port 8080)

About this chart

WordPress Helm Chart

A production-ready Helm chart for deploying WordPress on Kubernetes using the official WordPress Docker image. This chart provides automatic WordPress installation, high availability, security best practices, and integration with MariaDB and Memcached for optimal performance.

Overview

This Helm chart deploys WordPress on Kubernetes with the following features:

  • SamSoft WordPress Image: Uses ghcr.io/sammyeby/wordpress:7.1.3, built on the official wordpress:7.1.3-apache image and running as non-root UID 1001 on port 8080
  • Automatic Installation: Automatically installs WordPress using wp-cli, eliminating the need for manual web-based setup
  • High Availability: Supports multiple replicas with rolling updates for zero-downtime deployments
  • Database Integration: Integrated MariaDB subchart for database management
  • Caching: Optional Memcached integration for improved performance
  • Security: Production-ready security contexts, network policies, and secret management
  • Flexibility: Supports external databases, custom PHP configuration, SMTP configuration, and more
  • Compatibility: Works with Minikube, MicroK8s, and production Kubernetes clusters

Quick Start

# Install with default values
helm install my-wordpress .

# Install with custom values
helm install my-wordpress . -f values-production.yaml

# Upgrade existing installation
helm upgrade my-wordpress . -f values-production.yaml

Configuration

The following tables document all available configuration options in values.yaml. Each section corresponds to a logical grouping of related parameters.


Global Parameters

ParameterTypeDefaultDescription
global.imageRegistrystring""Global Docker image registry override
global.imagePullSecretsarray[]Global Docker registry secret names
global.defaultStorageClassstring""Default storage class for dynamic provisioning

Common Parameters

ParameterTypeDefaultDescription
nameOverridestring""Override the name of the chart
fullnameOverridestring""Override the full name of the chart
commonLabelsobject{}Labels to add to all resources
commonAnnotationsobject{}Annotations to add to all resources
clusterDomainstring"cluster.local"Kubernetes cluster domain
extraDeployarray[]Extra Kubernetes resources to deploy

WordPress Image Parameters

ParameterTypeDefaultDescription
image.registrystring"ghcr.io"Docker image registry
image.repositorystring"sammyeby/wordpress"Docker image repository
image.tagstring"7.1.3"Docker image tag
image.digeststring""Docker image digest (for immutable images)
image.pullPolicystring"IfNotPresent"Image pull policy (Always, IfNotPresent, Never)
image.pullSecretsarray[]Docker registry secret names
image.debugbooleanfalseEnable debug mode

WordPress Diagnostic Mode

ParameterTypeDefaultDescription
diagnosticMode.enabledbooleanfalseEnable diagnostic mode (disables probes, overrides command)
diagnosticMode.commandarray["sleep"]Command to override all containers
diagnosticMode.argsarray["infinity"]Args to override all containers

WordPress Configuration Parameters

ParameterTypeDefaultDescription
wordpressUsernamestring"user"WordPress admin username
wordpressPasswordstring""WordPress admin password (or key name if existingSecret is set)
existingSecretstring""Existing secret name for WordPress password
wordpressEmailstring"[email protected]"WordPress admin email
wordpressFirstNamestring"FirstName"WordPress admin first name
wordpressLastNamestring"LastName"WordPress admin last name
wordpressBlogNamestring"User's Blog!"WordPress site title
wordpressTablePrefixstring"wp_"WordPress database table prefix
wordpressSchemestring"http"WordPress site scheme (http or https)
wordpressSiteUrlstring""WordPress site URL (auto-detected if empty)
wordpressSkipInstallbooleanfalseSkip automatic installation (use web installer)
wordpressExtraConfigContentstring""Extra WordPress configuration content
wordpressConfigurationstring""WordPress configuration file content
existingWordPressConfigurationSecretstring""Existing secret for WordPress configuration
wordpressDebugbooleanfalseEnable WordPress debug mode (WP_DEBUG)
wordpressConfigExtrastring""Extra WordPress config (evaluated by eval() in wp-config.php)
wordpressEnableMemcachedbooleantrueEnable Memcached environment variables
wordpressAuthKeystring""WordPress authentication key (auto-generated if empty)
wordpressSecureAuthKeystring""WordPress secure authentication key
wordpressLoggedInKeystring""WordPress logged-in key
wordpressNonceKeystring""WordPress nonce key
wordpressAuthSaltstring""WordPress authentication salt
wordpressSecureAuthSaltstring""WordPress secure authentication salt
wordpressLoggedInSaltstring""WordPress logged-in salt
wordpressNonceSaltstring""WordPress nonce salt
wordpressConfigureCachebooleanfalseConfigure WordPress cache
wordpressPluginsstring"none"WordPress plugins to install
apacheConfigurationstring""Apache configuration content
existingApacheConfigurationConfigMapstring""Existing ConfigMap for Apache configuration
customPostInitScriptsobject{}Custom post-init scripts

Note on wordpressPassword and existingSecret:

  • When existingSecret is set: wordpressPassword value is used as the key name in the secret
  • When existingSecret is NOT set: wordpressPassword value is the actual password (stored in auto-generated secret)

PHP Configuration

ParameterTypeDefaultDescription
phpConfiguration.enabledbooleanfalseEnable PHP configuration via ConfigMap
phpConfiguration.configMapNamestring""ConfigMap name (defaults to chart-generated name)
phpConfiguration.customIniFileNamestring"php-custom.ini"Name of the .ini file in the ConfigMap
phpConfiguration.uploadMaxFilesizestring""Maximum upload file size (e.g., "256M")
phpConfiguration.postMaxSizestring""Maximum POST size (e.g., "256M")
phpConfiguration.maxExecutionTimestring""Maximum execution time in seconds (e.g., 360)
phpConfiguration.maxInputTimestring""Maximum input time in seconds (e.g., 360)
phpConfiguration.memoryLimitstring""PHP memory limit (e.g., "512M")
phpConfiguration.maxInputVarsstring""Maximum input variables (e.g., 3000)
phpConfiguration.uploadTmpDirstring""Custom upload temporary directory
phpConfiguration.additionalSettingsstring""Additional PHP settings (appended to ini file)
phpConfiguration.customInistring""Complete PHP ini content (overrides individual settings)
phpConfiguration.labelsobject{}Additional labels for the ConfigMap

SMTP Configuration

ParameterTypeDefaultDescription
smtpHoststring""SMTP server hostname
smtpPortstring""SMTP server port
smtpUserstring""SMTP username
smtpPasswordstring""SMTP password (or key name if smtpExistingSecret is set)
smtpProtocolstring""SMTP protocol (tls, ssl, etc.)
smtpFromEmailstring""SMTP from email address
smtpFromNamestring""SMTP from name
smtpExistingSecretstring""Existing secret name for SMTP password

Note on smtpPassword and smtpExistingSecret:

  • When smtpExistingSecret is set: smtpPassword value is used as the key name in the secret
  • When smtpExistingSecret is NOT set: smtpPassword value is the actual password (stored in auto-generated secret)

Security Settings

ParameterTypeDefaultDescription
allowEmptyPasswordbooleanfalseAllow empty passwords (not recommended for production)
allowOverrideNonebooleanfalseDisable .htaccess overrides
overrideDatabaseSettingsbooleanfalseOverride database settings
htaccessPersistenceEnabledbooleanfalseEnable .htaccess persistence
customHTAccessCMstring""Custom .htaccess ConfigMap

Environment Variables

ParameterTypeDefaultDescription
commandarray[]Override default container command
argsarray[]Override default container args
extraEnvVarsarray[]Extra environment variables
extraEnvVarsCMstring""ConfigMap name for extra environment variables
extraEnvVarsSecretstring""Secret name for extra environment variables

WordPress Multisite Configuration

ParameterTypeDefaultDescription
multisite.enablebooleanfalseEnable WordPress multisite
multisite.hoststring""Multisite hostname
multisite.networkTypestring"subdomain"Multisite network type (subdomain or subdirectory)
multisite.enableNipIoRedirectbooleanfalseEnable .nip.io redirect for multisite

Deployment Parameters

ParameterTypeDefaultDescription
replicaCountinteger1Number of WordPress replicas (set to 2+ for HA)
updateStrategy.typestring"RollingUpdate"Deployment update strategy
updateStrategy.rollingUpdate.maxSurgestring""Maximum number of pods that can be created during update (default: 1)
updateStrategy.rollingUpdate.maxUnavailablestring""Maximum number of pods that can be unavailable during update (default: 0)
schedulerNamestring""Custom Kubernetes scheduler name
terminationGracePeriodSecondsinteger""Pod termination grace period in seconds
topologySpreadConstraintsarray[]Topology spread constraints
priorityClassNamestring""Pod priority class name
automountServiceAccountTokenbooleanfalseAutomount service account token
hostAliasesarray[]Host aliases for pods
extraVolumesarray[]Extra volumes to mount
extraVolumeMountsarray[]Extra volume mounts
sidecarsarray[]Sidecar containers
initContainersarray[]Init containers
podLabelsobject{}Additional pod labels
podAnnotationsobject{}Additional pod annotations
podAffinityPresetstring""Pod affinity preset
nodeAffinityPreset.typestring""Node affinity preset type
nodeAffinityPreset.keystring""Node affinity preset key
nodeAffinityPreset.valuesarray[]Node affinity preset values
affinityobject{}Custom affinity rules
nodeSelectorobject{}Node selector
tolerationsarray[]Pod tolerations
resourcesPresetstring"micro"Resource preset (nano, micro, small, medium, large)
resources.limitsobject{}Resource limits (CPU, memory)
resources.requestsobject{}Resource requests (CPU, memory)

Container Ports

ParameterTypeDefaultDescription
containerPorts.httpinteger80HTTP container port
containerPorts.httpsinteger443HTTPS container port
extraContainerPortsarray[]Extra container ports

Security Context

ParameterTypeDefaultDescription
podSecurityContext.enabledbooleantrueEnable pod security context
podSecurityContext.fsGroupChangePolicystring"Always"FSGroup change policy
podSecurityContext.sysctlsarray[]Sysctls
podSecurityContext.supplementalGroupsarray[]Supplemental groups
podSecurityContext.fsGroupinteger33FSGroup (www-data group)
containerSecurityContext.enabledbooleantrueEnable container security context
containerSecurityContext.seLinuxOptionsobject{}SELinux options
containerSecurityContext.runAsUserinteger33Run as user (www-data)
containerSecurityContext.runAsGroupinteger33Run as group (www-data)
containerSecurityContext.runAsNonRootbooleantrueRun as non-root user
containerSecurityContext.privilegedbooleanfalseRun in privileged mode
containerSecurityContext.readOnlyRootFilesystembooleanfalseRead-only root filesystem
containerSecurityContext.allowPrivilegeEscalationbooleanfalseAllow privilege escalation
containerSecurityContext.capabilities.droparray["ALL"]

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 v3.0.1 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