-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use /status/ready as readiness probe of gateway for gateway dis…
…covery (#4368) Changes the Gateway's Pod readiness probe from `/status` to `/status/ready`. `/status/ready` returns 200 after receiving the first non-empty configuration. That allows to make Gateway pods to serve proxy traffic only after they're initially configured by KIC. In KIC's Gateway discovery, instead of relying on `EndpointSlices` `Endpoints`' being ready, we use the discovered endpoints despite their readiness (we only discard terminating ones) and verify their readiness on our own with the use of the Admin API's `/status` in the `ReadinessChecker`. It requires running a periodic readiness reconciliation loop to check whether the endpoints that were ready should be moved to the pending list and vice versa. Fundamental changes that were made in this PR: - `KongAdminAPIServiceReconciler` watches Admin API service endpoints and pushes all but terminating ones to the `AdminAPIClientsManager` (via `Notify` method) - `AdminAPIClientsManager` accepts the discovered endpoints and verifies their readiness with use of a new `ReadinessChecker` first: - if they're not ready - they're kept on a pending list - if they're ready - they're kept on an active list (that is used to return `GatewayClients()` to the upper layers) - `AdminAPIClientsManager` is responsible for running a readiness reconciliation loop in which it uses `ReadinessChecker` to verify if: - the clients kept on the active list became not ready; if yes, move them to the pending list - the clients kept on the pending list became ready; if yes, move them to the active list
- Loading branch information
Showing
21 changed files
with
864 additions
and
426 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.