Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add labels to aggregate appwrapper editor/viewer role RBACs #261

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions config/default/editor_role_patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: editor-role
labels:
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rbac.authorization.k8s.io/aggregate-to-admin: "true"
4 changes: 4 additions & 0 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ patches:
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# crd/kustomization.yaml
- path: manager_webhook_patch.yaml

# Add aggregate labels to rbacs
- path: editor_role_patch.yaml
- path: viewer_role_patch.yaml
6 changes: 6 additions & 0 deletions config/default/viewer_role_patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: viewer-role
labels:
rbac.authorization.k8s.io/aggregate-to-view: "true"
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
app.kubernetes.io/created-by: appwrapper
app.kubernetes.io/part-of: appwrapper
app.kubernetes.io/managed-by: kustomize
name: appwrapper-editor-role
name: editor-role
rules:
- apiGroups:
- workload.codeflare.dev
Expand Down
2 changes: 2 additions & 0 deletions config/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ resources:
- leader_election_role.yaml
- leader_election_role_binding.yaml
- user_role.yaml
- editor_role.yaml
- viewer_role.yaml
# Comment the following 4 lines if you want to disable
# the auth proxy (https://github.com/brancz/kube-rbac-proxy)
# which protects your /metrics endpoint.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
app.kubernetes.io/created-by: appwrapper
app.kubernetes.io/part-of: appwrapper
app.kubernetes.io/managed-by: kustomize
name: appwrapper-viewer-role
name: viewer-role
rules:
- apiGroups:
- workload.codeflare.dev
Expand Down