conversion webhook for failed: Post : http: server gave HTTP response to HTTPS client #4610
Replies: 1 comment
-
Thank you for raising this issue. It appears you might be working with a project scaffolded before the fixes introduced in Kubebuilder v4.4.0. 🔧 CA Injection Fix for Conversion Webhooks (v4.4.0)
We have been working on stabilizing the implementations of webhooks, certificate management, and metrics. These components had longstanding issues that were not properly surfaced, such as the tool not correctly scaffolding hub versions and missing end-to-end tests. All of these main concerns have been addressed now. 🔍 Observations from the Latest Scaffold
🛠️ Regarding Your Scenario
However, it seems you're using an outdated scaffold where many fixes have already been introduced. To help us verify if there are any other outstanding scenarios that need to be addressed, could you please: ✅ Reproduce the Scenario with the Latest Scaffold
If you encounter any issues:
Thank you for your understanding and assistance in helping us provide a better solution for the entire community. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to follow along with the official tutorials in creating a conversion webhook for my operator using Kubebuilder. Firstly there are a few hurdles that are poorly documented:
webhook/kustomizations.yaml
contains amanifests.yaml
which does not exist. This might exist but only if we are scaffolding a validating and mutating webhook as part of the conversion (which isn't always needed). This therefore needs to be commented out along with thekustomizationconfig.yaml
in this directory which refers to the Mutating and Validating Webhooksdefault/webhookcainjection_patch.yaml
is not needed and should not be commented out along with the replacements defined in thekustomization.yaml
which refer to the Mutating and Validating webhooks.Even once these are completed and the operator will deploy successfully, it then seems to throw an error on reconciliation:
If I'm correct in understanding the architecture the reconciliation will reach out to the conversion webhook at the defined kubernetes service address, which will route this request back into the same pod on the port where the conversion webhook is served? So this sounds to me like the client in the controller making the reconciliation request is using HTTPS but then the webhook responds with an HTTP response.
Obviously this points to a cert manager issue but I have uncommented all the relevant cert manager parts (excluding the above points I noted) and can see that the CRD conversion webhook has the
caBundle
property as expected.Is there anything else that I am missing? Is there any insights on this problem that anyone has?
Beta Was this translation helpful? Give feedback.
All reactions