stefanprodan / timoni

Timoni is a package manager for Kubernetes, powered by CUE and inspired by Helm.
https://timoni.sh
Apache License 2.0
1.45k stars 66 forks source link

Appy Timeout waiting for `*WebhookConfiguration` #311

Open Nalum opened 6 months ago

Nalum commented 6 months ago

Timoni apply is timing out when waiting for ValidatingWebhookConfiguration and MutatingWebhookConfiguration:

❯ timoni apply -n cert-manager cert-manager ./modules/cert-manager
8:15PM INF i:cert-manager > building ./modules/cert-manager
8:15PM INF i:cert-manager > using module timoni.sh/cert-manager version 0.0.0-devel
8:15PM INF i:cert-manager > upgrading cert-manager in namespace cert-manager
8:15PM INF i:cert-manager > CustomResourceDefinition/certificaterequests.cert-manager.io unchanged
...
8:15PM INF i:cert-manager > MutatingWebhookConfiguration/cert-manager-webhook created
8:15PM INF i:cert-manager > ValidatingWebhookConfiguration/cert-manager-webhook created
8:20PM ERR timeout waiting for: [ValidatingWebhookConfiguration/cert-manager/cert-manager-webhook status: 'Unknown', MutatingWebhookConfiguration/cert-manager/cert-manager-webhook status: 'Unknown']

I've verified that the webhooks are hitting the webhook controller:

I0108 09:28:37.704879       1 server.go:299] "cert-manager: request received by mutating webhook" kind="Certificate" name="mallon.ie" namespace="default" response uuid="a5e2af3f-93a2-416c-9613-1a437b2370c0" allowed=true
I0108 09:28:37.711524       1 server.go:299] "cert-manager: request received by validating webhook" kind="Certificate" name="mallon.ie" namespace="default" response uuid="96940f11-dd36-4fdd-86fb-587180dad2f2" allowed=true
I0108 09:28:37.722159       1 server.go:299] "cert-manager: request received by mutating webhook" kind="Certificate" name="mallon.ie" namespace="default" response uuid="d2535dd3-117f-46cf-a1ff-22c68babdcf0" allowed=true
I0108 09:28:37.724702       1 server.go:299] "cert-manager: request received by validating webhook" kind="Certificate" name="mallon.ie" namespace="default" response uuid="d8638e8a-d2d9-4665-ae4e-0feade570764" allowed=true
stefanprodan commented 6 months ago

These objects are cluster scoped and by the looks of it, inside your module a namespace is set on these objects. In any case, I think Timoni should figure out the namespace is wrongly set and ignore it. I will investigate how to implement a workaround for this situation.

stefanprodan commented 6 months ago

For now, to fix this, inside your module use the timoniv1.#MetaClusterComponent to set the correct metadata.

Nalum commented 6 months ago

Ah, thanks @stefanprodan, it's working with that meta setup!