consul-k8s
consul-k8s copied to clipboard
Add liveness probe for envoy sidecar container
Changes proposed in this PR:
- Add a tcp liveness probe to envoy container
How I've tested this PR: I got this patch on my consul-k8s fork running for months
How I expect reviewers to test this PR: ¯_(ツ)_/¯
Checklist:
- [x] Tests added
- [ ] CHANGELOG entry added (HashiCorp engineers only, community PRs should not add a changelog entry)
@rrondeau I wonder if this is necessary now with the new health checks support?
@lkysow hum i dont think the new health checks support and my change have the same goal. This change add a k8s liveness probe to the consul-connect-envoy-sidecar, not a check for consul connect. This is to tell k8s to restart the envoy container if the public listener is not listening on its port for whatever reason.
Ahh sorry, you're right. Have you seen the envoy container not bind to that port? I'm wondering if there's an underlying issue.
Have seen it but it was due to temporary network issue between envoy and its consul client. Envoy was not receiving any clusters/listeners. I think having liveness probe on a container is a best practice and can always be useful.
This probe also helped me when something broke my consul config injection like i said in #383
@lkysow @ishustava any updates ?
Just saw that this had been added in the 1.0 version by @ishustava ! Thanks !