Skip to content

Commit df95cf7

Browse files
authored
feat: helm rbac perms for deployments (coder#8233)
1 parent b8a1435 commit df95cf7

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

helm/templates/rbac.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,21 @@ rules:
2727
- patch
2828
- update
2929
- watch
30-
30+
{{- if .Values.coder.serviceAccount.enableDeployments }}
31+
- apiGroups:
32+
- apps
33+
resources:
34+
- deployments
35+
verbs:
36+
- create
37+
- delete
38+
- deletecollection
39+
- get
40+
- list
41+
- patch
42+
- update
43+
- watch
44+
{{- end }}
3145
---
3246
apiVersion: rbac.authorization.k8s.io/v1
3347
kind: RoleBinding

helm/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ coder:
7373
# It is recommended to keep this on if you are using Kubernetes templates
7474
# within Coder.
7575
workspacePerms: true
76+
# coder.serviceAccount.enableDeployments -- Provides the service account permission
77+
# to manage Kubernetes deployments.
78+
enableDeployments: false
7679
# coder.serviceAccount.annotations -- The Coder service account annotations.
7780
annotations: {}
7881
# coder.serviceAccount.name -- The service account name

0 commit comments

Comments
 (0)