Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Controller incompatible with Kubernetes 1.22 #476

Open
phoerious opened this issue Dec 15, 2021 · 1 comment
Open

Controller incompatible with Kubernetes 1.22 #476

phoerious opened this issue Dec 15, 2021 · 1 comment

Comments

@phoerious
Copy link

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.

@phoerious
Copy link
Author

Seems to work with this fork: https://github.com/spotify/flink-on-k8s-operator

I guess this repo is mostly unmaintained.

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

No branches or pull requests

1 participant