diff --git a/Makefile b/Makefile index cbb77f9d8b83..c95f68048bb1 100644 --- a/Makefile +++ b/Makefile @@ -566,6 +566,7 @@ generate-e2e-templates-main: $(KUSTOMIZE) $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template-ipv6 --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template-ipv6.yaml $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template-topology-dualstack-ipv6-primary --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template-topology-dualstack-ipv6-primary.yaml $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template-topology-dualstack-ipv4-primary --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template-topology-dualstack-ipv4-primary.yaml + $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template-topology-self-hosted --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template-topology-self-hosted.yaml $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template-topology-single-node-cluster --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template-topology-single-node-cluster.yaml $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template-topology-autoscaler --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template-topology-autoscaler.yaml $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template-topology --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template-topology.yaml diff --git a/test/e2e/config/docker.yaml b/test/e2e/config/docker.yaml index c56efd998348..a7cb08ab4ca1 100644 --- a/test/e2e/config/docker.yaml +++ b/test/e2e/config/docker.yaml @@ -201,6 +201,7 @@ providers: - sourcePath: "../data/infrastructure-docker/main/cluster-template-kcp-scale-in.yaml" - sourcePath: "../data/infrastructure-docker/main/cluster-template-ipv6.yaml" - sourcePath: "../data/infrastructure-docker/main/cluster-template-topology-dualstack-ipv6-primary.yaml" + - sourcePath: "../data/infrastructure-docker/main/cluster-template-topology-self-hosted.yaml" - sourcePath: "../data/infrastructure-docker/main/cluster-template-topology-dualstack-ipv4-primary.yaml" - sourcePath: "../data/infrastructure-docker/main/cluster-template-topology-single-node-cluster.yaml" - sourcePath: "../data/infrastructure-docker/main/cluster-template-topology-autoscaler.yaml" diff --git a/test/e2e/data/infrastructure-docker/main/cluster-template-topology-self-hosted/drop-machinepools.yaml b/test/e2e/data/infrastructure-docker/main/cluster-template-topology-self-hosted/drop-machinepools.yaml new file mode 100644 index 000000000000..c60319a9eb9e --- /dev/null +++ b/test/e2e/data/infrastructure-docker/main/cluster-template-topology-self-hosted/drop-machinepools.yaml @@ -0,0 +1,2 @@ +- op: remove + path: /spec/topology/workers/machinePools \ No newline at end of file diff --git a/test/e2e/data/infrastructure-docker/main/cluster-template-topology-self-hosted/kustomization.yaml b/test/e2e/data/infrastructure-docker/main/cluster-template-topology-self-hosted/kustomization.yaml new file mode 100644 index 000000000000..25bd93573b2c --- /dev/null +++ b/test/e2e/data/infrastructure-docker/main/cluster-template-topology-self-hosted/kustomization.yaml @@ -0,0 +1,10 @@ +bases: + - ../bases/cluster-with-topology.yaml + - ../bases/crs.yaml + +patches: + - path: ./drop-machinepools.yaml + target: + group: cluster.x-k8s.io + version: v1beta1 + kind: Cluster diff --git a/test/e2e/self_hosted_test.go b/test/e2e/self_hosted_test.go index 11ee79afa660..c10a55dbc1a5 100644 --- a/test/e2e/self_hosted_test.go +++ b/test/e2e/self_hosted_test.go @@ -45,7 +45,7 @@ var _ = Describe("When testing Cluster API working on self-hosted clusters using BootstrapClusterProxy: bootstrapClusterProxy, ArtifactFolder: artifactFolder, SkipCleanup: skipCleanup, - Flavor: "topology", + Flavor: "topology-self-hosted", InfrastructureProvider: pointer.String("docker"), ControlPlaneMachineCount: pointer.Int64(1), WorkerMachineCount: pointer.Int64(1), @@ -61,7 +61,7 @@ var _ = Describe("When testing Cluster API working on self-hosted clusters using BootstrapClusterProxy: bootstrapClusterProxy, ArtifactFolder: artifactFolder, SkipCleanup: skipCleanup, - Flavor: "topology", + Flavor: "topology-self-hosted", InfrastructureProvider: pointer.String("docker"), ControlPlaneMachineCount: pointer.Int64(3), WorkerMachineCount: pointer.Int64(1), diff --git a/test/framework/cluster_topology_helpers.go b/test/framework/cluster_topology_helpers.go index 927aea913555..32726c8e2435 100644 --- a/test/framework/cluster_topology_helpers.go +++ b/test/framework/cluster_topology_helpers.go @@ -84,8 +84,6 @@ func UpgradeClusterTopologyAndWaitForUpgrade(ctx context.Context, input UpgradeC Expect(input.ClusterProxy).ToNot(BeNil(), "Invalid argument. input.ClusterProxy can't be nil when calling UpgradeClusterTopologyAndWaitForUpgrade") Expect(input.Cluster).ToNot(BeNil(), "Invalid argument. input.Cluster can't be nil when calling UpgradeClusterTopologyAndWaitForUpgrade") Expect(input.ControlPlane).ToNot(BeNil(), "Invalid argument. input.ControlPlane can't be nil when calling UpgradeClusterTopologyAndWaitForUpgrade") - Expect(input.MachineDeployments).ToNot(BeEmpty(), "Invalid argument. input.MachineDeployments can't be empty when calling UpgradeClusterTopologyAndWaitForUpgrade") - Expect(input.MachinePools).ToNot(BeEmpty(), "Invalid argument. input.MachinePools can't be empty when calling UpgradeClusterTopologyAndWaitForUpgrade") Expect(input.KubernetesUpgradeVersion).ToNot(BeNil(), "Invalid argument. input.KubernetesUpgradeVersion can't be empty when calling UpgradeClusterTopologyAndWaitForUpgrade") mgmtClient := input.ClusterProxy.GetClient()