Replies: 2 comments 2 replies
-
Hi @smv5309 👋 Following all comments inline — I hope this helps clarify and get things working for you! 💛 🛠️ Regarding the changes
So sorry for the trouble. We truly do our best to avoid burn-style changes, but unfortunately, a few important reasons required us to move forward with these updates: 🔸 Removal of kube-rbac-proxy : #3907We had to remove Instead, we now rely on cert-manager for both webhook and metrics certificates, and use
🔸 Fix for CA Injection HandlingFixed CA injection for conversion webhooks. Previously, the CA injection patch was not accurate; The injection should occur only for CRDs, which are conversion types and not for all CRDs when a webhook with --conversion option is scaffolded. The issue goes back to release 3.5.0 (where to replace vars for replacements was done and the kustomize/v2-alpha plugin was introduced). It was not previously found, likely because conversion webhook features were incomplete, which is addressed in this release. Now, users can use the tool to generate the conversion webhooks properly (#4254). (#4282). See what is new bellow ✨ What's New?Since this release: https://github.com/kubernetes-sigs/kubebuilder/releases/tag/v4.4.0, you can scaffold a conversion webhook using: # Create API to check webhook --conversion from v1 to v2
$ kubebuilder create api --group example.com --version v1 --kind Wordpress --controller=true --resource=true
$ kubebuilder create api --group example.com --version v2 --kind Wordpress --controller=false --resource=true
$ kubebuilder create webhook --group example.com --version v1 --kind Wordpress --conversion --spoke v2 This is part of a broader effort to fully support webhook conversions, which weren’t properly handled before — especially when bugs like the one above are involved.
🧯 Addressing Upgrade PainWe're also working to automate project upgrades to reduce this kind of "burn": 🔍 Regarding Your ErrorWe’ve tested the updated scaffolding in our e2e tests, and it's working as expected. The issue you're seeing is likely caused by trying to adapt the new scaffolding into an existing customized project. Let’s walk through the key areas you can check. You can always refer to the sample project at: Regards:
✅ Check 1: TLS Flags in
|
Beta Was this translation helpful? Give feedback.
-
Closing as sorted out, if you need feel free to re-open. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Previously I was using an older version of kubebuilder as part of operator-sdk
v1.6
and the latest cert-manager1.7.0
and I had conversion webhooks working. Recently I have migrated the operator over to he latest kubebuilderv4.6.0
and regenerated my operator. I have made no changes to my cert manager manifests however the newest Kubebuilder removed ca-injection and added significant stuff to config/default/kustomization.yaml.I followed the setup guide as outlined in https://book-v3.book.kubebuilder.io/multiversion-tutorial/deployment and i noticed several things.
webhook/kustomizations.yaml
contains amanifests.yaml
which does not exist. Even when you run for examplekubebuilder create webhook --group app --version v1 --kind AppSpec --defaulting --programmatic-validation
to create a mutilating validating webhook it does not get created. There for it needs to be commented out2.Currently I am encountering the following error.
[https://x-operator-webhook-service.x-operator-system.svc:443/convert](https://x-operator-webhook-service.x-operator-system.svc/convert)? timeout=30s": no endpoints available for service "x-operator-webhook-service"
This occurs any time i try to deploy a manifest using one of the CRDS the operator manages.
I have cert-manager installed and see the certificates in kubernetes.
NAMESPACE NAME READY SECRET AGE
x-operator-system x-operator-metrics-certs True metrics-server-cert 6m29s
x-operator-system x-operator-serving-cert True webhook-server-cert 6m28s
I am also seeing the following inside the cert-manager-webhook logs
"http:TLS handshake error from 10.150.0.0:35564: EOF"
I have properly uncommented the
config/default/kustomization.yaml
as outlined in the current documentation.I am unsure if this is related or not but any assistance solving this lack of endpoint would be greatly appreciated. I am quite stuck, my only recourse at the moment is potentially to revert to an older version of kubebuilder and re generate my entire project again which is not really an option.
I also added the following to the conversion revisions in the
config/crd/patches/webhook_<name>.yaml
to support a second version i do not know if this is also necessary.conversionReviewVersions: ["v1", "v2"]
Beta Was this translation helpful? Give feedback.
All reactions