feat: Make rbac creation optional in helm chart#14105
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a Helm values toggle to optionally skip creating cluster-scoped RBAC resources, enabling installs where RBAC is managed externally.
Changes:
- Introduced
rbac.createin chart values (defaulttrue). - Gated
ClusterRoleandClusterRoleBindingtemplate rendering behindrbac.create.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| install/helm/kgateway/values.yaml | Adds rbac.create configuration to control RBAC resource creation. |
| install/helm/kgateway/templates/serviceaccount.yaml | Wraps ClusterRoleBinding generation in an rbac.create conditional. |
| install/helm/kgateway/templates/role.yaml | Wraps ClusterRole generation in an rbac.create conditional. |
| {{- if .Values.rbac.create }} | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 |
| kind: ClusterRole | ||
| name: kgateway-{{ .Release.Namespace }} | ||
| apiGroup: rbac.authorization.k8s.io | ||
| {{- end }} |
| @@ -1,3 +1,4 @@ | |||
| {{- if .Values.rbac.create -}} | |||
There was a problem hiding this comment.
I'm not sure if the whitespace comments are justified, from my testing there are no extra whitespace added but I wonder if helm template trims them automatically
There was a problem hiding this comment.
just a nit but this file and the serviceaccount one use inconsistent trimming
{{- if .Values.rbac.create -}} vs.
{{- if .Values.rbac.create }}
any reason not to make them the same?
| - get | ||
| - list | ||
| - watch | ||
| {{- end }} |
Signed-off-by: nil-scan <[email protected]>
Signed-off-by: nil-scan <[email protected]>
fed7fb1 to
7dd3400
Compare
…helm-rbac-toggle Signed-off-by: nil-scan <[email protected]>
Signed-off-by: nil-scan <[email protected]>
Signed-off-by: nil-scan <[email protected]>
Signed-off-by: nil-scan <[email protected]>
Signed-off-by: nil-scan <[email protected]>
Signed-off-by: nil-scan <[email protected]>
Signed-off-by: Jenny Shu <[email protected]>
Signed-off-by: Jenny Shu <[email protected]>
Description
Add an rbac.create (default true) value to optionally disable the creation of the ClusterRole and ClusterRoleBinding
Change Type
/kind feature
Changelog
Additional Notes