fix(status): CP /status/ready return 503 when DB is off #10787
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR changes the behavior of the new readiness endpoint for control plane nodes.
The new endpoint
/status/ready
added in #10610 checks if Kong Gateway is ready for proxying. This check only makes sense in data plane nodes, as control plane nodes don't proxy traffic. But the response could be misleading, control plane nodes failing to connect to the database would return200 OK
, even if they are not functional.Note: this PR has no automated tests, our test suite does not support stopping the database while the tests are running.
Checklist
Full changelog
Issue reference
KAG-1437