From 1179db88cd8a90108474d1b3a275aab21f05ed1f Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Wed, 19 Jun 2024 17:12:43 +0200 Subject: [PATCH] fix flavor --- Makefile | 2 ++ test/e2e/cluster_upgrade_runtimesdk_test.go | 1 + test/e2e/config/vsphere.yaml | 2 ++ .../main/upgrades-runtimesdk/kustomization.yaml | 8 ++++++++ .../main/upgrades-runtimesdk/patch-clusterclass.yaml | 6 ++++++ .../main/upgrades-runtimesdk/kustomization.yaml | 8 ++++++++ .../main/upgrades-runtimesdk/patch-clusterclass.yaml | 6 ++++++ 7 files changed, 33 insertions(+) create mode 100644 test/e2e/data/infrastructure-vsphere-govmomi/main/upgrades-runtimesdk/kustomization.yaml create mode 100644 test/e2e/data/infrastructure-vsphere-govmomi/main/upgrades-runtimesdk/patch-clusterclass.yaml create mode 100644 test/e2e/data/infrastructure-vsphere-supervisor/main/upgrades-runtimesdk/kustomization.yaml create mode 100644 test/e2e/data/infrastructure-vsphere-supervisor/main/upgrades-runtimesdk/patch-clusterclass.yaml diff --git a/Makefile b/Makefile index 512e48818c..1b615d933b 100644 --- a/Makefile +++ b/Makefile @@ -391,6 +391,7 @@ generate-e2e-templates-main: $(KUSTOMIZE) ## Generate test templates for the mai "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/clusterclass-runtimesdk" > "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/clusterclass-runtimesdk-quick-start.yaml" cp "$(RELEASE_DIR)/main/cluster-template-topology.yaml" "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/topology/cluster-template-topology.yaml" "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/topology" > "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/cluster-template-topology.yaml" + "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/upgrades-runtimesdk" > "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/cluster-template-upgrades-runtimesdk.yaml" "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/install-on-bootstrap" > "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/cluster-template-install-on-bootstrap.yaml" # for PCI passthrough template "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/pci" > "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/cluster-template-pci.yaml" @@ -407,6 +408,7 @@ generate-e2e-templates-main: $(KUSTOMIZE) ## Generate test templates for the mai "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/clusterclass-runtimesdk" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/clusterclass-runtimesdk-quick-start-supervisor.yaml" cp "$(RELEASE_DIR)/main/cluster-template-topology-supervisor.yaml" "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/topology/cluster-template-topology-supervisor.yaml" "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/topology" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/cluster-template-topology-supervisor.yaml" + "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/upgrades-runtimesdk" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/cluster-template-upgrades-runtimesdk-supervisor.yaml" "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/conformance" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/cluster-template-conformance-supervisor.yaml" "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/install-on-bootstrap" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/cluster-template-install-on-bootstrap-supervisor.yaml" diff --git a/test/e2e/cluster_upgrade_runtimesdk_test.go b/test/e2e/cluster_upgrade_runtimesdk_test.go index dd64d83228..8cbdb4e181 100644 --- a/test/e2e/cluster_upgrade_runtimesdk_test.go +++ b/test/e2e/cluster_upgrade_runtimesdk_test.go @@ -51,6 +51,7 @@ var _ = Describe("When upgrading a workload cluster using ClusterClass with Runt Flavor: ptr.To(testSpecificSettingsGetter().FlavorForMode("topology")), ExtensionNamespace: "vmware-system-test-extension", ExtensionServiceName: "vmware-system-test-extension-webhook-service", + PostNamespaceCreated: testSpecificSettingsGetter().PostNamespaceCreatedFunc, } }) }) diff --git a/test/e2e/config/vsphere.yaml b/test/e2e/config/vsphere.yaml index b1b2f48e55..2f758249d7 100644 --- a/test/e2e/config/vsphere.yaml +++ b/test/e2e/config/vsphere.yaml @@ -161,6 +161,7 @@ providers: - sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/main/cluster-template-pci.yaml" - sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/main/cluster-template-storage-policy.yaml" - sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/main/cluster-template-topology.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/main/cluster-template-upgrades-runtimesdk.yaml" - sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/main/cluster-template.yaml" - sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/main/clusterclass-quick-start.yaml" - sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/main/clusterclass-runtimesdk-quick-start.yaml" @@ -170,6 +171,7 @@ providers: - sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/main/clusterclass-runtimesdk-quick-start-supervisor.yaml" - sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/main/cluster-template-install-on-bootstrap-supervisor.yaml" - sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/main/cluster-template-conformance-supervisor.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/main/cluster-template-upgrades-runtimesdk-supervisor.yaml" - sourcePath: "../data/shared/capv/main/metadata.yaml" - name: "{go://sigs.k8s.io/cluster-api-provider-vsphere@v1.10}" # supported release in the v1beta1 series # Use manifest from source files diff --git a/test/e2e/data/infrastructure-vsphere-govmomi/main/upgrades-runtimesdk/kustomization.yaml b/test/e2e/data/infrastructure-vsphere-govmomi/main/upgrades-runtimesdk/kustomization.yaml new file mode 100644 index 0000000000..6db0b7e497 --- /dev/null +++ b/test/e2e/data/infrastructure-vsphere-govmomi/main/upgrades-runtimesdk/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ../topology +patches: + - target: + kind: Cluster + path: ./patch-clusterclass.yaml diff --git a/test/e2e/data/infrastructure-vsphere-govmomi/main/upgrades-runtimesdk/patch-clusterclass.yaml b/test/e2e/data/infrastructure-vsphere-govmomi/main/upgrades-runtimesdk/patch-clusterclass.yaml new file mode 100644 index 0000000000..48f091b2de --- /dev/null +++ b/test/e2e/data/infrastructure-vsphere-govmomi/main/upgrades-runtimesdk/patch-clusterclass.yaml @@ -0,0 +1,6 @@ +- op: replace + path: /spec/topology/class + value: ${CLUSTER_CLASS_NAME}-runtimesdk +- op: replace + path: /spec/topology/workers/machineDeployments/0/class + value: ${CLUSTER_CLASS_NAME}-runtimesdk-worker diff --git a/test/e2e/data/infrastructure-vsphere-supervisor/main/upgrades-runtimesdk/kustomization.yaml b/test/e2e/data/infrastructure-vsphere-supervisor/main/upgrades-runtimesdk/kustomization.yaml new file mode 100644 index 0000000000..6db0b7e497 --- /dev/null +++ b/test/e2e/data/infrastructure-vsphere-supervisor/main/upgrades-runtimesdk/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ../topology +patches: + - target: + kind: Cluster + path: ./patch-clusterclass.yaml diff --git a/test/e2e/data/infrastructure-vsphere-supervisor/main/upgrades-runtimesdk/patch-clusterclass.yaml b/test/e2e/data/infrastructure-vsphere-supervisor/main/upgrades-runtimesdk/patch-clusterclass.yaml new file mode 100644 index 0000000000..48f091b2de --- /dev/null +++ b/test/e2e/data/infrastructure-vsphere-supervisor/main/upgrades-runtimesdk/patch-clusterclass.yaml @@ -0,0 +1,6 @@ +- op: replace + path: /spec/topology/class + value: ${CLUSTER_CLASS_NAME}-runtimesdk +- op: replace + path: /spec/topology/workers/machineDeployments/0/class + value: ${CLUSTER_CLASS_NAME}-runtimesdk-worker