pingcap / tidb-operator

TiDB operator creates and manages TiDB clusters running in Kubernetes.
https://docs.pingcap.com/tidb-in-kubernetes/
Apache License 2.0
1.22k stars 497 forks source link

Feat: support customizing the readiness probe for tidb #5580

Closed fgksgf closed 6 months ago

fgksgf commented 6 months ago

What problem does this PR solve?

In some case, tidb servers may not be ready to serve traffic even the readiness probe can establish connection on port 4000 or 10080. Therefore, a better way maybe using the mysql protocol to probe.

What is changed and how does it work?

This PR adds a CustomizedReadinessProbe field, we can provide our own binary as the readiness probe.

Code changes

Tests

Side effects

Related changes

Release Notes

Please refer to Release Notes Language Style Guide before writing the release note.

Support customizing the readiness probe for tidb
codecov-commenter commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 67.47%. Comparing base (645d9e9) to head (1f96a81).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5580 +/- ## ========================================== + Coverage 61.51% 67.47% +5.96% ========================================== Files 235 246 +11 Lines 30258 34185 +3927 ========================================== + Hits 18612 23067 +4455 + Misses 9779 9185 -594 - Partials 1867 1933 +66 ``` | [Flag](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5580/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [e2e](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `46.58% <95.12%> (?)` | | | [unittest](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `61.55% <100.00%> (+0.04%)` | :arrow_up: |
ti-chi-bot[bot] commented 6 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: csuzhangxc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/pingcap/tidb-operator/blob/master/OWNERS)~~ [csuzhangxc] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
ti-chi-bot[bot] commented 6 months ago

[LGTM Timeline notifier]

Timeline:

csuzhangxc commented 6 months ago

/run-all-tests

csuzhangxc commented 6 months ago

/run-pull-e2e-kind-serial

csuzhangxc commented 6 months ago

/run-pull-e2e-kind-tikv-scale-simultaneously

fgksgf commented 6 months ago

/run-pull-e2e-kind-serial

fgksgf commented 6 months ago

/run-pull-e2e-kind-across-kubernetes