consul-k8s icon indicating copy to clipboard operation
consul-k8s copied to clipboard

Add liveness probe for envoy sidecar container

Open rrondeau opened this issue 5 years ago • 6 comments

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 avatar Nov 04 '20 10:11 rrondeau

@rrondeau I wonder if this is necessary now with the new health checks support?

lkysow avatar Nov 18 '20 18:11 lkysow

@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.

rrondeau avatar Nov 19 '20 15:11 rrondeau

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.

lkysow avatar Nov 19 '20 17:11 lkysow

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

rrondeau avatar Nov 20 '20 07:11 rrondeau

@lkysow @ishustava any updates ?

rrondeau avatar Dec 21 '21 16:12 rrondeau

CLA assistant check
All committers have signed the CLA.

hashicorp-cla avatar Mar 12 '22 17:03 hashicorp-cla

Just saw that this had been added in the 1.0 version by @ishustava ! Thanks !

rrondeau avatar Jan 11 '23 16:01 rrondeau