Skip to content

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

@ljkiraly

Description

@ljkiraly

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.

  • Can somehow control the timeout in spire controller manager? (the spire-controller-manager-webhook.yaml has a timeoutSeconds parameter - setting that to 30 does not have affect on this issue)
  • Can you suggest any workaround? (e.g. checking webhook availability in init container)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions