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

tc level flag to enablePVCReplace feature #5670

Closed rajsuvariya closed 1 week ago

rajsuvariya commented 1 week ago

What problem does this PR solve?

https://github.com/pingcap/tidb-operator/blob/9ef26f88bf75338cef427b44aa6303237ddcdbd6/pkg/features/features.go#L55C9-L57C44 PVC replace feature is currently enabled / disabled at tidb-operator level, which might not be comforting situation as a single tidb-operator can be handling multiple tidbclusters, so this PR enables tidbcluster level flag to enable / disable this feature. This is similar to another similar feature enablePVReclaim flag

What is changed and how does it work?

Added a new flag in CRD enablePVCReplace with a false as default value. If this flag is enabled then only tidb-operator would perform the PVC replacement process.

Code changes

Tests

Side effects

Related changes

Release Notes

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

ACTION REQUIRED: Introduces a new feature flag at a tidb-cluster level for enablePVCReplace, this works the same as VolumeReplacing but only enables specified tidb-cluster for VolumeReplacing. Enabling either the tidb-cluster level feature flag or the operator level feature flag will turn on this feature for a given tidb-cluster.
rajsuvariya commented 1 week ago

/run-pull-e2e-kind

csuzhangxc commented 1 week ago

/run-pull-e2e-kind

csuzhangxc commented 1 week ago

/run-pull-e2e-kind

codecov-commenter commented 1 week ago

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 39.54%. Comparing base (9ef26f8) to head (7a7be53). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5670 +/- ## =========================================== - Coverage 61.47% 39.54% -21.93% =========================================== Files 235 219 -16 Lines 30653 30433 -220 =========================================== - Hits 18843 12035 -6808 - Misses 9920 16889 +6969 + Partials 1890 1509 -381 ``` | [Flag](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5670/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/5670/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `39.54% <0.00%> (?)` | | | [unittest](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5670/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `?` | |
ti-chi-bot[bot] commented 1 week 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 1 week ago

[LGTM Timeline notifier]

Timeline:

csuzhangxc commented 1 week ago

/cherry-pick release-1.5

csuzhangxc commented 1 week ago

/cherry-pick release-1.6

ti-chi-bot commented 1 week ago

@csuzhangxc: new pull request created to branch release-1.5: #5671.

In response to [this](https://github.com/pingcap/tidb-operator/pull/5670#issuecomment-2192905104): >/cherry-pick release-1.5 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 commented 1 week ago

@csuzhangxc: new pull request created to branch release-1.6: #5672.

In response to [this](https://github.com/pingcap/tidb-operator/pull/5670#issuecomment-2192905173): >/cherry-pick release-1.6 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.