From af50f7548a4575abaa26f85b9eeee2254f4295be Mon Sep 17 00:00:00 2001 From: Justin Meacham Date: Wed, 4 Dec 2019 15:56:01 -0600 Subject: [PATCH] INF-2117 Allow annotations for the zookeeper headless service. --- charts/cp-zookeeper/templates/headless-service.yaml | 4 ++++ charts/cp-zookeeper/values.yaml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/charts/cp-zookeeper/templates/headless-service.yaml b/charts/cp-zookeeper/templates/headless-service.yaml index cd95dfb4..96836073 100644 --- a/charts/cp-zookeeper/templates/headless-service.yaml +++ b/charts/cp-zookeeper/templates/headless-service.yaml @@ -7,6 +7,10 @@ metadata: chart: {{ template "cp-zookeeper.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} + annotations: + {{- range $key, $value := .Values.headlessServiceAnnotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} spec: ports: - port: {{ .Values.serverPort }} diff --git a/charts/cp-zookeeper/values.yaml b/charts/cp-zookeeper/values.yaml index ff252b96..0a86e41e 100644 --- a/charts/cp-zookeeper/values.yaml +++ b/charts/cp-zookeeper/values.yaml @@ -92,6 +92,9 @@ resources: {} ## Custom pod annotations podAnnotations: {} +## Headless service annotations +headlessServiceAnnotations: {} + ## Node labels for pod assignment ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ nodeSelector: {}