Skip to content

[Enhancement] helm should wait critical condition of web-hook service ready #1610

@panpan0000

Description

@panpan0000

[Root Cause]

The metallb controller should be treated as ready until webhook-service ready.
Currently , the readiness use /metrics which will be ready sooner when pod starts, but the webhook-service will be slower.
And helm --wait should wait critical condition of web-hook service ready.

[Reproduce steps]

for example: In below script , the second line of kubectl apply tends to fail

    helm --install metallb  metallb/metallb  --wait

    cat << EOF | kubectl apply -f -
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
  name: "${poolName}"
  namespace: metallb-system
spec:
  addresses:
  - ${vipRange}
---
EOF

The error message will be

 Error from server (InternalError): error when creating "STDIN": Internal error occurred: 
  failed calling webhook "ipaddresspoolvalidationwebhook.metallb.io": 
  failed to call webhook: Post "https://metallb-webhook-service.metallb-system.svc:443/validate-metallb-io-v1beta1-ipaddresspool?timeout=10s": 
  dial tcp 100.67.81.84:443: connect: connection refused

The webhook will be slower, so the controller pod will not be treat as ready until the webhook URL serviceable.

I will create a PR to enhance this.

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