You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on rancher/rancher#41789 I wanted to test that the webhook was still working correctly after some dependency changes. I deleted both mutating and validating webhook configuration. I expected webhook to recreate both but it only created the validating one. Here's what I see in the logs:
time="2023-09-01T20:08:33Z" level=error msg="error syncing 'cattle-system/cattle-webhook-ca': handler secrets: failed to create mutating configuration: MutatingWebhookConfiguration.admissionregistration.k8s.io \"\" is invalid: metadata.name: Required value: name or generateName is required, requeuing"
This patch fixes the issue for me so I'll create a PR:
I'm currently running into this same issue. I recreated the rancher.cattle.io MutatingWebhookConfiguration, deleted the rancher-webhook pod and it now restarts correctly. My downstream cluster is still presenting
Internal error occurred: failed calling webhook "rancher.cattle.io.namespaces.create-non-kubesystem": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/namespaces?timeout=10s": context deadline exceeded
Any idea how to kick start the downstream cluster to make it check back in?
Internal error occurred: failed calling webhook "rancher.cattle.io.namespaces.create-non-kubesystem": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/namespaces?timeout=10s": context deadline exceeded
That seems to be a separate issue. This error message points to /webhook/validation but in your case it was the MutatingWebhookConfiguration that was recreated. Also, the error message says that it's making the request to the validating webhook, but it times out.
Internal error occurred: failed calling webhook "rancher.cattle.io.namespaces.create-non-kubesystem": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/namespaces?timeout=10s": context deadline exceeded
That seems to be a separate issue. This error message points to /webhook/validation but in your case it was the MutatingWebhookConfiguration that was recreated. Also, the error message says that it's making the request to the validating webhook, but it times out.
According to rancher/rancher#42611, this issue is a duplicate. In my case, I followed the solution in rancher/rancher#42611 (comment) and was able to get the rancher-webhook started again. Sorry for any confusion
Summary
While working on rancher/rancher#41789 I wanted to test that the webhook was still working correctly after some dependency changes. I deleted both mutating and validating webhook configuration. I expected webhook to recreate both but it only created the validating one. Here's what I see in the logs:
This patch fixes the issue for me so I'll create a PR:
Reproducing
Delete both webhook configurations
Wait a little bit so that webhook tries to recreate them.
You'll see that the validating exists but not the mutating.
EDIT: Note that the this can also be reproduced by following the official instructions for rotating expired webhook certificates: https://ranchermanager.docs.rancher.com/v2.7/troubleshooting/other-troubleshooting-tips/expired-webhook-certificate-rotation
The text was updated successfully, but these errors were encountered: