Skip to content

Commit f4bf0d3

Browse files
authored
feat(helm): allow annotations on the service account (#1295)
Allows customizing the ServiceAccount with custom annotations. Fixes #1249
1 parent 2202437 commit f4bf0d3

4 files changed

Lines changed: 15 additions & 0 deletions

File tree

chart/.snapshots/full.daemonset.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ kind: ServiceAccount
55
metadata:
66
name: hcloud-cloud-controller-manager
77
namespace: kube-system
8+
annotations:
9+
service-account-annotation: service-account-annotation
810
---
911
# Source: hcloud-cloud-controller-manager/templates/clusterrole.yml
1012
apiVersion: rbac.authorization.k8s.io/v1

chart/full.daemonset-values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
kind: DaemonSet
22

3+
serviceAccount:
4+
annotations:
5+
service-account-annotation: service-account-annotation
6+
37
monitoring:
48
podMonitor:
59
labels:

chart/templates/serviceaccount.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ kind: ServiceAccount
33
metadata:
44
name: {{ include "hcloud-cloud-controller-manager.name" . }}
55
namespace: {{ .Release.Namespace }}
6+
{{- with .Values.serviceAccount.annotations }}
7+
annotations:
8+
{{- toYaml . | nindent 4 }}
9+
{{- end }}

chart/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@ rbac:
171171
# Create a cluster role binding with admin access for the service account.
172172
create: true
173173

174+
serviceAccount:
175+
# Annotations to add to the service account.
176+
# See https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
177+
annotations: {}
178+
174179
podLabels: {}
175180

176181
podAnnotations: {}

0 commit comments

Comments
 (0)