Skip to content

Commit 4285b61

Browse files
committed
Don't need to know if cni is windows anymore
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
1 parent e1fae35 commit 4285b61

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

test/e2e/cloud-provider-azure.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const (
4444

4545
// EnsureCNIAndCloudProviderAzureHelmChart installs the official cloud-provider-azure helm chart
4646
// and a CNI and validates that expected pods exist and are Ready.
47-
func EnsureCNIAndCloudProviderAzureHelmChart(ctx context.Context, input clusterctl.ApplyCustomClusterTemplateAndWaitInput, installHelmChart bool, cidrBlocks []string, hasWindows bool) {
47+
func EnsureCNIAndCloudProviderAzureHelmChart(ctx context.Context, input clusterctl.ApplyCustomClusterTemplateAndWaitInput, installHelmChart bool, cidrBlocks []string) {
4848
specName := "ensure-cloud-provider-azure"
4949
clusterProxy := input.ClusterProxy.GetWorkloadCluster(ctx, input.Namespace, input.ClusterName)
5050

@@ -77,7 +77,7 @@ func EnsureCNIAndCloudProviderAzureHelmChart(ctx context.Context, input clusterc
7777
}
7878

7979
// We do this before waiting for the pods to be ready because there is a co-dependency between CNI (nodes ready) and cloud-provider being initialized.
80-
EnsureCNI(ctx, input, installHelmChart, cidrBlocks, hasWindows)
80+
EnsureCNI(ctx, input, installHelmChart, cidrBlocks)
8181

8282
By("Waiting for Ready cloud-controller-manager deployment pods")
8383
for _, d := range []string{"cloud-controller-manager"} {

test/e2e/cni.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ const (
4343
)
4444

4545
// EnsureCNI installs the CNI plugin depending on the input.CNIManifestPath
46-
func EnsureCNI(ctx context.Context, input clusterctl.ApplyCustomClusterTemplateAndWaitInput, installHelmChart bool, cidrBlocks []string, hasWindows bool) {
46+
func EnsureCNI(ctx context.Context, input clusterctl.ApplyCustomClusterTemplateAndWaitInput, installHelmChart bool, cidrBlocks []string) {
4747
if input.CNIManifestPath != "" {
48-
InstallCNIManifest(ctx, input, cidrBlocks, hasWindows)
48+
InstallCNIManifest(ctx, input, cidrBlocks)
4949
} else {
50-
EnsureCalicoIsReady(ctx, input, installHelmChart, cidrBlocks, hasWindows)
50+
EnsureCalicoIsReady(ctx, input, installHelmChart, cidrBlocks)
5151
}
5252
}
5353

5454
// InstallCNIManifest installs the CNI manifest provided by the user
55-
func InstallCNIManifest(ctx context.Context, input clusterctl.ApplyCustomClusterTemplateAndWaitInput, cidrBlocks []string, hasWindows bool) { //nolint:revive // leaving unused cidrBlocks and hasWindows for understanding
55+
func InstallCNIManifest(ctx context.Context, input clusterctl.ApplyCustomClusterTemplateAndWaitInput, cidrBlocks []string) { //nolint:revive // leaving unused cidrBlocks
5656
By("Installing a CNI plugin to the workload cluster")
5757
workloadCluster := input.ClusterProxy.GetWorkloadCluster(ctx, input.Namespace, input.ClusterName)
5858

@@ -63,7 +63,7 @@ func InstallCNIManifest(ctx context.Context, input clusterctl.ApplyCustomCluster
6363
}
6464

6565
// EnsureCalicoIsReady copies the kubeadm configmap to the calico-system namespace and waits for the calico pods to be ready.
66-
func EnsureCalicoIsReady(ctx context.Context, input clusterctl.ApplyCustomClusterTemplateAndWaitInput, installHelmChart bool, cidrBlocks []string, hasWindows bool) {
66+
func EnsureCalicoIsReady(ctx context.Context, input clusterctl.ApplyCustomClusterTemplateAndWaitInput, installHelmChart bool, cidrBlocks []string) {
6767
specName := "ensure-calico"
6868

6969
clusterProxy := input.ClusterProxy.GetWorkloadCluster(ctx, input.Namespace, input.ClusterName)

test/e2e/common.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,9 @@ func ensureControlPlaneInitialized(ctx context.Context, input clusterctl.ApplyCu
299299

300300
if kubeadmControlPlane.Spec.KubeadmConfigSpec.ClusterConfiguration.ControllerManager.ExtraArgs["cloud-provider"] != infrav1.AzureNetworkPluginName {
301301
// There is a co-dependency between cloud-provider and CNI so we install both together if cloud-provider is external.
302-
EnsureCNIAndCloudProviderAzureHelmChart(ctx, input, installHelmCharts, cluster.Spec.ClusterNetwork.Pods.CIDRBlocks, hasWindows)
302+
EnsureCNIAndCloudProviderAzureHelmChart(ctx, input, installHelmCharts, cluster.Spec.ClusterNetwork.Pods.CIDRBlocks)
303303
} else {
304-
EnsureCNI(ctx, input, installHelmCharts, cluster.Spec.ClusterNetwork.Pods.CIDRBlocks, hasWindows)
304+
EnsureCNI(ctx, input, installHelmCharts, cluster.Spec.ClusterNetwork.Pods.CIDRBlocks)
305305
}
306306
controlPlane := discoveryAndWaitForControlPlaneInitialized(ctx, input, result)
307307
EnsureAzureDiskCSIDriverHelmChart(ctx, input, installHelmCharts, hasWindows)

0 commit comments

Comments
 (0)