From 8090a147cb2b70b4976717afc496454e5181a8bd Mon Sep 17 00:00:00 2001 From: killianmuldoon Date: Wed, 17 Aug 2022 19:05:59 +0100 Subject: [PATCH] Create template flavor for topology-changes test Signed-off-by: killianmuldoon --- test/e2e/Makefile | 1 + test/e2e/clusterclass_changes_test.go | 2 +- test/e2e/config/docker.yaml | 1 + .../kustomization.yaml | 10 ++++++++++ .../node-drain-timeout.yaml | 2 ++ 5 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 test/e2e/data/infrastructure-docker/v1beta1/cluster-template-topology-changes/kustomization.yaml create mode 100644 test/e2e/data/infrastructure-docker/v1beta1/cluster-template-topology-changes/node-drain-timeout.yaml diff --git a/test/e2e/Makefile b/test/e2e/Makefile index 6ca0f061c413..6f24dfd94576 100644 --- a/test/e2e/Makefile +++ b/test/e2e/Makefile @@ -100,6 +100,7 @@ cluster-templates-v1beta1: $(KUSTOMIZE) ## Generate cluster templates for v1beta $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1beta1/cluster-template-kcp-scale-in --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1beta1/cluster-template-kcp-scale-in.yaml $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1beta1/cluster-template-ipv6 --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1beta1/cluster-template-ipv6.yaml $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1beta1/cluster-template-topology --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1beta1/cluster-template-topology.yaml + $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1beta1/cluster-template-topology-changes --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1beta1/cluster-template-topology-changes.yaml $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1beta1/cluster-template-ignition --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1beta1/cluster-template-ignition.yaml test-extension-deployment: $(KUSTOMIZE) ## Generate deployment for test extension diff --git a/test/e2e/clusterclass_changes_test.go b/test/e2e/clusterclass_changes_test.go index 661111b950aa..81a79c12ccc7 100644 --- a/test/e2e/clusterclass_changes_test.go +++ b/test/e2e/clusterclass_changes_test.go @@ -31,7 +31,7 @@ var _ = Describe("When testing ClusterClass changes [ClusterClass]", func() { BootstrapClusterProxy: bootstrapClusterProxy, ArtifactFolder: artifactFolder, SkipCleanup: skipCleanup, - Flavor: "topology", + Flavor: "topology-changes", // ModifyControlPlaneFields are the ControlPlane fields which will be set on the // ControlPlaneTemplate of the ClusterClass after the initial Cluster creation. // The test verifies that these fields are rolled out to the ControlPlane. diff --git a/test/e2e/config/docker.yaml b/test/e2e/config/docker.yaml index 36a89ddaf2b7..86daf1bfcb67 100644 --- a/test/e2e/config/docker.yaml +++ b/test/e2e/config/docker.yaml @@ -195,6 +195,7 @@ providers: - sourcePath: "../data/infrastructure-docker/v1beta1/cluster-template-kcp-scale-in.yaml" - sourcePath: "../data/infrastructure-docker/v1beta1/cluster-template-ipv6.yaml" - sourcePath: "../data/infrastructure-docker/v1beta1/cluster-template-topology.yaml" + - sourcePath: "../data/infrastructure-docker/v1beta1/cluster-template-topology-changes.yaml" - sourcePath: "../data/infrastructure-docker/v1beta1/cluster-template-ignition.yaml" - sourcePath: "../data/infrastructure-docker/v1beta1/clusterclass-quick-start.yaml" - sourcePath: "../data/infrastructure-docker/v1beta1/clusterclass-quick-start-runtimesdk.yaml" diff --git a/test/e2e/data/infrastructure-docker/v1beta1/cluster-template-topology-changes/kustomization.yaml b/test/e2e/data/infrastructure-docker/v1beta1/cluster-template-topology-changes/kustomization.yaml new file mode 100644 index 000000000000..0eba383159ac --- /dev/null +++ b/test/e2e/data/infrastructure-docker/v1beta1/cluster-template-topology-changes/kustomization.yaml @@ -0,0 +1,10 @@ +resources: + - ../bases/cluster-with-topology.yaml + - ../bases/crs.yaml + +patches: + - path: ./node-drain-timeout.yaml + target: + group: cluster.x-k8s.io + version: v1beta1 + kind: Cluster \ No newline at end of file diff --git a/test/e2e/data/infrastructure-docker/v1beta1/cluster-template-topology-changes/node-drain-timeout.yaml b/test/e2e/data/infrastructure-docker/v1beta1/cluster-template-topology-changes/node-drain-timeout.yaml new file mode 100644 index 000000000000..4491541da733 --- /dev/null +++ b/test/e2e/data/infrastructure-docker/v1beta1/cluster-template-topology-changes/node-drain-timeout.yaml @@ -0,0 +1,2 @@ +- op: remove + path: /spec/topology/controlPlane/nodeDrainTimeout \ No newline at end of file