-
Notifications
You must be signed in to change notification settings - Fork 78
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 option to set Topology Spread Constraints, rather than just Affinity #217
base: main
Are you sure you want to change the base?
Add option to set Topology Spread Constraints, rather than just Affinity #217
Conversation
Signed-off-by: David Roberts <[email protected]>
Asides:
|
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
Reopen, please |
Signed-off-by: David Roberts <[email protected]>
Thanks @DavidRobertsOrbis are you able to add some CI tests for the new additions? |
Signed-off-by: David Roberts <[email protected]>
I see the If you're referring to something other than the linting, such as https://helm.sh/docs/topics/chart_tests/, can you point me at an existing example? |
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
Not stale. @ChrisJBurns anything else you need from me? I see that #216 has fixed the chart tests - are we waiting for that to land, so I can rebase? |
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
Not stale. |
@DavidRobertsOrbis Yep once #216 is merged you can rebase and that should sort the tests out. Additionally, on the GPG signing point, we request on this specific repo that the commits are signed with a key and all commits are signed with a signature. So there will be a combo of both |
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
Hi @DavidRobertsOrbis, |
Description of the change
Adds the ability to use Topology Spread Constraints (https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#pod-topology-spread-constraints).
Existing or Associated Issue(s)
None
Additional Information
Default behaviour remains unchanged. Nothing removed.
The chart currently supports
affinity
rules, buttopologySpreadConstraints
give finer control - see https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#comparison-with-podaffinity-podantiaffinity.In my specific use-case, https://kubernetes.io/blog/2023/04/17/fine-grained-pod-topology-spread-features-beta/#kep-3243-respect-pod-topology-spread-after-rolling-upgrades allows reuse of nodes during the rollout of a deployment, but I still end up with an appropriate spread of pods at the end. Similar changes are coming to affinity in k8s 1.31, so we could just wait; by enabling topology spread constraints now, we can allow people running older versions of k8s to take advantage. There are workarounds, but they're not as clean.
Topology spread constraints are also helpful in other circumstances (e.g. if you have more replicas than zones, and want an even-ish spread).
Checklist
Chart.yaml
according to semver.values.yaml
and added to the README.md. The helm-docs utility can be used to generate the necessary content. Usehelm-docs --dry-run
to preview the content.ct lint
command.