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

current CRDs aren't valid with the new GA-version of apiextensions.k8s.io/v1 #778

Closed
bavarianbidi opened this issue Jan 18, 2021 · 2 comments · Fixed by #937
Closed

current CRDs aren't valid with the new GA-version of apiextensions.k8s.io/v1 #778

bavarianbidi opened this issue Jan 18, 2021 · 2 comments · Fixed by #937
Assignees
Labels
feature request A request for a specific feature to be added to Kuberhealthy
Milestone

Comments

@bavarianbidi
Copy link
Contributor

bavarianbidi commented Jan 18, 2021

Describe the bug
Since kubernetes 1.16 the apiextensions.k8s.io/v1beta1 is deprecated and will be unavailable in 1.22.
Deploying a CRD with apiextension.k8s.io/v1beta1 via kubectl leads to following warning:

Warning: apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
customresourcedefinition.apiextensions.k8s.io/khjobs.comcast.github.io created

Steps To Reproduce

  • Create a cluster with version 1.19 or 1.20 (kind create cluster)
    and run
    cat << EOF | kubectl apply -f -
    apiVersion: apiextensions.k8s.io/v1beta1
    kind: CustomResourceDefinition
    metadata:
      name: khstates.comcast.github.io
    spec:
      group: comcast.github.io
      version: v1
      scope: Namespaced
      names:
        plural: khstates
        singular: khstate
        kind: KuberhealthyState
        shortNames:
          - khs
     EOF
    

Expected behavior
No warning message

Additional context

But with some autogenerated CRDs we could use controller-gen from Kubebuilder.
Maybe useful to solve #603

following CRD-definition works for now:

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: khchecks.comcast.github.io
spec:
  group: comcast.github.io
  versions:
  - name: v1
    served: true
    storage: true
    schema:
      openAPIV3Schema:
        type: object
        x-kubernetes-embedded-resource: true
        x-kubernetes-preserve-unknown-fields: true
  scope: Namespaced
  names:
    plural: khchecks
    singular: khcheck
    kind: KuberhealthyCheck
    shortNames:
      - khc
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: khstates.comcast.github.io
spec:
  group: comcast.github.io
  versions:
  - name: v1
    served: true
    storage: true
    schema:
      openAPIV3Schema:
        type: object
        x-kubernetes-embedded-resource: true
        x-kubernetes-preserve-unknown-fields: true
  scope: Namespaced
  names:
    plural: khstates
    singular: khstate
    kind: KuberhealthyState
    shortNames:
      - khs
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: khjobs.comcast.github.io
spec:
  group: comcast.github.io
  versions:
  - name: v1
    served: true
    storage: true
    schema:
      openAPIV3Schema:
        type: object
        x-kubernetes-embedded-resource: true
        x-kubernetes-preserve-unknown-fields: true
  scope: Namespaced
  names:
    plural: khjobs
    singular: khjob
    kind: KuberhealthyJob
    shortNames:
      - khj
@bavarianbidi bavarianbidi added the bug Something isn't working label Jan 18, 2021
@integrii
Copy link
Collaborator

We need to figure out what the minimum supported version of apiextensions.k8s.io/v1 is, and then list our compatibility matrix in our readme. This way users know which versions of Kuberhealthy support which versions of Kubernetes.

Then, we need to make the apiVersion change and run things through some tests so that we are sure everything still works. After that, we can push this out in a release.

I am moving this from a bug to a feature request.

@integrii integrii added feature request A request for a specific feature to be added to Kuberhealthy and removed bug Something isn't working labels Jan 21, 2021
@integrii integrii added this to the 2.5.0 milestone Feb 3, 2021
@integrii
Copy link
Collaborator

integrii commented Jun 2, 2021

Part of PR #937

@integrii integrii modified the milestones: v2.5.0, v2.6.0 Jun 2, 2021
@integrii integrii linked a pull request Jun 2, 2021 that will close this issue
@integrii integrii modified the milestones: v2.6.0, v2.7.0 Jun 23, 2021
@joshulyne joshulyne modified the milestones: v2.7.0, v2.6.0 Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A request for a specific feature to be added to Kuberhealthy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants