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

Drop PreferNoSchedule from supported effects in ResourceFlavor nodeTaints #4258

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tenzen-y
Copy link
Member

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

As I described in #4257, cluster admins can specify the nodeTaints with effect=PreferNoSchedule in ResourceFlavor, but the flavorassigner never respect the taints.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Add a validation to ResourceFlavor to raise an error against ResourceFlavor with PreferNoSchedule effect nodeTaints

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Feb 14, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tenzen-y

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 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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 14, 2025
Copy link

netlify bot commented Feb 14, 2025

Deploy Preview for kubernetes-sigs-kueue ready!

Name Link
🔨 Latest commit 44e6199
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/67af46c321b40c00086ba2fc
😎 Deploy Preview https://deploy-preview-4258--kubernetes-sigs-kueue.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@tenzen-y tenzen-y force-pushed the drop-prefer-no-schedule-helper branch from 7a547cc to 44e6199 Compare February 14, 2025 13:36
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 14, 2025
@@ -72,7 +72,7 @@ type ResourceFlavorSpec struct {
// +optional
// +listType=atomic
// +kubebuilder:validation:MaxItems=8
// +kubebuilder:validation:XValidation:rule="self.all(x, x.effect in ['NoSchedule', 'PreferNoSchedule', 'NoExecute'])", message="supported taint effect values: 'NoSchedule', 'PreferNoSchedule', 'NoExecute'"
// +kubebuilder:validation:XValidation:rule="self.all(x, x.effect in ['NoSchedule', 'NoExecute'])", message="supported taint effect values: 'NoSchedule' and 'NoExecute'"
Copy link
Contributor

Choose a reason for hiding this comment

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

Indeed, setting PreferNoSchedule is no-op in Kueue, but I imagine people may have some third party controllers which read the nodes (as TAS does) and transform them into the resource flavors. Then, such a controller would need to have a custom logic not to set this value.

I'm not sure people write such controllers already, but maybe it is enough to document that PreferNoSchedule is no-op from Kueue perspective? WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

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

Uhm, good point.
Additionally, I could imagine the situation where they already accidentally deployed RF with PreferNoSchedule effect. In that case, the removal of such RF will fail since kueue will fail to drop in-use finalizer.

Let me convert this PR to just add API comments.

Copy link
Member Author

Choose a reason for hiding this comment

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

/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 17, 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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants