-
Notifications
You must be signed in to change notification settings - Fork 276
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
TAS: Add scheduling gate to Pods admitted by TAS #3262
Conversation
[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 |
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
/cc @alculquicondor |
cc52566
to
a7caaf3
Compare
a7caaf3
to
f783af8
Compare
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.
/lgtm
LGTM label has been added. Git tree hash: 8bebf311fa94a3ee3c153261646000eea6d1148b
|
@@ -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 { |
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.
Could you switch from this to HasGate
lib?
Line 26 in 4c06305
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) { |
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.
Do we need to respect the order of schedulingGate?
I'm wondering if we can ignore the order differences.
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?