Skip to content

Commit

Permalink
Install CNI on the aks e2e cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
CecileRobertMichon committed Sep 29, 2023
1 parent 49e4ea6 commit e6e3548
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions templates/test/ci/cluster-template-prow-aks.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions templates/test/ci/prow-aks/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ patchesStrategicMerge:
- patches/aks-pool0.yaml
- patches/aks-pool1.yaml
- patches/addons.yaml
- patches/byo-cni.yaml
7 changes: 7 additions & 0 deletions templates/test/ci/prow-aks/patches/byo-cni.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: AzureManagedControlPlane
metadata:
name: ${CLUSTER_NAME}
namespace: default
spec:
networkPlugin: none
7 changes: 7 additions & 0 deletions test/e2e/aks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/aks_byo_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}

0 comments on commit e6e3548

Please sign in to comment.