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

[Scheduler]Translate beta label to ga in volume_zone #118923

Merged
merged 1 commit into from
Aug 18, 2023

Conversation

AxeZhan
Copy link
Member

@AxeZhan AxeZhan commented Jun 28, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

Translate beta topology label to ga when using scheduler plugin volume_zone, allow PVs with beta labels be scheduled to nodes with GA labels

Which issue(s) this PR fixes:

Fixes #114996

Special notes for your reviewer:

Previously #115225

Does this PR introduce a user-facing change?

volume_zone plugin will consider beta labels as GA labels during the scheduling process.Therefore, if the values of the labels are the same, PVs with beta labels can also be scheduled to nodes with GA labels.

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


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. kind/feature Categorizes issue or PR as related to a new feature. 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. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 28, 2023
@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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Jun 28, 2023
@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jun 28, 2023
@@ -229,6 +229,18 @@ func TestSingleZone(t *testing.T) {
},
wantFilterStatus: framework.NewStatus(framework.UnschedulableAndUnresolvable, ErrReasonConflict),
},
{
name: "pv with beta label,node with ga label",
Copy link
Member Author

Choose a reason for hiding this comment

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

One thing I'm not sure is: in this pr, we let pv with beta label to be scheduled to node with ga label.
Should we make this work the other way around as well? That is, pv with ga label to be scheduled to node with beta label.

Copy link
Member

Choose a reason for hiding this comment

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

I think it is fine to leave out. We converted PVs to use the GA label after introducing the GA label on Nodes.

@AxeZhan
Copy link
Member Author

AxeZhan commented Jun 28, 2023

/cc @msau42

@k8s-ci-robot k8s-ci-robot requested a review from msau42 June 28, 2023 05:40
@msau42
Copy link
Member

msau42 commented Aug 15, 2023

/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 Aug 15, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 6d4aac763df12e4682c0ca2feb6688badf396108

@msau42
Copy link
Member

msau42 commented Aug 15, 2023

/assign @alculquicondor

@AxeZhan
Copy link
Member Author

AxeZhan commented Aug 17, 2023

ping @alculquicondor

@@ -227,6 +241,10 @@ func (pl *VolumeZone) Filter(ctx context.Context, cs *framework.CycleState, pod

for _, pvTopology := range podPVTopologies {
v, ok := node.Labels[pvTopology.key]
if !ok && isBetaLabel(pvTopology.key) {
Copy link
Member

Choose a reason for hiding this comment

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

I think this would be enough?

Suggested change
if !ok && isBetaLabel(pvTopology.key) {
if !ok {

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmmm. Yes, this will make the code cleaner🤔️.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 17, 2023
Copy link
Member

@alculquicondor alculquicondor left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 17, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 79c823a1ef84813b438858f8ae5c0ba10f8dfaae

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor, AxeZhan, msau42

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

The pull request process is described 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 17, 2023
@AxeZhan
Copy link
Member Author

AxeZhan commented Aug 18, 2023

/retest

@k8s-ci-robot k8s-ci-robot merged commit 312dc12 into kubernetes:master Aug 18, 2023
12 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.29 milestone Aug 18, 2023
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/feature Categorizes issue or PR as related to a new feature. 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 Denotes a PR that will be considered when it comes time to generate release notes. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VolumeZone scheduling plugin should handle csi migration
4 participants