spiffe / spire-controller-manager

Kubernetes controller manager that reconciles workload registration and federation relationships.
Apache License 2.0
52 stars 37 forks source link

Webhook is not ready and leads to helm upgrade failure. #389

Open ljkiraly opened 1 month ago

ljkiraly commented 1 month ago

During a helm upgrade an error occurs:

cannot patch "spire-controller-manager" with kind ClusterSPIFFEID: Internal error occurred: failed calling webhook "spire-controller-manager.nsm.svc": failed to call webhook: Post "https://spire-controller-manager.nsm.svc:443/validate-spire-spiffe-io-v1alpha1-clusterspiffeid?timeout=30s": dial tcp [fd00:eccd:17:ffff::6666:2d4f]:443: connect: connection refused

After some investigation seems that spire-controller-manager is waiting for webhook to be ready. Sometime the webhook needs 50 seconds to start, after helm command issued. That leads to the kubernetes error above. The repeated helm upgrade usually is successful. The problem pops up randomly.