helm: avoid waiting for non-essential services (#2939)

In our e2e tests, we see a lot of "etcd-leader changed" errors
while deploying non-essential helm charts.
If this transient error occurs, helm gets into a broken state
where it cannot uninstall cleanly and thus any retry attempts fail.
By not waiting for the installation of helm charts to succeed,
we can avoid making most of the kubernetes API calls while
control-plane nodes are joining.
This makes "constellation apply" faster and more resilient.
This commit is contained in:
Malte Poll 2024-02-22 12:18:55 +01:00 committed by GitHub
parent 5674d9742a
commit 9d164de18b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -151,7 +151,7 @@ func (i *chartLoader) loadReleases(conformanceMode, deployCSIDriver bool, helmWa
releases := releaseApplyOrder{ciliumRelease, conServicesRelease, certManagerRelease, operatorRelease} releases := releaseApplyOrder{ciliumRelease, conServicesRelease, certManagerRelease, operatorRelease}
if deployCSIDriver { if deployCSIDriver {
csiRelease, err := i.loadRelease(csiInfo, helmWaitMode) csiRelease, err := i.loadRelease(csiInfo, WaitModeNone)
if err != nil { if err != nil {
return nil, fmt.Errorf("loading snapshot CRDs: %w", err) return nil, fmt.Errorf("loading snapshot CRDs: %w", err)
} }
@ -163,14 +163,14 @@ func (i *chartLoader) loadReleases(conformanceMode, deployCSIDriver bool, helmWa
releases = append(releases, csiRelease) releases = append(releases, csiRelease)
} }
if i.csp == cloudprovider.AWS { if i.csp == cloudprovider.AWS {
awsRelease, err := i.loadRelease(awsLBControllerInfo, helmWaitMode) awsRelease, err := i.loadRelease(awsLBControllerInfo, WaitModeNone)
if err != nil { if err != nil {
return nil, fmt.Errorf("loading aws-services: %w", err) return nil, fmt.Errorf("loading aws-services: %w", err)
} }
releases = append(releases, awsRelease) releases = append(releases, awsRelease)
} }
if i.csp == cloudprovider.OpenStack && openStackCfg.DeployYawolLoadBalancer != nil && *openStackCfg.DeployYawolLoadBalancer { if i.csp == cloudprovider.OpenStack && openStackCfg.DeployYawolLoadBalancer != nil && *openStackCfg.DeployYawolLoadBalancer {
yawolRelease, err := i.loadRelease(yawolLBControllerInfo, helmWaitMode) yawolRelease, err := i.loadRelease(yawolLBControllerInfo, WaitModeNone)
if err != nil { if err != nil {
return nil, fmt.Errorf("loading yawol chart: %w", err) return nil, fmt.Errorf("loading yawol chart: %w", err)
} }