Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.
This repository was archived by the owner on May 8, 2025. It is now read-only.

Controller incompatible with Kubernetes 1.22 #476

Open
@phoerious

Description

@phoerious

This issue is related to #462

I tried fixing up the controller to be compatible with Kubernetes 1.22, but it seems to be an endless rabbit hole and I am not familiar enough with the internals of this controller to sketch up a working PR.

apiextensions.k8s.io/v1beta1 has been removed in 1.22 and therefore, I can no longer install the CRDs. Patching v1beta1 out involves at least:

  1. Changing all apiVersion fields in YAML files
  2. Updating controller-tools to something less ancient than 0.3.0
    • 0.7.0 has removed support for k8s < 1.22 and you need to remove trivialVersions=true from CRD_OPTIONS
  3. Tweaking kubebuilder markers in api/v1beta/flinkcluster_webhook.go

Step 3 is where I'm struggling, because I am neither familiar with what these web hooks are supposed to do nor with kubebuilder itself. I figured out that you at least need to add these definitions to lines 44 and 66:

...,admissionReviewVersions=["v1beta"],sideEffects=None

yet I don't know if the values are correct for what the controllers do. After adding these values, I am one step further, but now I am having trouble with unapproved APIs:

kubectl apply -f config/crd/bases
The CustomResourceDefinition "flinkclusters.flinkoperator.k8s.io" is invalid: metadata.annotations[api-approved.kubernetes.io]: Required value: protected groups must have approval annotation "api-approved.kubernetes.io", see https://github.com/kubernetes/enhancements/pull/1111

I am not sure how to fix that, because config/crd/bases/* gets recreated by controller-gen and I don't think this API is approved in the first place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions