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

Helm: Support minAvailable on connect injector PDB #1557

Merged
merged 2 commits into from Oct 14, 2022

Conversation

hamishforbes
Copy link
Contributor

It looks like the PDB for the connect injector has copied the logic from the Server PDB.
In that it is extremely conservative and attempts to maintain n+1 pods, which makes complete sense for Consul Servers as you do want to maintain a quorum at all times.

The injector deployment uses leader election and only 1 pod is actually active at any one time, requiring n/2-1 pods to be available is unnecessary.

Furthermore, with the default 2 replicas maxUnavailable is set at 0, which requires manual human operator intervention to, for example, drain a node running an injector pod.
See Single-instance Stateful Application

For the connect injector deployment a minAvailable configuration makes much more sense.

These changes do not change the default behaviour, although I think the default behaviour probably should be changed.
This is opt-in only, users must configure the new value explicitly.

Changes proposed in this PR:

  • Add connectInject.disruptionBudget.minAvailable to values
  • minAvailable is null by default
  • minAvailable takes precedence over the maxUnavailable configuration

How I've tested this PR:

  • Added tests

How I expect reviewers to test this PR:

Checklist:

  • Tests added
  • CHANGELOG entry added

    HashiCorp engineers only, community PRs should not add a changelog entry.
    Entries should use present tense (e.g. Add support for...)

@hamishforbes hamishforbes changed the title Helm: Support minAvailable on connect injector Helm: Support minAvailable on connect injector PDB Sep 29, 2022
@kschoche kschoche self-requested a review October 3, 2022 17:14
Copy link
Contributor

@kschoche kschoche left a comment

Choose a reason for hiding this comment

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

Thanks for this PR!

@ishustava ishustava merged commit 3ea2502 into hashicorp:main Oct 14, 2022
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