From 0aff33c74df4e540961d9d7097eaea438f2b9a5e Mon Sep 17 00:00:00 2001 From: Jeff French Date: Tue, 3 Jul 2018 11:58:18 -0500 Subject: [PATCH] [stable/wordpress] Add pod tolerations and affinity. (#6406) * [stable/wordpress] Add pod tolerations and affinity. * [stable/wordpress] Document tolerations and affinity in README * [stable/wordpress] Bump chart version * bump to 2.1.0 * [stable/wordpress] Remove extra blank lines --- stable/wordpress/Chart.yaml | 2 +- stable/wordpress/README.md | 2 ++ stable/wordpress/templates/deployment.yaml | 9 +++++++++ stable/wordpress/values-production.yaml | 10 ++++++++++ stable/wordpress/values.yaml | 10 ++++++++++ 5 files changed, 32 insertions(+), 1 deletion(-) diff --git a/stable/wordpress/Chart.yaml b/stable/wordpress/Chart.yaml index da70319256..1392c74ad3 100644 --- a/stable/wordpress/Chart.yaml +++ b/stable/wordpress/Chart.yaml @@ -1,5 +1,5 @@ name: wordpress -version: 2.0.1 +version: 2.1.0 appVersion: 4.9.6 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 f460cdd209..11e3f9b3a4 100644 --- a/stable/wordpress/README.md +++ b/stable/wordpress/README.md @@ -96,6 +96,8 @@ The following table lists the configurable parameters of the WordPress chart and | `persistence.accessMode` | PVC Access Mode | `ReadWriteOnce` | | `persistence.size` | PVC Storage Request | `10Gi` | | `nodeSelector` | Node labels for pod assignment | `{}` | +| `tolerations` | List of node taints to tolerate | `[]` | +| `affinity` | Map of node/pod affinities | `{}` | 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. diff --git a/stable/wordpress/templates/deployment.yaml b/stable/wordpress/templates/deployment.yaml index adf57989b8..8b7e416367 100644 --- a/stable/wordpress/templates/deployment.yaml +++ b/stable/wordpress/templates/deployment.yaml @@ -146,3 +146,12 @@ spec: nodeSelector: {{ toYaml .Values.nodeSelector | indent 8 }} {{- end -}} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/stable/wordpress/values-production.yaml b/stable/wordpress/values-production.yaml index 5ab58b6a68..8bf2b9912b 100644 --- a/stable/wordpress/values-production.yaml +++ b/stable/wordpress/values-production.yaml @@ -244,3 +244,13 @@ resources: ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ ## nodeSelector: {} + +## Tolerations for pod assignment +## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ +## +tolerations: [] + +## Affinity for pod assignment +## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +## +affinity: {} diff --git a/stable/wordpress/values.yaml b/stable/wordpress/values.yaml index f85f4100cd..612141d500 100644 --- a/stable/wordpress/values.yaml +++ b/stable/wordpress/values.yaml @@ -242,3 +242,13 @@ resources: ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ ## nodeSelector: {} + +## Tolerations for pod assignment +## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ +## +tolerations: [] + +## Affinity for pod assignment +## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +## +affinity: {}