Skip to content

Conversation

@EdgeJ
Copy link
Contributor

@EdgeJ EdgeJ commented Jan 15, 2021

Adds functionality to enable pod anti-affinity by matching for the component label against the componentM3DBNode value. This functionality is disabled by default to prevent resource strain on k8s clusters. This change also splits up the functionality of the GenerateStatefulSetAffinity function into two sub-functions handling node affinity and pod anti-affinity.

Fixes #123

@EdgeJ EdgeJ force-pushed the add-pod-anti-affinity branch from d91b349 to 6a606e7 Compare January 15, 2021 20:06
@EdgeJ EdgeJ marked this pull request as draft January 15, 2021 20:39
@EdgeJ
Copy link
Contributor Author

EdgeJ commented Jan 15, 2021

Converted to draft, as I realized I forgot to handle topologyKey to match node labels.

@EdgeJ EdgeJ force-pushed the add-pod-anti-affinity branch from 6a606e7 to 3235221 Compare January 15, 2021 21:21
@EdgeJ EdgeJ marked this pull request as ready for review January 15, 2021 21:21
@codecov
Copy link

codecov bot commented Jan 19, 2021

Codecov Report

Merging #266 (69160fa) into master (c00c39d) will increase coverage by 0.05%.
The diff coverage is 83.78%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #266      +/-   ##
==========================================
+ Coverage   75.48%   75.54%   +0.05%     
==========================================
  Files          32       32              
  Lines        2313     2343      +30     
==========================================
+ Hits         1746     1770      +24     
- Misses        425      428       +3     
- Partials      142      145       +3     

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c00c39d...69160fa. Read the comment docs.

@schallert schallert merged commit 81aaae1 into m3db:master Jan 19, 2021
@schallert
Copy link
Collaborator

Thanks for the contribution!

@EdgeJ EdgeJ deleted the add-pod-anti-affinity branch January 20, 2021 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add flag to enable cluster anti-affinity

2 participants