diff --git a/helm/templates/coder.yaml b/helm/templates/coder.yaml index a93b332c13..d385c19aa2 100644 --- a/helm/templates/coder.yaml +++ b/helm/templates/coder.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: coder + name: {{ .Values.coder.serviceAccount.name | quote }} annotations: {{ toYaml .Values.coder.serviceAccount.annotations | nindent 4 }} labels: {{- include "coder.labels" . | nindent 4 }} @@ -26,7 +26,7 @@ spec: labels: {{- include "coder.labels" . | nindent 8 }} spec: - serviceAccountName: coder + serviceAccountName: {{ .Values.coder.serviceAccount.name | quote }} restartPolicy: Always {{- with .Values.coder.image.pullSecrets }} imagePullSecrets: diff --git a/helm/templates/rbac.yaml b/helm/templates/rbac.yaml index ede94b4e76..d11ac555c5 100644 --- a/helm/templates/rbac.yaml +++ b/helm/templates/rbac.yaml @@ -16,10 +16,10 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: coder + name: {{ .Values.coder.serviceAccount.name | quote }} subjects: - kind: ServiceAccount - name: coder + name: {{ .Values.coder.serviceAccount.name | quote }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role diff --git a/helm/values.yaml b/helm/values.yaml index ce2a2df5c5..b6ef1aa1a1 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -47,6 +47,8 @@ coder: workspacePerms: true # coder.serviceAccount.annotations -- The Coder service account annotations. annotations: {} + # coder.serviceAccount.name -- The service account name + name: coder # coder.env -- The environment variables to set for Coder. These can be used # to configure all aspects of `coder server`. Please see `coder server --help`