Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ac4adab

Browse files
authored
feat: set service account name in helm (#5913)
Signed-off-by: Spike Curtis <[email protected]>
1 parent 5290d5b commit ac4adab

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

helm/templates/coder.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
apiVersion: v1
44
kind: ServiceAccount
55
metadata:
6-
name: coder
6+
name: {{ .Values.coder.serviceAccount.name | quote }}
77
annotations: {{ toYaml .Values.coder.serviceAccount.annotations | nindent 4 }}
88
labels:
99
{{- include "coder.labels" . | nindent 4 }}
@@ -26,7 +26,7 @@ spec:
2626
labels:
2727
{{- include "coder.labels" . | nindent 8 }}
2828
spec:
29-
serviceAccountName: coder
29+
serviceAccountName: {{ .Values.coder.serviceAccount.name | quote }}
3030
restartPolicy: Always
3131
{{- with .Values.coder.image.pullSecrets }}
3232
imagePullSecrets:

helm/templates/rbac.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ rules:
1616
apiVersion: rbac.authorization.k8s.io/v1
1717
kind: RoleBinding
1818
metadata:
19-
name: coder
19+
name: {{ .Values.coder.serviceAccount.name | quote }}
2020
subjects:
2121
- kind: ServiceAccount
22-
name: coder
22+
name: {{ .Values.coder.serviceAccount.name | quote }}
2323
roleRef:
2424
apiGroup: rbac.authorization.k8s.io
2525
kind: Role

helm/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ coder:
4747
workspacePerms: true
4848
# coder.serviceAccount.annotations -- The Coder service account annotations.
4949
annotations: {}
50+
# coder.serviceAccount.name -- The service account name
51+
name: coder
5052

5153
# coder.env -- The environment variables to set for Coder. These can be used
5254
# to configure all aspects of `coder server`. Please see `coder server --help`

0 commit comments

Comments
 (0)