Repository navigation
Conversation
…ssthrough; release 2.1.19 Worker pools can now set `topologySpreadConstraints` (e.g. spread replicas across hostnames) and `priorityClassName` (e.g. let infrastructure pods outrank workers under resource pressure). Both are optional and passed through verbatim to the pod spec; pools that do not set them render unchanged. Tests cover the new fields, the previously untested `affinity`, and that pools without any scheduling/DNS settings render none of these fields.
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.
Worker pools currently have no way to control where their pods land or how they resolve host names. On clusters that mix small general-purpose nodes with large dedicated (tainted) nodes, that means workers can't be placed on the dedicated nodes, replicas of a pool can pile up on a single node, and a memory spike in a worker competes on equal terms with infrastructure pods (NATS, the frontend) on the same node. Some sites also advertise data servers by short host name, which only resolves with an extra DNS search domain.
This adds optional per-pool fields, each passed through verbatim to the worker pod spec:
nodeSelector,tolerations,affinity— place a pool on (or prefer) specific nodes, including tainted onestopologySpreadConstraints— spread a pool's replicas, e.g. across hostnamespriorityClassName— give workers a priority relative to other podsdnsConfig— e.g. extrasearchesdomains for site-local short host namesAll fields are optional and default to unset. Pools that don't set them render exactly as before (the only rendered diff for existing values is the
helm.sh/chartlabel and the resulting config checksum from the version bump).Changes:
templates/worker-pool.yaml: render the fields above when setvalues.yaml: document them in theworkerPoolsexampletests/: fixture pool using all fields; assertions for each, plus a check that pools without them render none of these fieldsValidation:
tests/run.shpasses;helm lintpasses (default values and the runtime fixture); rendered runtime fixture validates withkubeconform -strict.