Skip to content

system:kube-scheduler: extend the RBAC with pods/finalizers - #123512

Merged
k8s-ci-robot merged 1 commit into
kubernetes:masterfrom
ingvagabund:system-kube-scheduler-rbac-dra-pod-finalizers
Feb 26, 2024
Merged

k8s-ci-robot merged 1 commit into
kubernetes:masterfrom
ingvagabund:system-kube-scheduler-rbac-dra-pod-finalizers

Conversation

@ingvagabund

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

When enabling DynamicResourceAllocation the dynamicresource plugin may error during scheduling with:

E0212 08:57:43.810864       1 schedule_one.go:1003] "Error scheduling pod; retrying" err="running Reserve plugin \"DynamicResources\": podschedulingcontexts.resource.k8s.io \"pod\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: , <nil>" pod="gpu-test2/pod"
E0212 08:57:53.817268       1 framework.go:1323] "Plugin failed" err="podschedulingcontexts.resource.k8s.io \"pod\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: , <nil>" plugin="DynamicResources" pod="gpu-test2/pod"

After extending system:kube-scheduler with:

- apiGroups:
  - ""
  resources:
  - pods/finalizers
  verbs:
  - update

the error is gone and the pod gets successfully scheduled.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

For the PodSchedulingContext ownership.

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

- [KEP]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/3063-dynamic-resource-allocation
- [Other doc]: https://kubernetes.io/docs/concepts/scheduling-eviction/dynamic-resource-allocation/

@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/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Feb 26, 2024
@k8s-ci-robot

Copy link
Copy Markdown
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.

Details

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. sig/auth Categorizes an issue or PR as relevant to SIG Auth. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Feb 26, 2024
@ingvagabund

Copy link
Copy Markdown
Contributor Author

/retest-required

@liggitt

liggitt commented Feb 26, 2024

Copy link
Copy Markdown
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 26, 2024
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 8d0f879e2c31b46783b3a5c736e9975b571e4981

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ingvagabund, liggitt

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

The pull request process is described here

Details 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 26, 2024
@ingvagabund

Copy link
Copy Markdown
Contributor Author

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 26, 2024
@ingvagabund

Copy link
Copy Markdown
Contributor Author

I missed this one. pods/finalizers needs to be under the core group. Apologies.

When enabling DynamicResourceAllocation the dynamicresource plugin may
error during scheduling with:
```
E0212 08:57:53.817268       1 framework.go:1323] "Plugin failed" err="podschedulingcontexts.resource.k8s.io \"pod\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: , <nil>" plugin="DynamicResources" pod="gpu-test2/pod"
```
@ingvagabund
ingvagabund force-pushed the system-kube-scheduler-rbac-dra-pod-finalizers branch from fe08498 to 0045ef5 Compare February 26, 2024 14:42
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 26, 2024
@ingvagabund

Copy link
Copy Markdown
Contributor Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 26, 2024
@liggitt

liggitt commented Feb 26, 2024

Copy link
Copy Markdown
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 26, 2024
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 9837b57548fa80bb2b17fe332c66a5c3fe189def

@ingvagabund

Copy link
Copy Markdown
Contributor Author

/retest-required

@k8s-ci-robot
k8s-ci-robot merged commit 54bcbc3 into kubernetes:master Feb 26, 2024
@k8s-ci-robot k8s-ci-robot added this to the v1.30 milestone Feb 26, 2024
@ingvagabund
ingvagabund deleted the system-kube-scheduler-rbac-dra-pod-finalizers branch February 26, 2024 20:13
mhan8796 pushed a commit to mhan8796/kubernetes that referenced this pull request Jun 27, 2026
…eduler-rbac-dra-pod-finalizers

system:kube-scheduler: extend the RBAC with pods/finalizers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants