-
Notifications
You must be signed in to change notification settings - Fork 39.4k
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
volumebinding: scheduler queueing hints - PersistentVolume #124960
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: bells17 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 |
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
/cc @sanposhiho @utam0k |
/kind feature |
pkg/scheduler/framework/plugins/volumebinding/volume_binding.go
Outdated
Show resolved
Hide resolved
pkg/scheduler/framework/plugins/volumebinding/volume_binding.go
Outdated
Show resolved
Hide resolved
1daf305
to
645c553
Compare
/retest |
/cc @carlory |
I'm quite busy today, I'll find time to take a look this week |
/assign |
/cc @jsafrane @xing-yang |
|
||
for _, vol := range pod.Spec.Volumes { | ||
if vol.Name == newPV.Name { | ||
logger.V(4).Info("PersistentVolume referenced by the Pod was created or updated") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, we're using level:5 or 6 in QHint.
) | ||
|
||
for _, vol := range pod.Spec.Volumes { | ||
if vol.Name == newPV.Name { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is pod.Spec.Volumes[*].Name
related to PV's name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, that was my mistake, so I've fixed it.
41979de
to
b0c6e46
Compare
b0c6e46
to
7ac2504
Compare
@sanposhiho Thank you for your review. I have made the necessary changes, so please take another look. |
@@ -99,7 +100,7 @@ func (pl *VolumeBinding) EventsToRegister() []framework.ClusterEventWithHint { | |||
{Event: framework.ClusterEvent{Resource: framework.StorageClass, ActionType: framework.Add | framework.Update}}, | |||
// We bind PVCs with PVs, so any changes may make the pods schedulable. | |||
{Event: framework.ClusterEvent{Resource: framework.PersistentVolumeClaim, ActionType: framework.Add | framework.Update}}, | |||
{Event: framework.ClusterEvent{Resource: framework.PersistentVolume, ActionType: framework.Add | framework.Update}}, | |||
{Event: framework.ClusterEvent{Resource: framework.PersistentVolume, ActionType: framework.Add | framework.Update}, QueueingHintFn: pl.isSchedulableAfterPersistentVolumeChange}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why this plugin registers PV events. IMO, The pv events can not directly influence a pod's schedulability. During the process of binding a PV to a PVC, the PV are always updated first, then the PVC is updated. So the later PVC event may make the Pod become schedulable. so registering PV events maybe not necessary but it may accelerate the pod scheduling process (it doesn't wait for the pvc to be bound and put the pod into backoffQ).
It was added by this PR: #100003
/close |
@bells17: Closed this PR. In response to this:
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. |
/reopen |
@bells17: Reopened this PR. In response to this:
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. |
/close |
@bells17: Closed this PR. In response to this:
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. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
kube-scheduler implements scheduling hints for the VolumeBinding plugin.
The scheduling hints allow the scheduler to determine whether to retry or skip scheduling a Pod based on the changes made to the PersistentVolume resource referenced by the plugin.
Which issue(s) this PR fixes:
Part of #118893
KEP: https://github.com/kubernetes/enhancements/blob/master/keps/sig-scheduling/4247-queueinghint/README.md
Base PR: #124939
Special notes for your reviewer:
Fields Impacting QueueingHintFn
PersistentVolume (PV) is not included in this table because it can undergo extensive changes when a conversion is performed by csi-translation-lib.
ref(ja): https://zenn.dev/bells17/scraps/65bd6891012bdc
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: