Skip to content

Commit

Permalink
Update RBAC configurations for managed cluster agent registration
Browse files Browse the repository at this point in the history
- Added RBAC permissions for 'clusters' resource in rbac_gen.go.
- Updated ClusterRole and ClusterRoleBinding names to remove the 'system:' prefix for consistency.
- Added 'clusters' resource rules to managedcluster-import-role.yaml.

These changes enhance the RBAC definitions for better alignment with the current resource naming conventions.

Signed-off-by: xuezhaojun <[email protected]>
  • Loading branch information
xuezhaojun committed Jan 21, 2025
1 parent 715c8cd commit 9dc2203
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: system:open-cluster-management:managedcluster:bootstrap:agent-registration
name: open-cluster-management:managedcluster:bootstrap:agent-registration
rules:
- apiGroups:
- ""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: 'system:open-cluster-management:managedcluster:bootstrap:agent-registration'
name: 'open-cluster-management:managedcluster:bootstrap:agent-registration'
subjects:
- kind: ServiceAccount
name: agent-registration-bootstrap
namespace: '{{ .Values.global.namespace }}'
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: 'system:open-cluster-management:managedcluster:bootstrap:agent-registration'
name: 'open-cluster-management:managedcluster:bootstrap:agent-registration'
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,10 @@ rules:
- get
- list
- watch
- apiGroups:
- cluster.x-k8s.io
resources:
- clusters
verbs:
- get
- list
1 change: 1 addition & 0 deletions pkg/templates/rbac_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9dc2203

Please sign in to comment.