feat: Add readiness probe for Kmesh daemon
- Implemented an HTTP readiness probe on port 8080 with a
/readyendpoint. - The probe returns HTTP 200 (OK) when the daemon is ready and HTTP 503 (Not Ready) otherwise.
- Uses an atomic flag to track readiness state.
- Integrated with Kubernetes readinessProbe for health checks.
- Ensures the Kmesh daemon is only marked ready after successful initialisation.
Test Build kmeshctl Ensure the daemon is running, then:
./kmeshctl readiness
If the daemon is ready, you see “Kmesh daemon is ready!”, otherwise you see a non-zero exit.
Check Readiness Manually You can manually check the readiness probe using curl:
curl -X GET http://localhost:8080/ready
If the daemon is ready, it will return:
OK with HTTP 200 (OK).
If it is not ready, it will return:
Not Ready with HTTP 503 (Service Unavailable).
Fixes #495
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign kevin-wangzefeng for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 45.24%. Comparing base (2eb3f92) to head (7588563).
:warning: Report is 486 commits behind head on main.
see 1 file with indirect coverage changes
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update a9f279e...7588563. Read the comment docs.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.