Skip to content

Commit

Permalink
Reclaimable pods can put pod out of inadmissible
Browse files Browse the repository at this point in the history
Change-Id: Id52ef3c92abd84317c4a7a71c3a20f6f28d67d25
  • Loading branch information
alculquicondor committed Mar 11, 2024
1 parent 3e88ef3 commit 1e66b43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/queue/cluster_queue_impl.go
Expand Up @@ -119,6 +119,7 @@ func (c *clusterQueueBase) PushOrUpdate(wInfo *workload.Info) {
// to potentially become admissible, unless the Eviction status changed
// which can affect the workloads order in the queue.
if equality.Semantic.DeepEqual(oldInfo.Obj.Spec, wInfo.Obj.Spec) &&
equality.Semantic.DeepEqual(oldInfo.Obj.Status.ReclaimablePods, wInfo.Obj.Status.ReclaimablePods) &&
equality.Semantic.DeepEqual(apimeta.FindStatusCondition(oldInfo.Obj.Status.Conditions, kueue.WorkloadEvicted),
apimeta.FindStatusCondition(wInfo.Obj.Status.Conditions, kueue.WorkloadEvicted)) {
c.inadmissibleWorkloads[key] = wInfo
Expand Down
1 change: 1 addition & 0 deletions test/integration/scheduler/scheduler_test.go
Expand Up @@ -616,6 +616,7 @@ var _ = ginkgo.Describe("Scheduler", func() {
util.ExpectResourceFlavorToBeDeleted(ctx, k8sClient, onDemandFlavor, true)
})
ginkgo.It("Should re-enqueue by the update event of ClusterQueue", func() {
metrics.AdmissionAttemptsTotal.Reset()
wl := testing.MakeWorkload("on-demand-wl", ns.Name).Queue(queue.Name).Request(corev1.ResourceCPU, "6").Obj()
gomega.Expect(k8sClient.Create(ctx, wl)).Should(gomega.Succeed())
util.ExpectWorkloadsToBePending(ctx, k8sClient, wl)
Expand Down

0 comments on commit 1e66b43

Please sign in to comment.