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

m3db-operator is not compatible with kubernetes v1.22 #323

Closed
abdulmi opened this issue Jun 9, 2022 · 1 comment · Fixed by #325
Closed

m3db-operator is not compatible with kubernetes v1.22 #323

abdulmi opened this issue Jun 9, 2022 · 1 comment · Fixed by #325

Comments

@abdulmi
Copy link

abdulmi commented Jun 9, 2022

  • What version of the operator are you running? Please include the docker tag. If using master, please include the git
    SHA logged when the operator first starts.

latest master 9758b96

  • What version of Kubernetes are you running? Please include the output of kubectl version.
    1.22
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.4", GitCommit:"3cce4a82b44f032d0cd1a1790e6d2f5a55d20aae", GitTreeState:"clean", BuildDate:"2021-08-11T18:16:05Z", GoVersion:"go1.16.7", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.6", GitCommit:"07959215dd83b4ae6317b33c824f845abd578642", GitTreeState:"clean", BuildDate:"2022-03-30T18:28:25Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"linux/amd64"}
  • What are you trying to do?
    Upgrading the kubernetes server from 1.21 to 1.22

  • What did you expect to happen?
    The operator continues to work as expected

  • What happened?
    The m3db-operator crashloops with the error below

{"level":"info","ts":"2022-06-09T15:22:11.678Z","msg":"using InCluster k8s config"}
{"level":"info","ts":"2022-06-09T15:22:11.680Z","msg":"starting Operator controller","controller":"m3db-cluster-controller"}
{"level":"fatal","ts":"2022-06-09T15:22:11.977Z","msg":"error running controller","error":"could not create or update CRD: error creating CRD 'm3dbclusters.operator.m3db.io': the server could not find the requested resource","errorVerbose":"the server could not find the requested resource\nerror creating CRD 'm3dbclusters.operator.m3db.io'\ncould not create or update CRD"}

Looking into this, I found out that the m3db-operator code uses a deprecated method as mentioned by the Deprecated API guide. Specifically at this linem3db-operator/crd.go at 01941360ac992fc2f9cce0b6a3383dbde8baf859 · m3db/m3db-operator, its using apiextensions.k8s.io/v1beta1, which according to the guide should be replaced with apiextensions.k8s.io/v1. I have a starter PR to fix this #321, but I still have to fix the spec validation since its using a library thats also dependent on the beta version of the API.

Just wanted to check, is it expected that the operator is not compatible after kubernetes 1.21 ?

@abdulmi abdulmi changed the title m3db-operator is not compatible with kubernetes 1.22 m3db-operator is not compatible with kubernetes v1.22 Jun 9, 2022
schallert added a commit that referenced this issue Jun 27, 2022
- Remove API references to v1beta1 CRD API. Previously the operator
  installed the CRD itself, but with 1.22 it's more common to install
  the CRD separately (since the schema is fully included in the CRD
  definition).
- Generate the CRD manifest using `controller-gen`.

Fixes #323.
@schallert
Copy link
Collaborator

Hey @abdulmi, thanks for your patience while we work on making the operator 1.22-compatible. We have some final testing to do, but believe the linked PR will get us there. I'll keep you posted!

schallert added a commit that referenced this issue Jun 28, 2022
- Remove API references to v1beta1 CRD API. Previously the operator
  installed the CRD itself, but with 1.22 it's more common to install
  the CRD separately (since the schema is fully included in the CRD
  definition).
- Generate the CRD manifest using `controller-gen`.

Fixes #323.
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

Successfully merging a pull request may close this issue.

2 participants