-
Notifications
You must be signed in to change notification settings - Fork 68
🐛 Webhook caBundle issues for Virtual Cluster #125
Comments
/kind bug |
/assign @charleszheng44 |
@vincent-pli are you using |
@charleszheng44 |
/retitle 🐛 Webhook caBundle issues for Virtual Cluster |
@vincent-pli May I know which version of |
Sure, so you can reproduce the problem I hit? @charleszheng44
|
@vincent-pli sorry for the late reply. I run into the same issue when trying to set up VC on the Kind cluster, looks like the certificate assigned to the webhook does not work properly. However, I can successfully set up the VC framework and create VC on Minikube, so this issue may be a Kind-specific issue. I will try to find out the cause. But at the same time, could you try out Minikube or other testing environments? The Minikube version I used is 1.20.0, which uses the same version(v1.20) of Kubernetes as kind v0.10.0. |
That's weird, I check some code, here: we do not set for miniKube, i will take a try but I guess there should be some certification injection feature like |
@vincent-pli This is intentional. If the caBundle is not specified, the system trusted CAs will be used. The details can be found in the definition of WebhookClientConfig. I guess the system-trusted CAs on the Kind cluster is somehow different from the Kubernetes cluster with physical nodes. |
It's means if But the certificate from our webhook is signed by CSR API, the CSR API signed certificate is not a system trust root. Please help to check if the |
Please correct me if I am wrong. My understanding is the
Did you mean the caBundle is injected in the APIServer pod or the node running APIServer? |
Thanks @charleszheng44
I'm not expert in this area, but I guess the I want to say again, I'm not expert but I'm happy to figure it out, thanks @charleszheng44 and I found one issue about openshift, seems they are talking the same thing with us, please take a look: |
@vincent-pli Thanks for pointing me to the OpenShift issue. Looks like the CA used to sign the CSR is not one of the system trust roots (my fault 😅). There are two options to resolve this issue, we can either leverage external components, like cert-manager, or run the webhook server pod with an init-container that generates a self-signing certificate and store the CA to the The cer-manager itself is a large application including many crds. In our case, there is only one webhook and I may go with the second option. I will try to implement it next week. At meanwhile, could you temporarily use Minikube for testing, or hack the code by adding the |
Thanks @charleszheng44 |
Not dig in too much to the code, but in my env, the
webhook
forVirtualCluster
not work.I get this when I try to create
VirtualCluster
:Then i check the
ValidatingWebhookConfiguration
and there is nocaBundle
at all invirtualcluster-validating-webhook-configuration
.After I modify the
virtualcluster-validating-webhook-configuration
and set thecaBundle
with the cluster's CA, everything works as exppected.Seems we do not set the
caBundle
, am i missing something?The text was updated successfully, but these errors were encountered: