Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 1.47 KB

File metadata and controls

44 lines (28 loc) · 1.47 KB

Example code for duplication issue of health-checks

This is an example project to demonstrate the behavior described in quarkusio/quarkus#32800.

Tools you'll need

What is the problem?

The health check behaves just fine when using ./mvnw quarkus:dev and when running the application in a docker container.

It behaves strangely only when deployed on a cluster.

The health check seems to duplicate the checks. This is no duplication in logging but rather a duplication in calling the check twice (see comment in issue).

The problem only started to occur as soon as I added the liveness/readiness probes on the k8s deployment configuration.

See the problem in action with this example.

Run ./start script.

This script will set up a local k8s cluster, build the application containing the example and will deploy the application to your local cluster.

Once everything is up and running, visit http://localhost:18080/q/health.

You can see the duplication in checks.

To see the difference to dev-mode, do the following:

  • cd check-duplication-example
  • start ./mvnw quarkus:dev
  • open http://localhost:8080/q/health

Clean up.

Once you don't want your example to run anymore, run ./cleanup script. That will remove the local k8s cluster for you.