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.2k stars 490 forks source link

Fix(volume): fix unexpected pod restart during resize storage size (#5602) #5609

Closed ti-chi-bot closed 3 months ago

ti-chi-bot commented 3 months ago

This is an automated cherry-pick of #5602

This PR fixes #5601. Store currently using ConfigMap name into tc.annotations before delete STS when do resize storage size. And then retrieve it to overwrite ConfigMap name in the STS recreation to remain name unchanged.

What problem does this PR solve?

What is changed and how does it work?

Code changes

Tests

Side effects

Related changes

Release Notes

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

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

[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 ask for approval from csuzhangxc, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

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

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

/run-all-tests

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 25.45455% with 41 lines in your changes are missing coverage. Please review.

Project coverage is 47.82%. Comparing base (d032996) to head (f79bd5c).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## release-1.5 #5609 +/- ## ================================================ - Coverage 61.53% 47.82% -13.72% ================================================ Files 229 221 -8 Lines 29331 29845 +514 ================================================ - Hits 18050 14272 -3778 - Misses 9499 13865 +4366 + Partials 1782 1708 -74 ``` | [Flag](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5609/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/5609/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `47.82% <25.45%> (?)` | | | [unittest](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5609/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `?` | |
csuzhangxc commented 3 months ago

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