Skip to content

OCPBUGS-55069:updates RBAC for UDN #92273

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

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
11 changes: 5 additions & 6 deletions modules/nw-udn-cr.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@

The following procedure creates a `UserDefinedNetwork` CR that is namespace scoped. Based upon your use case, create your request by using either the `my-layer-two-udn.yaml` example for a `Layer2` topology type or the `my-layer-three-udn.yaml` example for a `Layer3` topology type.

//We won't have these pieces till GA in 4.18.
//[NOTE]
//====
//If any cluster default networked pods exist before the user-defined network is created, any further pods created in this namespace will return an error message: `What_is_this`?
//====
.Perquisites

* You have logged in with `cluster-admin` privileges, or you have `view` and `edit` role-based access control (RBAC).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can squeeze this somehow here admin or view & edit roles in the subject namespace. ?

Copy link
Contributor Author

@JoeAldinger JoeAldinger Apr 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only reason I didn't add the namespace specificity is because the first step of creating a UDN is to create a namespace so I thought we were covered. Also, all of those roles would be able to create namespaces.

Copy link

@ormergi ormergi Apr 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't saying "you have view and edit role" imply users they should configure it manually?
How about somthing like "or project-admin (self-provisioner) privileges"?

We have added cluster-roles with aggregation to view and edit roles with the required permissions for UDN CRs #92273
Once a non-admin user logs in they should be granted with view & edit roles automatically and have the require permissions to work with UDN CRs.



.Procedure

Expand All @@ -24,7 +23,7 @@ $ cat << EOF | oc apply -f -
apiVersion: v1
kind: Namespace
metadata:
name: <udn_namespace_name>
name: <udn_namespace_name>
labels:
k8s.ovn.org/primary-user-defined-network: ""
EOF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ include::modules/nw-udn-best-practices.adoc[leveloffset=+2]
//How to implement the UDN API by using the CLI.
include::modules/nw-udn-cr.adoc[leveloffset=+2]

[role="_additional-resources"]
.Additional resources
* xref:../../../authentication/using-rbac.adoc#authorization-overview_using-rbac[Default cluster roles]

//How to implement the UDN API by using the UI
include::modules/nw-udn-cr-ui.adoc[leveloffset=+2]

Expand Down