diff --git a/templates/test/ci/cluster-template-prow-aks.yaml b/templates/test/ci/cluster-template-prow-aks.yaml index 2d31ecbc4ae..ae4b5f828e8 100644 --- a/templates/test/ci/cluster-template-prow-aks.yaml +++ b/templates/test/ci/cluster-template-prow-aks.yaml @@ -35,6 +35,7 @@ spec: kind: AzureClusterIdentity name: ${CLUSTER_IDENTITY_NAME} location: ${AZURE_LOCATION} + networkPlugin: none resourceGroupName: ${AZURE_RESOURCE_GROUP:=${CLUSTER_NAME}} sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} subscriptionID: ${AZURE_SUBSCRIPTION_ID} diff --git a/templates/test/ci/prow-aks/kustomization.yaml b/templates/test/ci/prow-aks/kustomization.yaml index 7fe8621e9cd..e63ae7d93e4 100644 --- a/templates/test/ci/prow-aks/kustomization.yaml +++ b/templates/test/ci/prow-aks/kustomization.yaml @@ -9,3 +9,4 @@ patchesStrategicMerge: - patches/aks-pool0.yaml - patches/aks-pool1.yaml - patches/addons.yaml + - patches/byo-cni.yaml \ No newline at end of file diff --git a/templates/test/ci/prow-aks/patches/byo-cni.yaml b/templates/test/ci/prow-aks/patches/byo-cni.yaml new file mode 100644 index 00000000000..1e4e8b1db1c --- /dev/null +++ b/templates/test/ci/prow-aks/patches/byo-cni.yaml @@ -0,0 +1,7 @@ +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +kind: AzureManagedControlPlane +metadata: + name: ${CLUSTER_NAME} + namespace: default +spec: + networkPlugin: none diff --git a/test/e2e/aks.go b/test/e2e/aks.go index 1c61eda53e7..d9aabb5816e 100644 --- a/test/e2e/aks.go +++ b/test/e2e/aks.go @@ -44,11 +44,18 @@ type DiscoverAndWaitForAKSControlPlaneInput struct { // This will be invoked by cluster api e2e framework. func WaitForAKSControlPlaneInitialized(ctx context.Context, input clusterctl.ApplyCustomClusterTemplateAndWaitInput, result *clusterctl.ApplyCustomClusterTemplateAndWaitResult) { client := input.ClusterProxy.GetClient() + cluster := framework.GetClusterByName(ctx, framework.GetClusterByNameInput{ + Getter: client, + Name: input.ClusterName, + Namespace: input.Namespace, + }) + DiscoverAndWaitForAKSControlPlaneInitialized(ctx, DiscoverAndWaitForAKSControlPlaneInput{ Lister: client, Getter: client, Cluster: result.Cluster, }, input.WaitForControlPlaneIntervals...) + InstallCalicoHelmChart(ctx, input, cluster.Spec.ClusterNetwork.Services.CIDRBlocks, false) } // WaitForAKSControlPlaneReady waits for the azure managed control plane to be ready. diff --git a/test/e2e/aks_byo_node.go b/test/e2e/aks_byo_node.go index f15f4dee5cb..ed643d0300d 100644 --- a/test/e2e/aks_byo_node.go +++ b/test/e2e/aks_byo_node.go @@ -172,7 +172,6 @@ func AKSBYONodeSpec(ctx context.Context, inputGetter func() AKSBYONodeSpecInput) pool := &expv1.MachinePool{} err := mgmtClient.Get(ctx, client.ObjectKeyFromObject(machinePool), pool) g.Expect(err).NotTo(HaveOccurred()) - // TODO: check for full readiness after installing CNI + Cloud Provider - g.Expect(conditions.IsTrue(pool, clusterv1.BootstrapReadyCondition)).To(BeTrue()) + g.Expect(conditions.IsTrue(pool, clusterv1.ReadyCondition)).To(BeTrue()) }, input.WaitIntervals...).Should(Succeed()) }