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

TAS: Add scheduling gate to Pods admitted by TAS #3262

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

mimowo
Copy link
Contributor

@mimowo mimowo commented Oct 18, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

To add the scheduling pods to the PodTemplate (and thus the Pods) admitted by TAS.

Which issue(s) this PR fixes:

Part of #2724

Special notes for your reviewer:

No release note here, I will add it in a single PR which adds the API.

The assignment is done in PR #3256 . The gate will be removed in a follow up PR. This PR can be merged indepdendently of computing the assignment or topology ungater, but all 3 PRs are required for the feature to work e2e.

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. 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. labels Oct 18, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mimowo

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 Oct 18, 2024
@mimowo
Copy link
Contributor Author

mimowo commented Oct 18, 2024

/assign @PBundyra @gabesaba
/cc @tenzen-y

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 18, 2024
Copy link

netlify bot commented Oct 18, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit f783af8
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/67128b48e4626f00084d17c3

@mimowo
Copy link
Contributor Author

mimowo commented Oct 18, 2024

/cc @alculquicondor

@mimowo mimowo changed the title TAS: Add schedling gate for assigned PodTemplates TAS: Add scheduling gate for assigned PodTemplates Oct 18, 2024
@mimowo mimowo changed the title TAS: Add scheduling gate for assigned PodTemplates TAS: Add scheduling gate to PodTemplates admitted by TAS Oct 18, 2024
@mimowo mimowo changed the title TAS: Add scheduling gate to PodTemplates admitted by TAS TAS: Add scheduling gate to Pods admitted by TAS Oct 18, 2024
pkg/podset/podset.go Outdated Show resolved Hide resolved
pkg/podset/podset_test.go Outdated Show resolved Hide resolved
pkg/podset/podset_test.go Outdated Show resolved Hide resolved
@mimowo mimowo force-pushed the tas-add-scheduling-gate branch from cc52566 to a7caaf3 Compare October 18, 2024 16:20
@mimowo mimowo force-pushed the tas-add-scheduling-gate branch from a7caaf3 to f783af8 Compare October 18, 2024 16:22
Copy link
Contributor

@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.

/lgtm

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

LGTM label has been added.

Git tree hash: 8bebf311fa94a3ee3c153261646000eea6d1148b

@k8s-ci-robot k8s-ci-robot merged commit 4c06305 into kubernetes-sigs:main Oct 18, 2024
16 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.9 milestone Oct 18, 2024
@@ -118,6 +127,12 @@ func (podSetInfo *PodSetInfo) Merge(o PodSetInfo) error {
podSetInfo.Tolerations = append(podSetInfo.Tolerations, t)
}
}
// make sure we don't duplicate schedulingGates
for _, t := range o.SchedulingGates {
if slices.Index(podSetInfo.SchedulingGates, t) == -1 {
Copy link
Member

Choose a reason for hiding this comment

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

Could you switch from this to HasGate lib?

func HasGate(pod *corev1.Pod, gateName string) bool {

@@ -170,6 +187,10 @@ func RestorePodSpec(meta *metav1.ObjectMeta, spec *corev1.PodSpec, info PodSetIn
spec.Tolerations = slices.Clone(info.Tolerations)
changed = true
}
if !slices.Equal(spec.SchedulingGates, info.SchedulingGates) {
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to respect the order of schedulingGate?
I'm wondering if we can ignore the order differences.

PBundyra pushed a commit to PBundyra/kueue that referenced this pull request Nov 5, 2024
kannon92 pushed a commit to openshift-kannon92/kubernetes-sigs-kueue that referenced this pull request Nov 19, 2024
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. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants