helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

[keycloakx] Bug: health check depends on metrics.enabled flag

Open grieshaber opened this issue 2 years ago • 5 comments

Instead of reliying on the newly introduced health.enabled (https://github.com/codecentric/helm-charts/pull/592/files) flag, the HEALTH endpoint is enabled via metrics.enabled flag.

This might lead to confusion and should be fixed.

grieshaber avatar Aug 04 '22 07:08 grieshaber

@grieshaber I've published a pullrequest regarding this issue (#638).

Footur avatar Aug 04 '22 11:08 Footur

.. after reading the release notes of keycloak 19, i realized: relying on metrics.enabled was not totally wrong, but also not enough.

The health/ready endpoint used for readiness probes still checks for a working database connection. Make sure you have not only health-enabled=true but also metrics-enabled=true set in your configuration, to enable the database check, resulting in an effective readiness probe. It will return HTTP status-code 503 and a status of DOWN when the database connection is not in a healthy state.

So in order to have fully functional readinessChecks, we need both, health and metrics endpoints enabled.

grieshaber avatar Aug 05 '22 06:08 grieshaber

@grieshaber Maybe we should write a note in the README?

Footur avatar Aug 05 '22 07:08 Footur

@Footur yes, that is definetly a good idea. I'm just thinking about a "technical" solution as well. As we have the if clause for health enabled in place, should we maybe add the check for health and metrics to the readnessProbe?

grieshaber avatar Aug 05 '22 07:08 grieshaber

Thanks to @Footur the latest idea (Readme + technical feature gate) will be resolved with https://github.com/codecentric/helm-charts/pull/633.

grieshaber avatar Aug 05 '22 08:08 grieshaber

This issue has been marked as stale because it has been open for 30 days with no activity. It will be automatically closed in 10 days if no further activity occurs.

github-actions[bot] avatar Oct 04 '22 12:10 github-actions[bot]

Resolved.

grieshaber avatar Oct 04 '22 13:10 grieshaber