-
Notifications
You must be signed in to change notification settings - Fork 351
feat(kuma-cp) add affinity to CP and Ingress PODs #3036
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
Conversation
Signed-off-by: cloudwiz <[email protected]>
fbf1426 to
94c771a
Compare
|
@andrey-dubnik a few questions on this approach
|
|
Yes, soft anti-affinity would be the preferred default but for the true HA affinity should be the hard rule which makes it only 1 pod per the node which might be too restrictive in the scenario where the control plane needs to scale beyond the number of nodes. Unfortunately for the control plane the app label is dynamic so setting the rule via values is problematic so it either changing the label to static and having a default or letting the helm user to write own affinity rule leaving the default empty. |
Do you mean the If the labels are unpredictably dynamic, that makes me wonder how people would reasonably know what to use to set the whole affinity stanza themselves. |
|
I mean this one -
Affinity rule has to have a label filter which is computed during the chart templating which make it possible to write the affinity rule in the values knowing the name of the deployment chart is going to have but does not make it straight forward to write a default rule defined in the helm values. Default can be written directly in the template with the option to override if affinity value is provided. I can update the PR with default rules in the template files and added logic to accept affinity override if provided via values if this helps? |
Yeh, it sounds to me like soft anti-affinity is the right default, and we should let people override this if they need to, as per your PR here. |
Signed-off-by: cloudwiz <[email protected]>
90edbef to
86cbe76
Compare
Signed-off-by: cloudwiz <[email protected]>
4edd093 to
67248e0
Compare
Codecov Report
@@ Coverage Diff @@
## master #3036 +/- ##
==========================================
+ Coverage 52.32% 52.34% +0.01%
==========================================
Files 919 919
Lines 52989 52989
==========================================
+ Hits 27727 27736 +9
+ Misses 23053 23040 -13
- Partials 2209 2213 +4
Continue to review full report at Codecov.
|
jpeach
left a comment
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.
This looks great to me @andrey-dubnik! I'll wait a couple of days to give other people a change to give feedback, then merge.
|
This looks good thanks @andrey-dubnik! Seems like you might want to update the PR though! |
Signed-off-by: cloudwiz <[email protected]>
47478ae to
ef0e20f
Compare
|
Thanks @andrey-dubnik 👍 |
* add affinity configuration to CP and Ingress pods * add default affinity rules Signed-off-by: cloudwiz <[email protected]> (cherry picked from commit cdff385)
* add affinity configuration to CP and Ingress pods * add default affinity rules Signed-off-by: cloudwiz <[email protected]> (cherry picked from commit cdff385) Co-authored-by: cloudwiz <[email protected]>
This fixes #3031