From cf44976e9d6aa6ab5c278ad0652ec204910a35ec Mon Sep 17 00:00:00 2001 From: groundhog2k <10630407+groundhog2k@users.noreply.github.com> Date: Sun, 8 Nov 2020 11:37:46 +0100 Subject: [PATCH] Added wordpress chart documentation (#56) --- charts/wordpress/Chart.yaml | 2 +- charts/wordpress/README.md | 128 ++++++++++++++++++ .../wordpress/templates/extended-config.yaml | 4 + charts/wordpress/values.yaml | 3 + 4 files changed, 136 insertions(+), 1 deletion(-) create mode 100644 charts/wordpress/README.md diff --git a/charts/wordpress/Chart.yaml b/charts/wordpress/Chart.yaml index d2fe4905..f2d31e3a 100644 --- a/charts/wordpress/Chart.yaml +++ b/charts/wordpress/Chart.yaml @@ -8,7 +8,7 @@ maintainers: type: application # This is the chart version. -version: 0.1.0 +version: 0.1.1 # This is the version number of the application being deployed. appVersion: "5.5.1-apache" diff --git a/charts/wordpress/README.md b/charts/wordpress/README.md new file mode 100644 index 00000000..a556811f --- /dev/null +++ b/charts/wordpress/README.md @@ -0,0 +1,128 @@ +# Wordpress + +   + +A Helm chart for Wordpress on Kubernetes + +## TL;DR + +```bash +$ 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](https://hub.docker.com/_/wordpress) to deploy Wordpress in Kubernetes. + +It allows fully supports the deployment of the [ARM64v8 image of Wordpress](https://hub.docker.com/r/arm64v8/wordpress) on a ARM64 based Kubernetes cluster just by exchanging the existing `image.repository` value. + +## 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`: + +```bash +$ helm install my-release groundhog2k/wordpress +``` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +$ helm uninstall my-release +``` + +## Requirements + +| Repository | Name | Version | +|------------|------|---------| +| @groundhog2k | mariadb | 0.1.3 | + +## Common parameters + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| fullnameOverride | string | `""` | Fully override the deployment name | +| nameOverride | string | `""` | Partially override the deployment name | + +## Deployment parameters + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | +| image.repository | string | `"wordpress"` | Image name | +| image.tag | string | `""` | Image tag | +| imagePullSecrets | list | `[]` | Image pull secrets | +| livenessProbe | object | `see values.yaml` | Liveness probe configuration | +| readinessProbe | object | `see values.yaml` | Readiness probe configuration | +| resources | object | `{}` | Resource limits and requests | +| nodeSelector."kubernetes.io/arch" | string | `"amd64"` | Deployment node selector | +| podAnnotations | object | `{}` | Additional pod annotations | +| podSecurityContext | object | `see values.yaml` | Pod security context | +| securityContext | object | `see values.yaml` | Container security context | +| env | list | `[]` | Additional container environmment variables | +| serviceAccount.create | bool | `false` | Enable service account creation | +| serviceAccount.name | string | `""` | Optional name of the service account | +| serviceAccount.annotations | object | `{}` | Additional service account annotations | +| affinity | object | `{}` | Affinity for pod assignment | +| tolerations | list | `[]` | Tolerations for pod assignment | +| containerPort | int | `8000` | Internal http container port | +| replicaCount | int | `1` | Number of replicas | + +## Service paramters + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| service.port | int | `80` | Commento HTTP service port | +| service.type | string | `"ClusterIP"` | Service type | + +## Ingress parameters + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| ingress.enabled | bool | `false` | Enable ingress for Wordpress service | +| ingress.annotations | string | `nil` | Additional annotations for ingress | +| ingress.hosts[0].host | string | `""` | Hostname for the ingress endpoint | +| ingress.tls | list | `[]` | Ingress TLS parameters | +| ingress.maxBodySize | string | `"64m"` | Maximum body size for post requests | + +## Database settings + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| externalDatabase.host | string | `nil` | External database host | +| externalDatabase.name | string | `"wordpress"` | External database name | +| externalDatabase.user | string | `nil` | External database user name | +| externalDatabase.password | string | `nil` | External database user password | +| mariadb.enabled | bool | `false` | Enable MariaDB deployment (will disable external database settings) | +| mariadb.settings.rootPassword | string | `nil` | MariaDB root user password | +| mariadb.storage | string | `nil` | MariaDB storage settings | +| mariadb.userDatabase.name | string | `nil` | MariaDB wordpress database name | +| mariadb.userDatabase.password | string | `nil` | MariaDB wordpress database user | +| mariadb.userDatabase.user | string | `nil` | MariaDB wordpress database user password | + +## Wordpress parameters + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| apacheDefaultSiteConfig | string | `""` | Overwrite default apache 000-default.conf | +| apachePortsConfig | string | `""` | Overwrite default apache ports.conf | +| customPhpConfig | string | `""` | Additional PHP custom.ini | +| settings.tablePrefix | string | `nil` | Database table name prefix | +| settings.maxFileUploadSize | string | `64M` | Maximum file upload size | + +## Storage parameters + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| storage.accessModes[0] | string | `"ReadWriteOnce"` | Storage access mode | +| storage.persistentVolumeClaimName | string | `""` | PVC name when existing storage volume should be used | +| storage.requestedSize | string | `""` | Size for new PVC, when no existing PVC is used | +| storage.className | string | `""` | Storage class name | diff --git a/charts/wordpress/templates/extended-config.yaml b/charts/wordpress/templates/extended-config.yaml index c40bcc54..c4f9343f 100644 --- a/charts/wordpress/templates/extended-config.yaml +++ b/charts/wordpress/templates/extended-config.yaml @@ -24,4 +24,8 @@ data: Listen {{ .Values.containerPort }} {{- end }} custom.ini: | + {{- if .Values.customPhpConfig }} {{ .Values.customPhpConfig | nindent 4 }} + {{- else }} + upload_max_filesize = {{ .Values.settings.maxFileUploadSize }} + {{- end }} diff --git a/charts/wordpress/values.yaml b/charts/wordpress/values.yaml index c4a2edb1..b601e865 100644 --- a/charts/wordpress/values.yaml +++ b/charts/wordpress/values.yaml @@ -127,7 +127,10 @@ externalDatabase: ## Wordpress specific settings settings: + ## Database table name prefix tablePrefix: + ## Maximum file upload size (default: 64M) + maxFileUploadSize: 64M ## Additional PHP custom.ini customPhpConfig: | -- GitLab