[stable/wordpress] Unify and document production values (#14665)

* Unify and document production values

Signed-off-by: Carlos Rodriguez Hernandez <crhernandez@bitnami.com>

* Fix typo

Signed-off-by: Carlos Rodriguez Hernandez <crhernandez@bitnami.com>

* Add suggestion

Signed-off-by: Carlos Rodriguez Hernandez <crhernandez@bitnami.com>

* Bump version

Signed-off-by: Carlos Rodriguez Hernandez <crhernandez@bitnami.com>
This commit is contained in:
Carlos Rodríguez Hernández
2019-06-11 06:38:19 -07:00
committed by Kubernetes Prow Robot
parent cb8e1a9d13
commit b13f0b1cbb
4 changed files with 64 additions and 18 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: wordpress
version: 5.12.2
version: 5.12.3
appVersion: 5.2.1
description: Web publishing platform for building blogs and websites.
icon: https://bitnami.com/assets/stacks/wordpress/img/wordpress-stack-220x234.png
+50 -11
View File
@@ -54,7 +54,7 @@ The following table lists the configurable parameters of the WordPress chart and
| `image.registry` | WordPress image registry | `docker.io` |
| `image.repository` | WordPress image name | `bitnami/wordpress` |
| `image.tag` | WordPress image tag | `{TAG_NAME}` |
| `image.pullPolicy` | Image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `wordpressSkipInstall` | Skip wizard installation | `false` |
| `wordpressUsername` | User of the application | `user` |
@@ -146,22 +146,55 @@ $ helm install --name my-release -f values.yaml stable/wordpress
> **Tip**: You can use the default [values.yaml](values.yaml)
### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/)
### Production configuration
It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
## Production and horizontal scaling
The following repo contains the recommended production settings for wordpress capture in an alternative [values file](values-production.yaml). Please read carefully the comments in the values-production.yaml file to set up your environment appropriately.
To horizontally scale this chart, first download the [values-production.yaml](values-production.yaml) file to your local folder, then:
This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`.
```console
$ helm install --name my-release -f ./values-production.yaml stable/wordpress
```
- Set Apache AllowOverride directive to None:
```diff
- allowOverrideNone: false
+ allowOverrideNone: true
```
- Number of WordPress Pods to run
```diff
- replicaCount: 1
+ replicaCount: 3
```
- Kubernetes Service type:
```diff
- service.type: LoadBalancer
+ service.type: ClusterIP
```
- Enable client source IP preservation:
```diff
- service.externalTrafficPolicy: Cluster
+ service.externalTrafficPolicy: Local
```
- PVC Access Mode:
```diff
- persistence.accessMode: ReadWriteOnce
+ ##
+ ## To use the /admin portal and to ensure you can scale wordpress you need to provide a
+ ## ReadWriteMany PVC, if you dont have a provisioner for this type of storage
+ ## We recommend that you install the nfs provisioner and map it to a RWO volume
+ ## helm install stable/nfs-server-provisioner --set persistence.enabled=true,persistence.size=10Gi
+ persistence.accessMode: ReadWriteMany
```
- Start a side-car prometheus exporter:
```diff
- metrics.enabled: false
+ metrics.enabled: true
```
Note that [values-production.yaml](values-production.yaml) includes a replicaCount of 3, so there will be 3 WordPress pods. As a result, to use the /admin portal and to ensure you can scale wordpress you need to provide a ReadWriteMany PVC, if you don't have a provisioner for this type of storage, we recommend that you install the nfs provisioner and map it to a RWO volume.
```console
@@ -169,6 +202,12 @@ $ helm install stable/nfs-server-provisioner --set persistence.enabled=true,pers
$ helm install --name my-release -f values-production.yaml --set persistence.storageClass=nfs stable/wordpress --set mariadb.master.persistence.storageClass=nfs
```
### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/)
It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
## Sidecars
If you have a need for additional containers to run within the same pod as WordPress (e.g. an additional metrics or logging exporter), you can do so via the `sidecars` config parameter. Simply define your container according to the Kubernetes container spec.
+10 -3
View File
@@ -14,6 +14,10 @@ image:
registry: docker.io
repository: bitnami/wordpress
tag: 5.2.1-debian-9-r21
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
##
pullPolicy: IfNotPresent
## Optionally specify an array of imagePullSecrets.
## Secrets must be manually created in the namespace.
@@ -80,7 +84,7 @@ updateStrategy:
allowEmptyPassword: true
## Set Apache allowOverride to None
## ref: https://github.com/bitnami/bitnami-docker-wordpress#environment-variables
##
allowOverrideNone: true
@@ -193,7 +197,6 @@ service:
## Allow health checks to be pointed at the https port
healthcheckHttps: false
## Configure extra options for liveness and readiness probes
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
livenessProbe:
@@ -314,6 +317,10 @@ tolerations: []
##
affinity: {}
## Pod annotations
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
##
podAnnotations: {}
## Prometheus Exporter / Metrics
##
metrics:
@@ -329,7 +336,7 @@ metrics:
##
# pullSecrets:
# - myRegistryKeySecretName
## Metrics exporter pod Annotation and Labels
## Metrics exporter pod Annotation and Labels
podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9117"
+3 -3
View File
@@ -335,9 +335,9 @@ metrics:
podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9117"
## Metrics exporter resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
## Metrics exporter resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
# resources: {}
sidecars: