feat(helm): expose gateway scheduling fields and data volume config - #2832
Open
bjw123 wants to merge 1 commit into
Open
feat(helm): expose gateway scheduling fields and data volume config#2832bjw123 wants to merge 1 commit into
bjw123 wants to merge 1 commit into
Conversation
The gateway pod template exposes nodeSelector, affinity and tolerations but not priorityClassName or topologySpreadConstraints, and the StatefulSet hardcodes the data volume at 1Gi with no StorageClass control. Operators who need any of these have to fork the chart or mutate the rendered output out-of-band. Add four optional passthroughs: - priorityClassName: the gateway is a control-plane component. When it shares nodes with the workloads it serves, the default priority gives it no advantage under node pressure, so a local capacity crunch can evict it and widen into a fleet-wide outage. - topologySpreadConstraints: spread replicas across zones or nodes. Only affinity was available, which is a blunter tool for even spreading. - persistence.size / persistence.storageClassName: volumeClaimTemplates is immutable, so a claim created at 1Gi cannot be grown through the chart later. Omitting storageClassName also leaves the claim Pending on clusters with no default StorageClass. Both scheduling fields go in the shared gatewayPodTemplate, so they apply identically to the statefulset and deployment workload shapes. persistence applies to the statefulset only, which is where the volume exists. All four render only when set and default to current behaviour: 1Gi, no storageClassName, and neither scheduling field emitted. A default render is byte-identical to before this change. Signed-off-by: Bryce Wilkinson <bwilkinson@alpha-sense.com>
|
Thank you for your submission! We ask that you sign our Developer Certificate of Origin before we can accept your contribution. You can sign the DCO by adding a comment below using this text: I have read the DCO document and I hereby sign the DCO. You can retrigger this bot by commenting recheck in this Pull Request. Posted by the DCO Assistant Lite bot. |
bjw123
marked this pull request as ready for review
August 20, 2026 10:43
bjw123
requested review from
a team,
derekwaynecarr,
mrunalp and
sjenning
as code owners
August 20, 2026 10:43
Collaborator
|
Hello, thank you for your contribution. Can you accept the DCO on the pull request so we can get started on reviewing and testing the pull request please? |
Author
|
I have read the DCO document and I hereby sign the DCO. |
Collaborator
|
recheck |
Collaborator
|
/ok-to-test 239b2dd |
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
The gateway pod template exposes
nodeSelector,affinityandtolerationsbut notpriorityClassNameortopologySpreadConstraints, and the StatefulSet hardcodes its data volume at1Giwith no StorageClass control. Operators who need any of these have to fork the chart or mutate the rendered output out-of-band.This adds four optional passthroughs. All render only when set, and a default render is unchanged.
Related Issue
Fixes #2342. Replaces #2609, which was auto-closed by the vouch gate before I was vouched (thanks @elezar) and which GitHub will not let me reopen after the rebase. No review comments were left on it.
Changes
templates/_gateway-workload.tpl—priorityClassNameandtopologySpreadConstraints. These live in the sharedgatewayPodTemplate, so they apply identically to thestatefulsetanddeploymentworkload shapes, as the issue asks.templates/statefulset.yaml— thevolumeClaimTemplatesstorage size andstorageClassNameare templated instead of a hardcoded1Gi. StatefulSet only, which is where the volume exists.values.yaml—priorityClassName: "",topologySpreadConstraints: [],persistence.size: 1Gi,persistence.storageClassName: "".README.md— regenerated viamise run helm:docs.tests/gateway_scheduling_persistence_test.yaml— 10 cases covering both workload shapes and the PVC defaults.Why each field
priorityClassName— the gateway is a control-plane component. When it shares nodes with the workloads it serves, the default priority of0gives it no advantage under node pressure, so a local capacity crunch can evict it and widen into a fleet-wide outage.topologySpreadConstraints— spreading replicas across zones or nodes currently requiresaffinity, which is a blunter tool for even spreading.persistence.size/persistence.storageClassName—volumeClaimTemplatesis immutable, so a claim created at1Gicannot be grown through the chart afterwards without recreating the StatefulSet. OmittingstorageClassNamealso leaves the claimPendingon clusters with no default StorageClass. Thesizevalue is rendered unquoted deliberately, so the default render stays byte-for-byte identical to today'sstorage: 1Gi.Testing
helm unittest deploy/helm/openshell— the new suite passes; total passing goes from 97 to 107. The 6 failures incredential_drivers_test.yamlandgateway_config_test.yamlare pre-existing: I get the identical 6 against an unmodified worktree oforigin/main, and they look like a helm-unittest version difference infailedTemplatematching rather than anything in this change.mise run pre-commitpasses, includinghelm:lint(all values variants) andhelm:docs:check.Backwards compatibility
helm templatewith default values, this branch vsorigin/main, is identical apart from the per-render generatedkey-encryption-key:The rendered output contains zero occurrences of
priorityClassName,topologySpreadConstraintsorstorageClassName, and the PVC block is unchanged:Verified on a kind cluster
Chart installed on kind v1.34.0 against a test
PriorityClass(value: 900000) and a second, non-default StorageClass, with all four values set. Read back from the live objects rather than the rendered manifests:priorityClassNameopenshell-gateway-critical, resolved by the apiserver tospec.priority=900000topologySpreadConstraintsmaxSkew=1,topologyKey=kubernetes.io/hostname,whenUnsatisfiable=ScheduleAnyway, label selector intact)persistence.size/persistence.storageClassNameopenshell-data-sched-openshell-0Bound, capacity4Gi,storageClassName: openshell-test-sc— i.e. not the cluster default1/1 RunningThe
deploymentworkload shape was verified separately in the same cluster: its pod also reportspriorityClassName=openshell-gateway-critical,priority=900000and the topology key, confirming both shapes pick the fields up from the shared pod template.Checklist