Skip to content

Conversation

astraw99
Copy link
Member

What type of PR is this?

/kind bug

What this PR does / why we need it:

Add subjects and namespace empty check in RBAC cluster/rolebinding.
Also add some test cases.

Which issue(s) this PR fixes:

Fixes #129265

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 18, 2024
@k8s-ci-robot k8s-ci-robot requested a review from dims December 18, 2024 11:04
@k8s-ci-robot k8s-ci-robot added the sig/auth Categorizes an issue or PR as relevant to SIG Auth. label Dec 18, 2024
@k8s-ci-robot k8s-ci-robot requested a review from thockin December 18, 2024 11:04
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: astraw99
Once this PR has been reviewed and has the lgtm label, please assign msau42 for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Dec 18, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Dec 18, 2024
@googs1025
Copy link
Member

/retest

@k8s-ci-robot
Copy link
Contributor

@astraw99: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-integration d967ddc link true /test pull-kubernetes-integration
pull-kubernetes-e2e-kind d967ddc link true /test pull-kubernetes-e2e-kind
pull-kubernetes-conformance-kind-ga-only-parallel d967ddc link true /test pull-kubernetes-conformance-kind-ga-only-parallel
pull-kubernetes-e2e-kind-ipv6 d967ddc link true /test pull-kubernetes-e2e-kind-ipv6
pull-kubernetes-verify d967ddc link true /test pull-kubernetes-verify
pull-kubernetes-e2e-gce d967ddc link true /test pull-kubernetes-e2e-gce

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@enj
Copy link
Member

enj commented Jan 14, 2025

Thanks for the PR. However, tightening validation is not allowed as it is backward incompatible.

Empty namespace means "use the same namespace as the role binding."

Empty subject lists are used by some controllers to make it easier to dynamically add and remove items from the list without having to delete the binding when the list is empty.

/close

@k8s-ci-robot
Copy link
Contributor

@enj: Closed this PR.

In response to this:

Thanks for the PR. However, tightening validation is not allowed as it is backward incompatible.

Empty namespace means "use the same namespace as the role binding."

Empty subject lists are used by some controllers to make it easier to dynamically add and remove items from the list without having to delete the binding when the list is empty.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/auth Categorizes an issue or PR as relevant to SIG Auth. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

RBAC cluster/rolebinding created without subjects and SA namespace check

4 participants