Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

charts(osm-*): add pod and node affinities to control plane pods #4527

Merged
merged 1 commit into from
Feb 16, 2022

Conversation

SanyaKochhar
Copy link
Contributor

@SanyaKochhar SanyaKochhar commented Feb 10, 2022

Description:

  • Adds pod anti-affinities to osm-controller, osm-bootstrap,
    osm-injector to ensure better resilience for pod distribution
    across nodes
  • Replaces NodeSelectors with NodeAffinities for consistency

Testing done:
Pod anti-affinities:

  • without anti-affinities: >= 2 replicas may or may not schedule on different nodes
  • with anti-affinities: >= 2 replicas schedule on different nodes if possible

NodeAffinities:

  • verified that a pod whose label values do not match node's label values fails to schedule
  • verified that a node that does not have label for a pod's matchExpression causes the pod to fail to schedule

Affected area:

Functional Area
New Functionality [x]

Please answer the following questions with yes/no.

  1. Does this change contain code from or inspired by another project? no

    • Did you notify the maintainers and provide attribution?
  2. Is this a breaking change? no

  3. Has documentation corresponding to this change been updated in the osm-docs repo (if applicable)?
    yes, PR open here: guides(ha): add note about pod anti-affinities osm-docs#330

@codecov-commenter
Copy link

codecov-commenter commented Feb 10, 2022

Codecov Report

Merging #4527 (20e5484) into main (c3b6739) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4527   +/-   ##
=======================================
  Coverage   69.29%   69.29%           
=======================================
  Files         216      216           
  Lines       14709    14709           
=======================================
  Hits        10192    10192           
  Misses       4466     4466           
  Partials       51       51           
Flag Coverage Δ
unittests 69.29% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


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 c3b6739...20e5484. Read the comment docs.

@SanyaKochhar SanyaKochhar force-pushed the hpa-antiaffinity branch 2 times, most recently from bd6b158 to dca52c9 Compare February 14, 2022 21:00
@SanyaKochhar SanyaKochhar marked this pull request as ready for review February 14, 2022 22:20
* Adds pod anti-affinities to osm-controller, osm-bootstrap,
osm-injector to ensure better resilience for pod distribution
across nodes
* Replaces NodeSelectors with NodeAffinities for consistency

Signed-off-by: Sanya Kochhar <[email protected]>
@SanyaKochhar SanyaKochhar changed the title charts(osm-*): add pod anti-affinities charts(osm-*): add pod and node affinities to control plane pods Feb 14, 2022
@jaellio
Copy link
Contributor

jaellio commented Feb 16, 2022

#4496 is a related issue to consider (perhaps in separate PR)

@SanyaKochhar
Copy link
Contributor Author

SanyaKochhar commented Feb 16, 2022

#4496 is a related issue to consider (perhaps in separate PR)

yeah, I agree this could be addressed in a separate PR. The main objective of this PR is to add pod anti-affinities for better resilience of distribution of replicas across nodes when HPA is enabled, the nodeselector -> affinity change is more for consistency

@jaellio jaellio merged commit 9b268d0 into openservicemesh:main Feb 16, 2022
@SanyaKochhar SanyaKochhar deleted the hpa-antiaffinity branch February 16, 2022 17:37
schristoff pushed a commit to schristoff/osm that referenced this pull request Feb 22, 2022
…nservicemesh#4527)

* Adds pod anti-affinities to osm-controller, osm-bootstrap,
osm-injector to ensure better resilience for pod distribution
across nodes
* Replaces NodeSelectors with NodeAffinities for consistency

Signed-off-by: Sanya Kochhar <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants