fix(imagejob): skip nodes with insufficient resources before scheduling pods - #1235
Open
AruneshDwivedi wants to merge 2 commits into
Open
fix(imagejob): skip nodes with insufficient resources before scheduling pods#1235AruneshDwivedi wants to merge 2 commits into
AruneshDwivedi wants to merge 2 commits into
Conversation
When a PodTemplate is deleted before the imagejob-controller processes the ImageJob, the controller logs a scary 'PodTemplate not found' error and marks the job as failed, even though the job may have already completed or been handled by another controller. This change uses client.IgnoreNotFound to silently ignore missing PodTemplates, matching the pattern already used elsewhere in the controller. Fixes eraser-dev#1051 Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
…ng pods When a node doesn't have enough CPU or memory to run the eraser pod, the controller still creates the pod, which then gets stuck in Pending state (OutOfcpu/Outofmemory). This wastes reconcile cycles and creates noisy logs. Add a resource check before pod creation: compare the node's allocatable resources against the pod's requested/limited resources. If the node can't accommodate the pod, skip it and move to the next node. Fixes eraser-dev#1005 Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
AruneshDwivedi
requested review from
ashnamehrotra,
pmengelbert and
sozercan
as code owners
August 20, 2026 08:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1005
When a node doesn't have enough CPU or memory to run the eraser pod,
the controller still creates the pod, which then gets stuck in Pending
state (OutOfcpu/Outofmemory). This wastes reconcile cycles and creates
noisy logs.
Add a resource check before pod creation: compare the node's allocatable
resources against the pod's requested/limited resources. If the node
can't accommodate the pod, skip it and move to the next node.