Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit 51574b3

Browse files
authored
Merge pull request #318 from zfrhv/add-cluster-roles
Add permissions on hnc CRDs to default clusterRoles: cluster-reader, view, edit, admin
2 parents da10d2e + c2fe104 commit 51574b3

File tree

5 files changed

+50
-19
lines changed

5 files changed

+50
-19
lines changed

config/rbac/aggregate_to_admin.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Automatically aggregated to clusterRoles: admin
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
name: admin
6+
labels:
7+
rbac.authorization.k8s.io/aggregate-to-admin: "true"
8+
rules:
9+
- apiGroups:
10+
- hnc.x-k8s.io
11+
resources:
12+
- hierarchicalresourcequotas
13+
- subnamespaceanchors
14+
- hierarchyconfigurations
15+
verbs:
16+
- '*'

config/rbac/aggregate_to_edit.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Automatically aggregated to clusterRoles: edit -> admin
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
name: edit
6+
labels:
7+
rbac.authorization.k8s.io/aggregate-to-edit: "true"
8+
rules:
9+
- apiGroups:
10+
- hnc.x-k8s.io
11+
resources:
12+
- hierarchicalresourcequotas
13+
- subnamespaceanchors
14+
verbs:
15+
- '*'

config/rbac/aggregate_to_view.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Automatically aggregated to clusterRoles: cluster-reader, view -> edit -> admin
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
name: view
6+
labels:
7+
rbac.authorization.k8s.io/aggregate-to-view: "true"
8+
rules:
9+
- apiGroups:
10+
- hnc.x-k8s.io
11+
resources:
12+
- '*'
13+
verbs:
14+
- get
15+
- list
16+
- watch

config/rbac/hnc_admin.yaml

-18
This file was deleted.

config/rbac/kustomization.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
resources:
22
- role.yaml
33
- role_binding.yaml
4-
- hnc_admin.yaml
4+
- aggregate_to_view.yaml
5+
- aggregate_to_edit.yaml
6+
- aggregate_to_admin.yaml
57
- leader_election_role.yaml
68
- leader_election_role_binding.yaml

0 commit comments

Comments
 (0)