feat(chart): Adds topologySpreadConstraints for multi-zone HA - #437
feat(chart): Adds topologySpreadConstraints for multi-zone HA#437Ayush4958 wants to merge 2 commits into
Conversation
✅ Deploy Preview for node-readiness-controller canceled.
|
|
Hi @Ayush4958. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
I haven't seen many helm charts. I think we need to do some research on the need for this. It sounds like a good idea..but I wonder whether all of this are in general preset in the chart or operators would configure it for flexibility? could you add a reference example, say a CNI controller, on what scheduling controls are expected from the chart? Thanks for your time! |
|
hi @ajaysundark These are never preset in chart because topology labels varies by environment (like AWS uses some references :-
It simply brings |
|
Thanks @Ayush4958. IIUC, the suggestion is to add this empty list, eg: https://github.com/cert-manager/cert-manager/blob/e7c1783d26ed1a3cf988170ccd96419045de5150/deploy/charts/cert-manager/values.yaml#L613-L624, so it's injectable via helm. Is that right? |
|
Yes, by exposing the |
| # whenUnsatisfiable: DoNotSchedule | ||
| # labelSelector: | ||
| # matchLabels: | ||
| # app.kubernetes.io/name: node-readiness-controller |
There was a problem hiding this comment.
Just calling this out, currently the chart allows name-overrides, maybe a x-ref to the variable name as comment?
There was a problem hiding this comment.
yes, It will be nice
I will add the comment for adjustment , something like this :-
Note: Adjust this if you use nameOverride/fullnameOverride
|
/lgtm |
|
it'd be good to mention this in our helm documentation when ready. |
I'll make sure to add a section about this |
|
New changes are detected. LGTM label has been removed. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Ayush4958 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Description
I had added native support for
topologySpreadConstraintsin the Helm chart to support highly available, multi zone deployments of the controller.While users can technically inject soft
podAntiAffinityrules into the existingaffinityblock,topologySpreadConstraintsis the modern standard for guaranteeing balanced zone distribution without leaving replicas stuck inPending.Note on isolation: I placed this configuration alongside the existing
affinityandtolerationsblocks invalues.yamlanddeployment.yaml. This ensures it is completely structurally isolated and will not create merge conflicts with #411Related Issue
Fixes #413
Type of Change
Testing
helm-unittestcoverage indeployment_test.yamlasserting correct rendering ofmaxSkewandtopologyKeywhen values are provided.make testpasses locally.