Repository navigation
Reserve capacity while a console waits for authorisation - #31
Merged
Merged
Conversation
While a console waits for approval, hold a low-priority pause pod that asks for the same resources, node selector, tolerations and affinity as the console pod. Delete it once the job exists, or when the console stops or expires. Off unless --pending-capacity is set. Co-authored-by: Leo Sjöberg <phroggyy@users.noreply.github.com>
The placeholder's lifetime is its own creation time plus --pending-capacity-ttl, default 15m. After that it is deleted and not created again while the console stays pending. The console's TTL is unchanged. Co-authored-by: Leo Sjöberg <phroggyy@users.noreply.github.com>
phroggyy
marked this pull request as ready for review
October 14, 2026 14:32
The dedicated package and the names it was the only caller of are gone. The existing console suites are unchanged. Co-authored-by: Leo Sjöberg <phroggyy@users.noreply.github.com>
andy-paine
reviewed
Oct 14, 2026
andy-paine
left a comment
There was a problem hiding this comment.
I think using a Job for this would be simpler like we do in core as that can look after the TTL for you and all you would need to do is delete the top level Job object when creating the Console one. We also pre-pull the image for our warm capacity in core to ensure that is warmed too
The placeholder is a Job owned by the console. It runs the template image with sleep, and its active deadline is the limit. Delete that Job when the console's own Job is created, or when the console stops or expires. Co-authored-by: Leo Sjöberg <phroggyy@users.noreply.github.com>
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.
While a console is waiting for authorisation, the controller creates a Job owned by the Console. The Job runs the console template's own image with
sleep, so that image is pulled onto the node, and it requests the same CPU, memory and ephemeral storage as the console pod. It copies the template's node selector, tolerations and affinity.The Job's active deadline is
--pending-capacity-ttl(default 15 minutes). After that the pods stop, and the Job object is left in place so another is not started while the console is still waiting. The console's own TTL is unchanged. The Job is deleted, with background propagation, when the console's own Job is created, or when the console stops or expires. Deleting the Console still collects it through the owner reference.The behaviour is off unless
--pending-capacityis set. The priority class is--pending-capacity-priority-class, and it has to be one a normal pod can preempt. The Job does not use the console service account. Creating it uses the manager's existing permission to manage Jobs.Testing
No new tests. The existing console suites are unchanged.
make vetpasses.Please merge with a merge commit. Do not squash.