-
Notifications
You must be signed in to change notification settings - Fork 888
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
Support deploying multiple injector replicas with auto-TLS #436
Conversation
…onfigs Add pod anti-affinity for injectors Add liveness and readiness probes to leader elector container
@@ -84,6 +84,14 @@ spec: | |||
- name: AGENT_INJECT_TELEMETRY_PATH | |||
value: "/metrics" | |||
{{- end }} | |||
{{- if and (eq (.Values.injector.leaderElector.enabled | toString) "true") (gt (.Values.injector.replicas | int) 1) }} |
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 see this being used a few times, should we just make it a helper function?
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 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.
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 |
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.