scheduler: Shorten tolerations for node failure #1146
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Similar to what was done in #1055, we need to explicitly add tolerations to the scheduler to get it to be recreated more quickly on node failure.
This is particularly necessary because we don't have #995. We could wait for that, but it's a lot of work, and this is a small thing we can do in the meantime.
Fixes neondatabase/cloud#17298, part of neondatabase/cloud#14114.
Notes for review: For some context, I was looking into #995, trying to figure out clearly why we can't "just" use leader election in the scheduler with things as they are today. The short version is that there's no guarantee the autoscaler-agents will switch to a replacement leader, because the old one will still be marked as "ready" until the kubelet reports otherwise (or, in case of failure, until the "node not ready" toleration expires). But because of that, I figured that without #995 we can get almost all the possible benefit from leader election just by having shorter tolerations — so that's what this PR is for.