Skip to content

chore(scheduler): add filter integration tests for missing part plugins: NodeResources plugin #130375

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

Conversation

googs1025
Copy link
Member

What type of PR is this?

/kind cleanup
/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes part of #129856

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

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

None

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. 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. labels Feb 23, 2025
@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 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. labels Feb 23, 2025
@k8s-ci-robot k8s-ci-robot added area/test sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Feb 23, 2025
@googs1025 googs1025 force-pushed the feature/integration_filter_NodeResources branch from 1556b60 to b46629a Compare February 23, 2025 14:31
@k8s-ci-robot
Copy link
Contributor

@haosdent: The label(s) sig/scheduler cannot be applied, because the repository doesn't have them.

In response to this:

/sig scheduler

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.

@haosdent
Copy link
Member

/sig scheduling

@k8s-ci-robot k8s-ci-robot added the sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. label Feb 25, 2025
@googs1025 googs1025 force-pushed the feature/integration_filter_NodeResources branch 2 times, most recently from c40eb9e to 552339b Compare March 7, 2025 01:30
@googs1025
Copy link
Member Author

/cc @macsko @sanposhiho

}).Container(pause).
Obj(),
},
incomingPod: st.MakePod().Name("insufficient-incoming-pod").
Copy link
Member

Choose a reason for hiding this comment

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

Maybe make the incomingPod schedulable if the existingPod would not exist, e.g.
node: 3 CPU
existingPod: 2 CPU
incomingPod: 2 CPU

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Copy link
Member

Choose a reason for hiding this comment

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

I meant to change the pod does not fit due to insufficient node resources test to:

			node: st.MakeNode().Name("insufficient-node").Capacity(
				map[v1.ResourceName]string{
					v1.ResourceCPU:    "3",
					v1.ResourceMemory: "3G",
				}).Obj(),
			existingPod: st.MakePod().Name("insufficient-existing-pod").
				Res(map[v1.ResourceName]string{
					v1.ResourceCPU:    "2",
					v1.ResourceMemory: "2G",
				}).Container(pause).
				Obj(),
			incomingPod: st.MakePod().Name("insufficient-incoming-pod").
				Res(map[v1.ResourceName]string{
					v1.ResourceCPU:    "2",
					v1.ResourceMemory: "2G",
				}).Container(pause).
				Obj(),
			fit: false,

Then we will see if the existingPod is really taken into account by the plugin.

Copy link
Member Author

Choose a reason for hiding this comment

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

oh, I missunstand, done

pause := imageutils.GetPauseImageName()
tests := []struct {
name string
nodes []*v1.Node
Copy link
Member

Choose a reason for hiding this comment

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

Make it a single node, not slice?

Copy link
Member

Choose a reason for hiding this comment

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

The same with existingPods

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@macsko
Copy link
Member

macsko commented Mar 12, 2025

/remove-kind feature

@k8s-ci-robot k8s-ci-robot removed the kind/feature Categorizes issue or PR as related to a new feature. label Mar 12, 2025
@googs1025 googs1025 force-pushed the feature/integration_filter_NodeResources branch 3 times, most recently from c14f8d5 to a8fe1f8 Compare March 20, 2025 06:51
@googs1025 googs1025 force-pushed the feature/integration_filter_NodeResources branch from a8fe1f8 to 364fec1 Compare March 20, 2025 06:54
@googs1025 googs1025 force-pushed the feature/integration_filter_NodeResources branch from 364fec1 to ca42add Compare March 20, 2025 11:48
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 20, 2025
@macsko
Copy link
Member

macsko commented Mar 20, 2025

/lgtm

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

LGTM label has been added.

Git tree hash: b9f348b01e0d681db87a75f2bc20c17bfb161fc6

@googs1025
Copy link
Member Author

/test pull-kubernetes-e2e-kind

Copy link
Member

@sanposhiho sanposhiho 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
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: googs1025, sanposhiho

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 Mar 20, 2025
@k8s-ci-robot k8s-ci-robot merged commit 2dafb0e into kubernetes:master Mar 20, 2025
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.33 milestone Mar 20, 2025
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. area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. 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/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/testing Categorizes an issue or PR as relevant to SIG Testing. 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.

5 participants