Skip to content

Commit

Permalink
Add ability to annotate the proxy Service via Helm (gomods#1402)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
RobAtticus authored and arschles committed Oct 2, 2019
1 parent e2b4461 commit 1fba365
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/athens-proxy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 4 additions & 0 deletions charts/athens-proxy/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down
2 changes: 2 additions & 0 deletions charts/athens-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1fba365

Please sign in to comment.