diff --git a/test/e2e/cloud-provider-azure.go b/test/e2e/cloud-provider-azure.go index a976a239d37..091cff38768 100644 --- a/test/e2e/cloud-provider-azure.go +++ b/test/e2e/cloud-provider-azure.go @@ -77,19 +77,15 @@ func InstallCNIAndCloudProviderAzureHelmChart(ctx context.Context, input cluster } } -// InstallAzureDiskCSIDriverHelmChart installs the official azure-disk CSI driver helm chart -func InstallAzureDiskCSIDriverHelmChart(ctx context.Context, input clusterctl.ApplyCustomClusterTemplateAndWaitInput, hasWindows bool) { - specName := "azuredisk-csi-drivers-install" - By("Installing azure-disk CSI driver components via helm") - options := &HelmOptions{ - Values: []string{"controller.replicas=1", "controller.runOnControlPlane=true"}, - } - // TODO: make this always true once HostProcessContainers are on for all supported k8s versions. - if hasWindows { - options.Values = append(options.Values, "windows.useHostProcessContainers=true") - } +// EnsureAzureDiskCSIDriverHelmChart installs the official azure-disk CSI driver helm chart +func EnsureAzureDiskCSIDriverHelmChart(ctx context.Context, input clusterctl.ApplyCustomClusterTemplateAndWaitInput) { + specName := "ensure-azuredisk-csi-drivers" + By("Ensuring azure-disk CSI driver is installed via CAAPH") + // // TODO: make this always true once HostProcessContainers are on for all supported k8s versions. + // if hasWindows { + // options.Values = append(options.Values, "windows.useHostProcessContainers=true") + // } clusterProxy := input.ClusterProxy.GetWorkloadCluster(ctx, input.Namespace, input.ClusterName) - InstallHelmChart(ctx, clusterProxy, kubesystem, azureDiskCSIDriverHelmRepoURL, azureDiskCSIDriverChartName, azureDiskCSIDriverHelmReleaseName, options, "") By("Waiting for Ready csi-azuredisk-controller deployment pods") for _, d := range []string{"csi-azuredisk-controller"} { waitInput := GetWaitForDeploymentsAvailableInput(ctx, clusterProxy, d, kubesystem, specName) diff --git a/test/e2e/common.go b/test/e2e/common.go index 0e76aca8515..245645b6b59 100644 --- a/test/e2e/common.go +++ b/test/e2e/common.go @@ -298,7 +298,7 @@ func ensureControlPlaneInitialized(ctx context.Context, input clusterctl.ApplyCu EnsureCNI(ctx, input, installHelmCharts, cluster.Spec.ClusterNetwork.Pods.CIDRBlocks, hasWindows) } controlPlane := discoveryAndWaitForControlPlaneInitialized(ctx, input, result) - InstallAzureDiskCSIDriverHelmChart(ctx, input, hasWindows) + EnsureAzureDiskCSIDriverHelmChart(ctx, input) result.ControlPlane = controlPlane }