Skip to content
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

Jsonnet: add node_affinity_matchers setting support for every Mimir component #6829

Merged
merged 5 commits into from
Dec 5, 2023

Conversation

pracucci
Copy link
Collaborator

@pracucci pracucci commented Dec 5, 2023

What this PR does

This PR is a follow up of #6782. In #6782 I've introduced distributor_node_affinity_matchers and successfully use it at Grafana Labs to simplify the jsonnet setup. In this PR I'm doing the same for every other Mimir component.

Which issue(s) this PR fixes or relates to

N/A

Checklist

  • Tests updated.
  • Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX].
  • about-versioning.md updated with experimental features.

…omponent

Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
@pracucci pracucci marked this pull request as ready for review December 5, 2023 16:08
@pracucci pracucci requested a review from a team as a code owner December 5, 2023 16:08
Copy link
Contributor

@56quarters 56quarters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -30,6 +30,11 @@
mimir_write_zone_b_args:: $.ingester_zone_b_args {},
mimir_write_zone_c_args:: $.ingester_zone_c_args {},

mimir_write_node_affinity_matchers:: [],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem like it's used anywhere?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The per-zone matchers (lines below) inherit from it. It's handy when you want to set a node affinity matcher for mimir-write regardless the zone.

@@ -73,16 +75,20 @@
$.util.readinessProbe +
$.jaeger_mixin,

newStoreGatewayStatefulSet(name, container, with_anti_affinity=false)::
newStoreGatewayStatefulSet(name, container, with_anti_affinity=false, nodeAffinityMatchers=[])::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's unrelated to this PR but it'd be nice to rename with_anti_affinity to withAntiAffinity to match the other parameters

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Let me do in a follow up PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See: #6832

@pracucci pracucci merged commit 693cf5d into main Dec 5, 2023
28 checks passed
@pracucci pracucci deleted the add-node-affinity-matchers branch December 5, 2023 17:04
Comment on lines +48 to +49
* `ruler_node_affinity_matchers`
* `ruler_node_affinity_matchers`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be here twice?

Comment on lines +53 to +54
* `store_gateway_node_affinity_matchers`
* `store_gateway_node_affinity_matchers`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be here twice?

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.

None yet

3 participants