From 1fba36563fb976c9e58cc396ce03cba7db9507eb Mon Sep 17 00:00:00 2001 From: RobAtticus Date: Wed, 2 Oct 2019 15:00:33 -0400 Subject: [PATCH] Add ability to annotate the proxy Service via Helm (#1402) It is often use to add custom annotations to a Service deployed through Helm, so this PR adds the ability for a user to specify annotations in their values file. For such use case we have seen is when working in conjunction with external-dns, we want to assign DNS properties of the Service, but currently cannot because this Helm chart does not support it. --- charts/athens-proxy/Chart.yaml | 2 +- charts/athens-proxy/templates/service.yaml | 4 ++++ charts/athens-proxy/values.yaml | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/athens-proxy/Chart.yaml b/charts/athens-proxy/Chart.yaml index b0fcfbc0..54635ce6 100644 --- a/charts/athens-proxy/Chart.yaml +++ b/charts/athens-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: athens-proxy -version: 0.3.3 +version: 0.3.4 appVersion: 0.6.0 description: The proxy server for Go modules icon: https://raw.githubusercontent.com/gomods/athens/master/docs/static/banner.png diff --git a/charts/athens-proxy/templates/service.yaml b/charts/athens-proxy/templates/service.yaml index e2420e1e..db289fee 100644 --- a/charts/athens-proxy/templates/service.yaml +++ b/charts/athens-proxy/templates/service.yaml @@ -2,6 +2,10 @@ apiVersion: v1 kind: Service metadata: name: {{ template "fullname" . }} +{{- if .Values.service.annotations }} + annotations: +{{ toYaml .Values.service.annotations | indent 4 }} +{{- end }} labels: app: {{ template "fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" diff --git a/charts/athens-proxy/values.yaml b/charts/athens-proxy/values.yaml index f929870d..9cabbfa3 100644 --- a/charts/athens-proxy/values.yaml +++ b/charts/athens-proxy/values.yaml @@ -11,6 +11,8 @@ image: pullPolicy: IfNotPresent service: + ## Additional annotations to apply to the service + annotations: {} ## Port as exposed by the service servicePort: 80 ## Type of service; valid values are "ClusterIP", "LoadBalancer", and