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

Health Checks support for consul service mesh #363

Merged
merged 4 commits into from
Oct 15, 2020
Merged

Health Checks support for consul service mesh #363

merged 4 commits into from
Oct 15, 2020

Conversation

kschoche
Copy link
Contributor

@kschoche kschoche commented Oct 15, 2020

Changes proposed in this PR:

  • Adds a new controller to connect-inject which is responsible for synchronizing kubernetes pod health checks with consul service instance health checks. This has the effect of letting Consul know about the pod's readiness states thereby allowing Consul to direct service mesh traffic only to "healthy" pods.
  • Adds a new Consul TTL health check for every connect-injected pod.
  • Introduces a new pod label which is applied to connect-injected pods via the mutating webhook: "consul.hashicorp.com/connect-inject-status".
  • Includes Upsert/Delete functionality as well as periodic reconcile which does a full reconcile of all pods on a configurable frequency defaulted to "1m".
  • Can be disabled/enabled through helm, default is disabled.
  • TLS & autoencrypt are only supported.

How I've tested this PR:
Unit tests have been added which cover permutations of Upsert/Reconcile states, acceptance tests are pending in the associated consul-helm PR which covers end-to-end.
Manual tests are also possible when using consul-helm/hc-base to deploy with connectInject.healthChecks.enabled=true

How I expect reviewers to test this PR:
Check out the code and run the unit tests

Checklist:

  • Tests added
  • CHANGELOG entry added (HashiCorp engineers only, community PRs should not add a changelog entry)

kschoche and others added 4 commits October 15, 2020 09:54
Add the health checks controller to connect-inject for service-mesh.

Co-authored-by: Ashwin Venkatesh <ashwin@hashicorp.com>
Co-authored-by: Iryna Shustava <ishustava@users.noreply.github.com>
Co-authored-by: Luke Kysow <1034429+lkysow@users.noreply.github.com>
@kschoche kschoche added type/enhancement New feature or request theme/health-checks About Consul health checking labels Oct 15, 2020
@kschoche kschoche requested a review from a team October 15, 2020 19:52
@kschoche kschoche self-assigned this Oct 15, 2020
@kschoche kschoche requested review from lkysow and ishustava and removed request for a team October 15, 2020 19:52
@kschoche kschoche added this to the Consul 1.9.0 milestone Oct 15, 2020
Copy link
Member

@lkysow lkysow left a comment

Choose a reason for hiding this comment

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

🦊

@kschoche kschoche merged commit 88915d3 into master Oct 15, 2020
@kschoche kschoche deleted the hc-base branch October 15, 2020 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/health-checks About Consul health checking type/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants