-
Notifications
You must be signed in to change notification settings - Fork 605
improve kong status check endpoint #7460
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
base: main
Are you sure you want to change the base?
Conversation
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7460 +/- ##
========================================
- Coverage 77.4% 58.5% -18.9%
========================================
Files 220 222 +2
Lines 25368 25587 +219
========================================
- Hits 19644 14980 -4664
- Misses 4729 9916 +5187
+ Partials 995 691 -304 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Is somebody going to look at this? Or is anything missing? |
Hey @discostur 👋. Thanks for the contribution. The team will review this and will let you know if there's anything missing or that needs changing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank @discostur for very thoughtful and useful PR! There is one suggestion.
Since the official client library is go-kong the logic can be moved here to benefit all users as follows.
Constructor NewClient(baseURL *string, client *http.Client) (*Client, error) can be extended in a non-breaking manner to accept functional options pattern
and introduce a new parameter to optionally set a different port for a status check.
Next in the method func (c *Client) Status(ctx context.Context) (*Status, error) based on whether the port is set or not, construct a request to a proper status address and execute the check.
After the proposed change, go-kong
library has logic for status check built in. We'll avoid creating a dedicated client with request logic in the KIC repo. Instead, it can be properly handled for everybody and just used in KIC with a little additional logic.
WDYT? Are you willing to take care of it? I promise quick reviews and help in case of need
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@programmer04 thanks for your suggestions but unfortunately i don't have the time at the moment ... :/
What this PR does / why we need it:
This PR implements support for using Kong Gateway's dedicated status port (8100) for health checks instead of the Admin API port (8444). This separation of concerns improves:
The implementation adds a new --kong-status-svc-port-names configuration flag (default: ["status"]) to discover Kong Gateway status endpoints, while maintaining full backward compatibility with existing Admin API-based health checks.
Which issue this PR fixes:
Users are complaining for years that the access log get spammed with status health checks:
Special notes for your reviewer:
PR Readiness Checklist:
CHANGELOG.md
release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR