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] helm chart with admission webhook enabled does not work after kubernetes v1.22 #137

Closed
unw9527 opened this issue Jul 7, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@unw9527
Copy link
Contributor

unw9527 commented Jul 7, 2022

Bug Report

What version of Kubernetes are you using?

Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.1", GitCommit:"d224476cd0730baca2b6e357d144171ed74192d6", GitTreeState:"clean", BuildDate:"2020-01-14T21:04:32Z", GoVersion:"go1.13.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?

n/a

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

n/a

What's the status of the TiDB cluster pods?

n/a

What did you do?

We tried to deploy the tidb-operator with admission webhook enabled using helm chart following the instructions described here: https://docs.pingcap.com/tidb-in-kubernetes/stable/enable-admission-webhook

What did you expect to see?
We expect to see the tidb-operator is successfully deployed with the admission webhook enabled.

What did you see instead?
The operator fails to deploy, throwing the following error message:

Error: unable to build kubernetes objects from release manifest: [unable to recognize "": no matches for kind "APIService" in version "apiregistration.k8s.io/v1beta1", unable to recognize "": no matches for kind "MutatingWebhookConfiguration" in version "admissionregistration.k8s.io/v1beta1", unable to recognize "": no matches for kind "ValidatingWebhookConfiguration" in version "admissionregistration.k8s.io/v1beta1"]

Possible reason
We think this is caused because we are using kubernetes version newer than v1.22. Kubernetes v1.22 has several API removals as described here: https://kubernetes.io/blog/2021/07/14/upcoming-changes-in-kubernetes-1-22/
To migrate, we need to change the apiVersion from admissionregistration.k8s.io/v1beta1 to admissionregistration.k8s.io/v1, apiregistration.k8s.io/v1.

Additional notes
However, after making these changes in the admission-webhook-registration.yaml, we still get the following error message from the helm install:

Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: [ValidationError(MutatingWebhookConfiguration.webhooks[0]): missing required field "sideEffects" in io.k8s.api.admissionregistration.v1.MutatingWebhook, ValidationError(MutatingWebhookConfiguration.webhooks[0]): missing required field "admissionReviewVersions" in io.k8s.api.admissionregistration.v1.MutatingWebhook]

There seems to be some required fields for the webhook resources.

@unw9527
Copy link
Contributor Author

unw9527 commented Jul 7, 2022

Issued: pingcap/tidb-operator#4614

@unw9527 unw9527 added the bug Something isn't working label Jul 7, 2022
@unw9527
Copy link
Contributor Author

unw9527 commented Jul 17, 2022

Confirmed: pingcap/tidb-operator#4614 (comment)

@unw9527 unw9527 closed this as completed Jul 17, 2022
@tianyin
Copy link
Member

tianyin commented Jul 17, 2022

Should this be a by-product bug in bug.md? @tylergu @unw9527

@unw9527
Copy link
Contributor Author

unw9527 commented Jul 17, 2022

Yes, I will move it to the by-product category.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants