Skip to content

Commit 494d739

Browse files
committed
add feature to enable permission to manage Kubernates services inside helm
1 parent 26740cf commit 494d739

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

helm/coder/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ coder:
9494
# coder.serviceAccount.enableDeployments -- Provides the service account permission
9595
# to manage Kubernetes deployments.
9696
enableDeployments: true
97+
# coder.serviceAccount.enableServices -- Provides the service account permission
98+
# to manage Kubernetes services.
99+
enableServices: false
97100
# coder.serviceAccount.annotations -- The Coder service account annotations.
98101
annotations: {}
99102
# coder.serviceAccount.name -- The service account name

helm/libcoder/templates/_rbac.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,19 @@ rules:
4343
- update
4444
- watch
4545
{{- end }}
46+
{{- if .Values.coder.serviceAccount.enableServices }}
47+
- apiGroups: [""]
48+
resources: ["services"]
49+
verbs:
50+
- create
51+
- delete
52+
- deletecollection
53+
- get
54+
- list
55+
- patch
56+
- update
57+
- watch
58+
{{- end }}
4659
---
4760
apiVersion: rbac.authorization.k8s.io/v1
4861
kind: RoleBinding

0 commit comments

Comments
 (0)