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
feat: Apply MetalLB configuration to remote cluster (#783)
**What problem does this PR solve?**:
- Generates MetalLB configuration from ServiceLoadBalancer Configuration
API (added in #778)
- Waits for MetalLB helm chart to be successfully deployed (using waiter
added in #777)
- Applies MetalLB configuration to remote cluster, also using a wait.
To apply MetalLB configuration, the MetalLB CRD webhooks must be ready.
This is not guaranteed to happen once the MetalLB helm chart is
successfully deployed.
Because the MetalLB configuration is applied in a non-blocking lifecycle
hook, the topology controller retries the hook immediately after it
returns; we cannot ask for a delay. Because the topology controller
backs off its requests exponentially, this often results in the hook
requests being delayed for 3+ minutes before succeeding.
To mitigate this exponential backoff, the hook retries internally for to
up to 20 seconds, within the 30 seconds recommended by the Cluster API.
<details>
<summary>Related log excerpt</summary>
```
I0628 19:39:31.051929 1 handler.go:132] "Deploying ServiceLoadBalancer provider MetalLB" cluster="default/dlipovetsky"
I0628 19:39:31.051954 1 handler.go:82] "Applying MetalLB installation" cluster="default/dlipovetsky"
I0628 19:39:31.100706 1 cm.go:82] "Fetching HelmChart info for \"metallb\" from configmap default/default-helm-addons-config" cluster="default/dlipovetsky"
E0628 19:39:41.031497 1 handler.go:140] "failed to deploy ServiceLoadBalancer provider MetalLB" err="context canceled: last apply error: failed to apply MetalLB configuration IPAddressPool metallb-system/metallb: server-side apply failed: Patch \"https://172.18.0.2:6443/apis/metallb.io/v1beta1/namespaces/metallb-system/ipaddresspools/metallb?fieldManager=cluster-api-runtime-extensions-nutanix&fieldValidation=Strict&timeout=10s\": context canceled" cluster="default/dlipovetsky"
...
E0628 19:43:49.496027 1 handler.go:140] "failed to deploy ServiceLoadBalancer provider MetalLB" err="context canceled: last apply error: failed to apply MetalLB configuration IPAddressPool metallb-system/metallb: server-side apply failed: 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 10.130.84.48:443: connect: connection refused" cluster="default/dlipovetsky"
I0628 19:43:51.785907 1 handler.go:132] "Deploying ServiceLoadBalancer provider MetalLB" cluster="default/dlipovetsky"
I0628 19:43:51.785923 1 handler.go:82] "Applying MetalLB installation" cluster="default/dlipovetsky"
I0628 19:43:51.790521 1 cm.go:82] "Fetching HelmChart info for \"metallb\" from configmap default/default-helm-addons-config" cluster="default/dlipovetsky"
```
</details>
**Which issue(s) this PR fixes**:
Fixes #
**How Has This Been Tested?**:
<!--
Please describe the tests that you ran to verify your changes.
Provide output from the tests and any manual steps needed to replicate
the tests.
-->
**Special notes for your reviewer**:
<!--
Use this to provide any additional information to the reviewers.
This may include:
- Best way to review the PR.
- Where the author wants the most review attention on.
- etc.
-->
0 commit comments