-
Notifications
You must be signed in to change notification settings - Fork 550
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
mimir-jsonnet: allow disabling ingester anti-affinity #1581
mimir-jsonnet: allow disabling ingester anti-affinity #1581
Conversation
While setting up Mimir on my personal toy-cluster of one node, I got stuck scheduling the ingesters as they have the anti-affinity rules by default and it can't be easily removed without redefining the statefulset. There are similar configs for distributor, querier, etc., so I just added another one, and documented it a little bit. Signed-off-by: Oleg Zaytsev <[email protected]>
Signed-off-by: Oleg Zaytsev <[email protected]>
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.
LGTM (as far as linter doesn't show any diff in compiled jsonnet).
@@ -95,7 +95,7 @@ | |||
statefulSet.mixin.spec.withPodManagementPolicy('Parallel') + | |||
(if with_anti_affinity then $.util.antiAffinity else {}), | |||
|
|||
ingester_statefulset: self.newIngesterStatefulSet('ingester', $.ingester_container), | |||
ingester_statefulset: self.newIngesterStatefulSet('ingester', $.ingester_container, !$._config.ingester_allow_multiple_replicas_on_same_node), |
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.
You may also want to check it in newIngesterZoneStatefulSet()
.
Signed-off-by: Oleg Zaytsev <[email protected]>
Signed-off-by: Oleg Zaytsev <[email protected]>
Hmm, what's wrong with the cla check? It won't run 🤷 |
@@ -86,7 +86,7 @@ | |||
newIngesterZoneStatefulSet(zone, container):: | |||
local name = 'ingester-zone-%s' % zone; | |||
|
|||
self.newIngesterStatefulSet(name, container, with_anti_affinity=false) + | |||
self.newIngesterStatefulSet(name, container, with_anti_affinity=!$._config.ingester_allow_multiple_replicas_on_same_node) + |
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.
Doh! This should always be false, because this function injects a different anti-affinity rule below (see spec+:
). What I meant in the other comment is that we should inject the custom anti-affinity rule only if ingester_allow_multiple_replicas_on_same_node: false
.
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.
I should have paid more attention to that, thank you.
This should be the fix: 3d534a7
Had the same problem yesterday (with CLA check not running), it fixed itself after pushing an empty commit ( |
Signed-off-by: Oleg Zaytsev <[email protected]>
What this PR does
While setting up Mimir on my personal toy-cluster of one node, I got stuck scheduling the ingesters as they have the anti-affinity rules by default and it can't be easily removed without redefining the statefulset. There are similar configs for distributor, querier, etc.,
so I just added another one, and documented it a little bit.
Which issue(s) this PR fixes or relates to
None
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]