-
Notifications
You must be signed in to change notification settings - Fork 633
Add TopologySpreadConstraints to Pod kube_types #11913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TopologySpreadConstraints to Pod kube_types #11913
Conversation
Signed-off-by: sheidkamp <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for TopologySpreadConstraints to Pod specifications in the kgateway system. TopologySpreadConstraints allow users to control how pods are distributed across topology domains (like zones or nodes) for better availability and performance.
- Adds TopologySpreadConstraints field to Pod kube_types
- Implements merge logic for combining TopologySpreadConstraints from different sources
- Updates Helm templates and deployer logic to support the new field
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| api/v1alpha1/kube_types.go | Adds TopologySpreadConstraints field and getter method to Pod struct |
| pkg/deployer/values.go | Adds TopologySpreadConstraints field to HelmGateway struct |
| pkg/deployer/merge.go | Implements merge logic for TopologySpreadConstraints |
| pkg/deployer/deployer_test.go | Adds test coverage for TopologySpreadConstraints |
| internal/kgateway/helm/kgateway/templates/gateway/proxy-deployment.yaml | Updates Helm template to render TopologySpreadConstraints |
| internal/kgateway/deployer/gateway_parameters.go | Wires TopologySpreadConstraints from pod config to gateway values |
| install/helm/kgateway-crds/templates/gateway.kgateway.dev_gatewayparameters.yaml | Adds CRD schema for TopologySpreadConstraints |
| api/v1alpha1/zz_generated.deepcopy.go | Generated deepcopy implementation for TopologySpreadConstraints |
| api/applyconfiguration/internal/internal.go | Updates schema YAML for apply configurations |
| api/applyconfiguration/api/v1alpha1/pod.go | Adds apply configuration support for TopologySpreadConstraints |
Comments suppressed due to low confidence (1)
Signed-off-by: sheidkamp <[email protected]>
…idkamp/kgateway into add-topology-spread-constraint Signed-off-by: sheidkamp <[email protected]>
|
@sheidkamp Looks like there's merge conflicts. I'd also use |
Signed-off-by: sheidkamp <[email protected]>
Signed-off-by: Seth Heidkamp <[email protected]>
This reverts commit 6f3c032. Signed-off-by: sheidkamp <[email protected]>
…idkamp/kgateway into add-topology-spread-constraint Signed-off-by: sheidkamp <[email protected]>
Signed-off-by: sheidkamp <[email protected]>
Description
We support setting nodeSelector, affinity, antiAffinity, and tolerations on the gateways via Gateway Parameters.
This PR adds support for topologySpreadConstraints as well.
Fixes: #11917
Change Type
Changelog
Notes
To set the topology constraints on a gateway pod, for example as:
The following resources could be applied: