feat: implement node locking for NodeSet worker pods#130
Open
giuliocalzo wants to merge 8 commits intoSlinkyProject:mainfrom
Open
feat: implement node locking for NodeSet worker pods#130giuliocalzo wants to merge 8 commits intoSlinkyProject:mainfrom
giuliocalzo wants to merge 8 commits intoSlinkyProject:mainfrom
Conversation
Add `lockNodes` and `lockNodeLifetime` fields to NodeSetSpec to pin worker pods to their assigned Kubernetes nodes. When enabled, the controller records each pod-to-node mapping in NodeSetStatus and injects a requiredDuringSchedulingIgnoredDuringExecution NodeAffinity on pod recreation so each worker always returns to the same physical node. The lockNodeLifetime field controls how long the lock persists: 0 means permanent, and a positive value (in seconds) causes the lock to expire after the pod stops running, allowing it to reschedule freely. Running pods continuously refresh their assignment timestamp so the countdown only begins once the pod is no longer active on the node.
Document the lockNodes and lockNodeLifetime features in the workload isolation guide, nodeset controller concept page, and Helm chart README.
Use ordinal index as map key instead of full pod name, Unix epoch int64 instead of RFC 3339 timestamp, and shorter JSON field names (node, at) to reduce per-entry size from ~90 bytes to ~42 bytes (~53% reduction).
Contributor
Author
|
good morning @vivian-hafener I rebase and adjust based on the last pre-commit checks, feel free to review it |
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.
Summary
Add lockNodes and lockNodeLifetime fields to NodeSetSpec to pin worker pods to their assigned Kubernetes nodes. When enabled, the controller records each pod-to-node mapping in NodeSetStatus and injects a requiredDuringSchedulingIgnoredDuringExecution NodeAffinity on pod recreation so each worker always returns to the same physical node.
The lockNodeLifetime field controls how long the lock persists: 0 means permanent, and a positive value (in seconds) causes the lock to expire after the pod stops running, allowing it to reschedule freely. Running pods continuously refresh their assignment timestamp so the countdown only begins once the pod is no longer active on the node.
Breaking Changes
none
Testing Notes
local testing with kind
Additional Context