Skip to content

Commit

Permalink
Merge pull request #1 from octoenergy/nessex-disable-rbac-creation
Browse files Browse the repository at this point in the history
Toggle for ClusterRole and ClusterRoleBinding
  • Loading branch information
nessex authored Dec 3, 2024
2 parents 1493025 + 298f9ae commit 912572b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/vantage-kubernetes-agent/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.clusterRole.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down Expand Up @@ -45,3 +46,4 @@ rules:
- "rollouts"
verbs: ["get", "watch", "list"]
{{- end}}
{{- end}}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.clusterRoleBinding.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand All @@ -16,3 +17,4 @@ roleRef:
kind: ClusterRole
name: {{ include "vantage-kubernetes-agent.fullname" . }}
apiGroup: rbac.authorization.k8s.io
{{- end}}
6 changes: 6 additions & 0 deletions charts/vantage-kubernetes-agent/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@
"properties": {
"annotations": {
"type": "object"
},
"create": {
"type": "boolean"
}
}
},
Expand All @@ -90,6 +93,9 @@
"properties": {
"annotations": {
"type": "object"
},
"create": {
"type": "boolean"
}
}
},
Expand Down
2 changes: 2 additions & 0 deletions charts/vantage-kubernetes-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@ serviceAccount:
name: ""

clusterRole:
create: true
annotations: {}
clusterRoleBinding:
create: true
annotations: {}

appLabels: {}
Expand Down

0 comments on commit 912572b

Please sign in to comment.