Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tidb-operator fails to delete discovery annotations and labels according to updated CR #4942

Open
hoyhbx opened this issue Mar 27, 2023 · 3 comments

Comments

@hoyhbx
Copy link
Contributor

hoyhbx commented Mar 27, 2023

Bug Report

What version of Kubernetes are you using?

Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.1", GitCommit:"86ec240af8cbd1b60bcc4c03c20da9b98005b92e", GitTreeState:"clean", BuildDate:"2021-12-16T11:41:01Z", GoVersion:"go1.17.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.9", GitCommit:"6df4433e288edc9c40c2e344eb336f63fad45cd2", GitTreeState:"clean", BuildDate:"2022-05-19T19:53:08Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"linux/amd64"}

What version of TiDB Operator are you using?

pingcap/tidb-operator:v1.3.2

What storage classes exist in the Kubernetes cluster and what are used for PD/TiKV pods?

default

What's the status of the TiDB cluster pods?

What did you do?

We first added a label key: value to the discovery service, the label is successfully added to the discovery service. Then later we wanted to remove that label from the discovery service by changing the CR, we found that tidb-operator cannot remove the labels.

What did you expect to see?
labels and annotations in spec.discovery can be added and removed.

What did you see instead?
The tidb-operator fails to remove labels and annotations from discovery service when users specifies the removal in the CR.

@csuzhangxc
Copy link
Member

discovery is mainly used for bootstrapping the TidbCluster, so some fields are not well-supported yet. What scenarios do you need to update them?

@hoyhbx
Copy link
Contributor Author

hoyhbx commented Mar 28, 2023

For example we want to perform some fault injection experiment on Services, and the label is used to select the Services. We later want to remove the label from the discovery and found that the removal cannot be done. Right now we have to manually remove them

@csuzhangxc
Copy link
Member

I got it. Could you help to add labels and annotations update for the discovery service?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants