Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

OCPBUGS-48110: Update router cluster roles #4427

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This ClusterRole will allow admin access to routes resources.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: aggregate-route-admin
labels:
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rules:
- apiGroups:
- ""
- route.openshift.io
resources:
- routes/status
verbs:
- update
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This ClusterRole will allow access to routes resources.
# This ClusterRole will allow edit access to routes resources.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: aggregate-route
name: aggregate-route-edit
labels:
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -36,13 +36,6 @@ rules:
- get
- list
- watch
- apiGroups:
- ""
- route.openshift.io
resources:
- routes/status
verbs:
- update
- apiGroups:
- ""
- route.openshift.io
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
annotations:
rbac.authorization.kubernetes.io/autoupdate: "true"
name: system:router
rules:
- apiGroups:
Expand Down
3 changes: 2 additions & 1 deletion pkg/components/controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ func startIngressController(ctx context.Context, cfg *config.Config, kubeconfigP
}
clusterRole = []string{
"components/openshift-router/cluster-role.yaml",
"components/openshift-router/cluster-role-aggregate-route.yaml",
"components/openshift-router/cluster-role-aggregate-edit-route.yaml",
"components/openshift-router/cluster-role-aggregate-admin-route.yaml",
"components/openshift-router/cluster-role-system-router.yaml",
}
apps = []string{
Expand Down
4 changes: 3 additions & 1 deletion scripts/auto-rebase/assets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ assets:
- file: service-cloud.yaml
- file: serving-certificate.yaml
git_restore: True
- file: cluster-role-aggregate-route.yaml
- file: cluster-role-aggregate-edit-route.yaml
git_restore: True
- file: cluster-role-aggregate-admin-route.yaml
git_restore: True

- dir: components/ovn/
Expand Down