From 012665bd14a64c6ce650f29ebc724280cf6babdc Mon Sep 17 00:00:00 2001 From: Corey Burmeister Date: Sat, 1 Jul 2017 04:50:13 -0700 Subject: [PATCH] Add nodeSelector to stable/redis (#1290) This commit adds support for `nodeSelector` and `tolerations` to the `stable/redis` chart. --- stable/redis/Chart.yaml | 2 +- stable/redis/README.md | 2 ++ stable/redis/templates/deployment.yaml | 8 ++++++++ stable/redis/values.yaml | 6 ++++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/stable/redis/Chart.yaml b/stable/redis/Chart.yaml index d25e593dcc..2368787101 100644 --- a/stable/redis/Chart.yaml +++ b/stable/redis/Chart.yaml @@ -1,5 +1,5 @@ name: redis -version: 0.7.1 +version: 0.8.0 appVersion: 3.2.9 description: Open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets. keywords: diff --git a/stable/redis/README.md b/stable/redis/README.md index 2f5ba32c9a..5cc280b571 100644 --- a/stable/redis/README.md +++ b/stable/redis/README.md @@ -60,6 +60,8 @@ The following tables lists the configurable parameters of the Redis chart and th | `metrics.imageTag` | Exporter image | `v0.11` | | `metrics.imagePullPolicy` | Exporter image pull policy | `IfNotPresent` | | `metrics.resources` | Exporter resource requests/limit | Memory: `256Mi`, CPU: `100m` | +| `nodeSelector` | Node labels for pod assignment | {} | +| `tolerations` | Toleration labels for pod assignment | [] | The above parameters map to the env variables defined in [bitnami/redis](http://github.com/bitnami/bitnami-docker-redis). For more information please refer to the [bitnami/redis](http://github.com/bitnami/bitnami-docker-redis) image documentation. diff --git a/stable/redis/templates/deployment.yaml b/stable/redis/templates/deployment.yaml index d3b2150861..5591802dc3 100644 --- a/stable/redis/templates/deployment.yaml +++ b/stable/redis/templates/deployment.yaml @@ -13,6 +13,14 @@ spec: labels: app: {{ template "fullname" . }} spec: + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.tolerations }} + tolerations: +{{ toYaml .Values.tolerations | indent 8 }} + {{- end }} containers: - name: {{ template "fullname" . }} image: "{{ .Values.image }}" diff --git a/stable/redis/values.yaml b/stable/redis/values.yaml index 89e3f1daff..aedcf64fef 100644 --- a/stable/redis/values.yaml +++ b/stable/redis/values.yaml @@ -52,3 +52,9 @@ resources: requests: memory: 256Mi cpu: 100m + +## Node labels and tolerations for pod assignment +## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector +## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature +nodeSelector: {} +tolerations: []