From 6440f8a9c8b9b0175c818bd20a4325d6d16fbaa6 Mon Sep 17 00:00:00 2001 From: timothy-spencer Date: Fri, 23 Apr 2021 16:33:58 -0700 Subject: [PATCH 1/3] add value to let you annotate the service account --- examples/chart/teleport-cluster/templates/serviceaccount.yaml | 4 ++++ examples/chart/teleport-cluster/values.yaml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/examples/chart/teleport-cluster/templates/serviceaccount.yaml b/examples/chart/teleport-cluster/templates/serviceaccount.yaml index 81c0d7ed4d2ed..fada7cd97d7f8 100644 --- a/examples/chart/teleport-cluster/templates/serviceaccount.yaml +++ b/examples/chart/teleport-cluster/templates/serviceaccount.yaml @@ -3,3 +3,7 @@ kind: ServiceAccount metadata: name: {{ .Release.Name }} namespace: {{ .Release.Namespace }} +{{- if .Values.serviceAccountAnnotations }} + annotations: +{{ toYaml .Values.serviceAccountAnnotations | indent 4 }} +{{- end -}} diff --git a/examples/chart/teleport-cluster/values.yaml b/examples/chart/teleport-cluster/values.yaml index 2e70ba957c4d6..389290a886f38 100644 --- a/examples/chart/teleport-cluster/values.yaml +++ b/examples/chart/teleport-cluster/values.yaml @@ -51,3 +51,5 @@ replicaCount: 1 # The default is INFO, which is recommended in production. # DEBUG is useful during first-time setup or to see more detailed logs for debugging. logLevel: INFO +# Annotations for to put on the serviceaccount +serviceAccountAnnotations: {} From 66c1d09f555c07ee326edd56d19dd3418f6363f1 Mon Sep 17 00:00:00 2001 From: timothy-spencer Date: Fri, 23 Apr 2021 16:38:05 -0700 Subject: [PATCH 2/3] I can grammar, really --- examples/chart/teleport-cluster/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/chart/teleport-cluster/values.yaml b/examples/chart/teleport-cluster/values.yaml index 389290a886f38..5fa23da58b5ba 100644 --- a/examples/chart/teleport-cluster/values.yaml +++ b/examples/chart/teleport-cluster/values.yaml @@ -51,5 +51,5 @@ replicaCount: 1 # The default is INFO, which is recommended in production. # DEBUG is useful during first-time setup or to see more detailed logs for debugging. logLevel: INFO -# Annotations for to put on the serviceaccount +# Annotations to put on the serviceaccount serviceAccountAnnotations: {} From cedc6f30b3a113e94f4bb2001817bdcc64c07b57 Mon Sep 17 00:00:00 2001 From: timothy-spencer Date: Fri, 23 Apr 2021 16:43:03 -0700 Subject: [PATCH 3/3] add this to teleport-kube-agent too --- .../chart/teleport-kube-agent/templates/serviceaccount.yaml | 4 ++++ examples/chart/teleport-kube-agent/values.yaml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/examples/chart/teleport-kube-agent/templates/serviceaccount.yaml b/examples/chart/teleport-kube-agent/templates/serviceaccount.yaml index 0316b7ea9c211..f35e19845a1f7 100644 --- a/examples/chart/teleport-kube-agent/templates/serviceaccount.yaml +++ b/examples/chart/teleport-kube-agent/templates/serviceaccount.yaml @@ -3,3 +3,7 @@ kind: ServiceAccount metadata: name: {{ .Values.serviceAccountName }} namespace: {{ .Release.Namespace }} +{{- if .Values.serviceAccountAnnotations }} + annotations: +{{ toYaml .Values.serviceAccountAnnotations | indent 4 }} +{{- end -}} diff --git a/examples/chart/teleport-kube-agent/values.yaml b/examples/chart/teleport-kube-agent/values.yaml index 888f8f7cad2e5..8575559240c6a 100644 --- a/examples/chart/teleport-kube-agent/values.yaml +++ b/examples/chart/teleport-kube-agent/values.yaml @@ -72,6 +72,8 @@ clusterRoleName: teleport-kube-agent clusterRoleBindingName: teleport-kube-agent # Name of the service account used by the agent. serviceAccountName: teleport-kube-agent +# Annotations to put on the serviceaccount +serviceAccountAnnotations: {} # Name of the Secret to store the teleport join token. secretName: teleport-kube-agent-join-token # Log level for the Teleport process.