diff --git a/stable/wordpress/Chart.yaml b/stable/wordpress/Chart.yaml index 20e63a33c0..ae7c1e4750 100644 --- a/stable/wordpress/Chart.yaml +++ b/stable/wordpress/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: wordpress -version: 5.2.6 +version: 5.4.0 appVersion: 5.1.0 description: Web publishing platform for building blogs and websites. icon: https://bitnami.com/assets/stacks/wordpress/img/wordpress-stack-220x234.png diff --git a/stable/wordpress/README.md b/stable/wordpress/README.md index 7ad6e3fa8f..3b9ba2d4bf 100644 --- a/stable/wordpress/README.md +++ b/stable/wordpress/README.md @@ -89,6 +89,7 @@ The following table lists the configurable parameters of the WordPress chart and | `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` | | `service.nodePorts.http` | Kubernetes http node port | `""` | | `service.nodePorts.https` | Kubernetes https node port | `""` | +| `service.extraPorts` | Extra ports to expose in the service (normally used with the `sidecar` value) | `nil` | | `healthcheckHttps` | Use https for liveliness and readiness | `false` | | `livenessProbeHeaders` | Headers to use for livenessProbe | `nil` | | `readinessProbeHeaders` | Headers to use for readinessProbe | `nil` | @@ -119,6 +120,7 @@ The following table lists the configurable parameters of the WordPress chart and | `metrics.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | | `metrics.podAnnotations` | Additional annotations for Metrics exporter pod | `{prometheus.io/scrape: "true", prometheus.io/port: "9117"}` | | `metrics.resources` | Exporter resource requests/limit | {} | +| `sidecars` | Attach additional containers to the pod | `nil` | The above parameters map to the env variables defined in [bitnami/wordpress](http://github.com/bitnami/bitnami-docker-wordpress). For more information please refer to the [bitnami/wordpress](http://github.com/bitnami/bitnami-docker-wordpress) image documentation. @@ -157,6 +159,30 @@ $ 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 ``` +## 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. + +```yaml +sidecars: +- name: your-image-name + image: your-image + imagePullPolicy: Always + ports: + - name: portname + containerPort: 1234 + +If these sidecars export extra ports, you can add extra port definitions using the `service.extraPorts` value: + +```yaml +service: +... + extraPorts: + - name: extraPort + port: 11311 + targetPort: 11311 +``` + ## Persistence The [Bitnami WordPress](https://github.com/bitnami/bitnami-docker-wordpress) image stores the WordPress data and configurations at the `/bitnami` path of the container. diff --git a/stable/wordpress/templates/deployment.yaml b/stable/wordpress/templates/deployment.yaml index f145a04623..4f990a4fd1 100644 --- a/stable/wordpress/templates/deployment.yaml +++ b/stable/wordpress/templates/deployment.yaml @@ -202,6 +202,9 @@ spec: timeoutSeconds: 1 resources: {{ toYaml .Values.metrics.resources | indent 10 }} +{{- end }} +{{- if .Values.sidecars }} +{{ toYaml .Values.sidecars | indent 6 }} {{- end }} volumes: {{- if and .Values.allowOverrideNone .Values.customHTAccessCM}} diff --git a/stable/wordpress/templates/svc.yaml b/stable/wordpress/templates/svc.yaml index 92b973404e..8baf2e6d8d 100644 --- a/stable/wordpress/templates/svc.yaml +++ b/stable/wordpress/templates/svc.yaml @@ -29,5 +29,8 @@ spec: {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePorts.https)))}} nodePort: {{ .Values.service.nodePorts.https }} {{- end }} +{{- if .Values.service.extraPorts }} +{{ toYaml .Values.service.extraPorts | indent 6 }} +{{- end }} selector: app: "{{ template "wordpress.fullname" . }}" diff --git a/stable/wordpress/values-production.yaml b/stable/wordpress/values-production.yaml index ad429cb0b0..42543d2a0e 100644 --- a/stable/wordpress/values-production.yaml +++ b/stable/wordpress/values-production.yaml @@ -159,6 +159,8 @@ service: ## externalTrafficPolicy: Local annotations: {} + ## Extra ports to expose (normally used with the `sidecar` value) + # extraPorts: ## Allow health checks to be pointed at the https port healthcheckHttps: false @@ -306,3 +308,13 @@ metrics: ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ ## # resources: {} + +sidecars: +## Add sidecars to the pod. +## e.g. +# - name: your-image-name + # image: your-image + # imagePullPolicy: Always + # ports: + # - name: portname + # containerPort: 1234 diff --git a/stable/wordpress/values.yaml b/stable/wordpress/values.yaml index 768f4a610b..aa3db9edef 100644 --- a/stable/wordpress/values.yaml +++ b/stable/wordpress/values.yaml @@ -164,6 +164,8 @@ service: ## externalTrafficPolicy: Cluster annotations: {} + ## Extra ports to expose (normally used with the `sidecar` value) + # extraPorts: ## Allow health checks to be pointed at the https port healthcheckHttps: false @@ -309,3 +311,13 @@ metrics: ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ ## # resources: {} + +sidecars: +## Add sidecars to the pod. +## e.g. +# - name: your-image-name + # image: your-image + # imagePullPolicy: Always + # ports: + # - name: portname + # containerPort: 1234