Skip to content

Commit

Permalink
added rbac
Browse files Browse the repository at this point in the history
  • Loading branch information
christianhuth committed Oct 1, 2024
1 parent c07f5cf commit 5808b6d
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
47 changes: 47 additions & 0 deletions charts/cluster-api-visualizer/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "cluster-api-visualizer.fullname" . }}
rules:
- apiGroups:
- ''
resources:
- '*'
verbs:
- 'list'
- 'get'
- 'watch'
- apiGroups:
- 'apiextensions.k8s.io'
resources:
- 'customresourcedefinitions'
verbs:
- 'list'
- 'get'
- 'watch'
- apiGroups:
- 'cluster.x-k8s.io'
- 'addons.cluster.x-k8s.io'
- 'bootstrap.cluster.x-k8s.io'
- 'controlplane.cluster.x-k8s.io'
- 'ipam.cluster.x-k8s.io'
- 'infrastructure.cluster.x-k8s.io'
- 'runtime.cluster.x-k8s.io'
resources:
- '*'
verbs:
- '*'
# Note: this is a fallback to allow the visualizer to work with user-specific CRDs.
- apiGroups:
- '*'
resources:
- '*'
verbs:
- 'list'
- 'get'
- 'watch'
- nonResourceURLs:
- '*'
verbs:
- '*'
13 changes: 13 additions & 0 deletions charts/cluster-api-visualizer/templates/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "cluster-api-visualizer.fullname" . }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "cluster-api-visualizer.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ include "cluster-api-visualizer.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}

0 comments on commit 5808b6d

Please sign in to comment.