kudobuilder / kudo

Kubernetes Universal Declarative Operator (KUDO)
https://kudo.dev
Apache License 2.0
1.17k stars 103 forks source link

error: unable to recognize "kudo.yaml": no matches for kind "MutatingWebhookConfiguration" in version "admissionregistration.k8s.io/v1beta1" #1804

Open suikast42 opened 2 years ago

suikast42 commented 2 years ago

What happened: The suggested init brings the error "error: unable to recognize "kudo.yaml": no matches for kind "MutatingWebhookConfiguration" in version "admissionregistration.k8s.io/v1beta1"

How to reproduce it (as minimally and precisely as possible): $ kubectl kudo init --dry-run -o=yaml > kudo.yaml $ kubectl apply -f kudo.yaml

Anything else we need to know?: I look at extensible-admission-controllers and replace line 531 of the kudo.yaml with apiVersion: admissionregistration.k8s.io/v1 and add admissionReviewVersions: ["v1", "v1beta1"] to client config of that resource. After that I see no issues if I apply the kudo.yaml

Environment:

suikast42 commented 2 years ago

I do a downgrade to kubernetes version 1.21.5 and see the warning . But the issue is gone Warning: admissionregistration.k8s.io/v1beta1 MutatingWebhookConfiguration is deprecated in v1.16+, unavailable in v1.22+; use admissionregistration.k8s.io/v1 MutatingWebhookConfiguration

I assume there is some stuff in kudo code that relies on the beata version.

dboyleitrs commented 2 years ago

We are running into the same issue now. KUDO v0.19.0 will not init on a Kubernetes cluster running v1.22+.

Just wondering if there will be future releases of KUDO to address this?

suikast42 commented 2 years ago

We are running into the same issue now. KUDO v0.19.0 will not init on a Kubernetes cluster running v1.22+.

I try to build kudo from source but I failed with this. There is no entrypoint which explains build from source. The reason why it's not working with 1.22+ ist hat the api admissionregistration.k8s.io/v1beta1 is removed from kubernetes. You have to use admissionregistration.k8s.io/v1. Accorrding to k8s it should not be hard to migrate

dove-young commented 2 years ago

this is related to https://github.com/kudobuilder/kudo/issues/1807 . you might need to change admission version to v1

dbarentine commented 2 years ago

It's a known issue. There are two K8s apis (if I remembered correctly) where v1beta1 was deprecated and now removed in 1.22. I've been working on the required changes plus some other dependency updates here: https://github.com/oneidentity/kudo/tree/feature/go118_dependency_update

It's mostly done. That branch builds locally and can deploy into 1.22+ clusters.

There are a couple of related but older PRs from @kensipe here:

1799

1805

1806

My hope is to finish it up this week and have a possible PR that would encapsulate all the work in those other three PRs, some additional dependency updates, and all the test fixes that come with that.

But as I'm not a core committer, I'm not sure what the status will be with getting it merged and a new release. For our own purposes we may end up building it ourselves and running our built version until it's resolved in the core project.