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

Add: tc level flag to enablePVCReplace feature #5665

Closed rajsuvariya closed 1 week ago

rajsuvariya commented 2 weeks 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.
sre-bot commented 2 weeks ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
17 out of 18 committers have signed the CLA.

:white_check_mark: smineyev81
:white_check_mark: ideascf
:white_check_mark: wangz1x
:white_check_mark: HuSharp
:white_check_mark: csuzhangxc
:white_check_mark: michaelmdeng
:white_check_mark: fgksgf
:white_check_mark: xhebox
:white_check_mark: BornChanger
:white_check_mark: YuJuncen
:white_check_mark: WangLe1321
:white_check_mark: donbowman
:white_check_mark: lhy1024
:white_check_mark: wxiaomou
:white_check_mark: rajsuvariya
:white_check_mark: wuhuizuo
:white_check_mark: djshow832
:x: MarsBighead
You have signed the CLA already but the status is still pending? Let us recheck it.

ti-chi-bot[bot] commented 2 weeks ago

Welcome @rajsuvariya! It looks like this is your first PR to pingcap/tidb-operator šŸŽ‰

ti-chi-bot[bot] commented 2 weeks ago

@anish-db: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to [this](https://github.com/pingcap/tidb-operator/pull/5665#pullrequestreview-2133167456): > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
csuzhangxc commented 1 week ago

/run-pull-e2e-kind

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:

ti-chi-bot[bot] commented 1 week ago

New changes are detected. LGTM label has been removed.

rajsuvariya commented 1 week ago

/retest

ti-chi-bot[bot] commented 1 week ago

@rajsuvariya: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to [this](https://github.com/pingcap/tidb-operator/pull/5665#issuecomment-2191110745): >/retest Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
csuzhangxc commented 1 week ago

/run-pull-e2e-kind

rajsuvariya commented 1 week ago

/run-pull-e2e-kind

rajsuvariya commented 1 week ago

I will raise another PR, due to CLA agreement

rajsuvariya commented 1 week ago

Raised another PR #5670