Support deploying multiple injector replicas with auto-TLS#436
Merged
Conversation
…onfigs Add pod anti-affinity for injectors Add liveness and readiness probes to leader elector container
| - name: AGENT_INJECT_TELEMETRY_PATH | ||
| value: "/metrics" | ||
| {{- end }} | ||
| {{- if and (eq (.Values.injector.leaderElector.enabled | toString) "true") (gt (.Values.injector.replicas | int) 1) }} |
Contributor
There was a problem hiding this comment.
I see this being used a few times, should we just make it a helper function?
tvoran
approved these changes
Dec 18, 2020
Member
tvoran
left a comment
There was a problem hiding this comment.
I agree with Jason's comment about a helper function for the template line, and we may also want to add an election ttl configurable option: https://github.com/hashicorp/vault-k8s/blob/master/deploy/injector-deployment.yaml#L29
But I'd say neither of those are blockers, and can be done in subsequent PRs if we like.
Contributor
Author
|
I've added configurable TTL, and acceptance test is still passing locally: bats -t test/acceptance/injector-leader-elector.bats
1..1
ok 1 injector: testing leader elector |
tvoran
approved these changes
Jan 4, 2021
This was referenced Jan 5, 2021
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR implements support for the leader election functionality added in hashicorp/vault-k8s#198.
Acceptance test passing locally:
By default, no behaviour change other than some pod anti-affinity settings which I think are harmless, but please correct me if you think the default injector affinity settings should stay empty.