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 startup probe for TiDB #5588

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 CustomizedStartupProbe field, we can provide our own binary as the startup probe for TiDB.

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 startup probe for TiDB
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
csuzhangxc commented 6 months ago

/run-all-tests

codecov-commenter commented 6 months ago

Codecov Report

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

Project coverage is 67.66%. Comparing base (6de3eb2) to head (066f8bc).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5588 +/- ## ========================================== + Coverage 61.48% 67.66% +6.18% ========================================== Files 235 246 +11 Lines 30343 34228 +3885 ========================================== + Hits 18656 23161 +4505 + Misses 9816 9165 -651 - Partials 1871 1902 +31 ``` | [Flag](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5588/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/5588/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `47.83% <100.00%> (?)` | | | [unittest](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5588/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `61.49% <100.00%> (+<0.01%)` | :arrow_up: |
fgksgf commented 6 months ago

/run-pull-e2e-kind-br

fgksgf commented 6 months ago

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

ti-chi-bot[bot] commented 6 months ago

[LGTM Timeline notifier]

Timeline:

ti-chi-bot[bot] commented 6 months ago

@fgksgf: Your PR was out of date, I have automatically updated it for you.

Instructions for interacting with me using PR comments are available [here](https://prow.tidb.net/command-help). If you have questions or suggestions related to my behavior, please file an issue against the [ti-community-infra/tichi](https://github.com/ti-community-infra/tichi/issues/new?title=Prow%20issue:) repository.
ti-chi-bot[bot] commented 6 months ago

New changes are detected. LGTM label has been removed.

fgksgf commented 6 months ago

/run-all-tests