From e86e4e902c476bc40c2bc228566ca3c4b8769571 Mon Sep 17 00:00:00 2001 From: Orkhan Mamedov Date: Thu, 7 Mar 2019 13:54:04 -0500 Subject: [PATCH] [stable/memcached] Add ability to specify arbitrary custom labels in memcached helm chart (#11966) * Add ability to specify arbitrary custom labels in memcached helm chart Signed-off-by: orkhanm * Update casing to be consistant across all values file references, add readme reference to new parameter Signed-off-by: orkhanm * Fix circleci lint error "missing starting space in comment (comments)" Signed-off-by: orkhanm * Bump minor version; Change the way yaml is templated into statefulset Signed-off-by: orkhanm * change parameter name from customLabels to podLabels Signed-off-by: orkhanm --- stable/memcached/Chart.yaml | 2 +- stable/memcached/README.md | 1 + stable/memcached/templates/statefulset.yaml | 3 +++ stable/memcached/values.yaml | 5 +++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/stable/memcached/Chart.yaml b/stable/memcached/Chart.yaml index a9409889e4..6b4b75cc6a 100644 --- a/stable/memcached/Chart.yaml +++ b/stable/memcached/Chart.yaml @@ -1,5 +1,5 @@ name: memcached -version: 2.6.0 +version: 2.7.0 appVersion: 1.5.12 description: Free & open source, high-performance, distributed memory object caching system. diff --git a/stable/memcached/README.md b/stable/memcached/README.md index ee87509a4d..7eb5d9514e 100644 --- a/stable/memcached/README.md +++ b/stable/memcached/README.md @@ -54,6 +54,7 @@ The following table lists the configurable parameters of the Memcached chart and | `extraVolumes` | Volume definitions to add as string | Un-set | | `kind` | Install as StatefulSet or Deployment | StatefulSet | | `podAnnotations` | Map of annotations to add to the pod(s) | `{}` | +| `podLabels` | Custom Labels to be applied to statefulset | Un-set | | `nodeSelector` | Simple pod scheduling control | `{}` | | `tolerations` | Allow or deny specific node taints | `{}` | | `affinity` | Advanced pod scheduling control | `{}` | diff --git a/stable/memcached/templates/statefulset.yaml b/stable/memcached/templates/statefulset.yaml index 4b79fda728..188c8a42c8 100644 --- a/stable/memcached/templates/statefulset.yaml +++ b/stable/memcached/templates/statefulset.yaml @@ -17,6 +17,9 @@ spec: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" +{{- with .Values.podLabels }} +{{ toYaml . | indent 8 }} +{{- end}} {{- with .Values.podAnnotations }} annotations: {{ toYaml . | indent 8 }} diff --git a/stable/memcached/values.yaml b/stable/memcached/values.yaml index c617f2e7d7..e6c70dc359 100644 --- a/stable/memcached/values.yaml +++ b/stable/memcached/values.yaml @@ -77,5 +77,10 @@ extraContainers: | extraVolumes: | +## Custom metadata labels to be applied to statefulset and pods +# podLabels: +# foo: "bar" +# bar: "foo" + # To be added to the server pod(s) podAnnotations: {}