-
Notifications
You must be signed in to change notification settings - Fork 80
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
Add option to set Topology Spread Constraints, rather than just Affinity #217
Conversation
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 |
Thanks @DavidRobertsOrbis are you able to add some CI tests for the new additions? |
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, |
Signed-off-by: David Roberts <David.Roberts@orbis.com>
Signed-off-by: David Roberts <David.Roberts@orbis.com>
Signed-off-by: David Roberts <David.Roberts@orbis.com>
Signed-off-by: David Roberts <David.Roberts@orbis.com>
aab52c5
to
ff8f400
Compare
@vinzscam Looks like a "legitimate" failure this time, though caused by the test environment being different from my expectations. To some extent, this proves that the chart is behaving appropriately :)
I've removed the zone constraint from the test case, so it's only relying on the hostname. Can you run it again? If this still fails, can you give me any insight into what labels are present on the test cluster nodes? |
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.
thank you! 🙏
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.