From 96f02b71067d3256a2a08b4386d13ecd589eca56 Mon Sep 17 00:00:00 2001 From: killianmuldoon Date: Thu, 17 Aug 2023 15:02:26 +0100 Subject: [PATCH] Refactor test data to align with core CAPI Signed-off-by: killianmuldoon --- .gitignore | 13 +- Makefile | 49 +- docs/release/release-tasks.md | 8 +- test/e2e/capi_clusterctl_upgrade_test.go | 41 - test/e2e/config/vsphere-ci.yaml | 70 +- test/e2e/config/vsphere-dev.yaml | 70 +- test/e2e/data/cni/kindnet/kindnet.yaml | 113 --- .../v1alpha3/cluster-template.yaml | 735 -------------- .../v1alpha4/cluster-template.yaml | 944 ------------------ .../base/kustomization.yaml | 0 .../commons/cluster-network-CIDR.yaml | 0 .../cluster-resource-set-csi-insecure.yaml | 0 .../commons/cluster-resource-set-label.yaml | 0 .../commons/cluster-resource-set.yaml | 0 .../commons/remove-storage-policy.yaml | 0 .../{kustomization => main}/commons/vcpu.yaml | 0 .../conformance/kustomization.yaml | 0 .../conformance/worker-node-size.yaml | 0 .../dhcp-overrides/dhcp-overrides.yaml | 0 .../dhcp-overrides/kustomization.yaml | 0 .../hw-upgrade/kustomization.yaml | 0 .../ignition/ignition.yaml | 0 .../ignition/kustomization.yaml | 0 .../mhc-remediation/kcp/kustomization.yaml | 0 .../mhc-remediation/kcp/mhc.yaml | 0 .../mhc-remediation/md/kustomization.yaml | 0 .../mhc-remediation/md/mhc-label.yaml | 0 .../mhc-remediation/md/mhc.yaml | 0 .../node-drain/kcp-drain.yaml | 0 .../node-drain/kustomization.yaml | 0 .../node-drain/md-drain.yaml | 0 .../pci/kustomization.yaml | 0 .../pci/pci-device-template.yaml | 0 .../remote-management/image-injection.yaml | 0 .../remote-management/kustomization.yaml | 0 .../storage-policy/kustomization.yaml | 0 .../topology/kustomization.yaml | 0 .../shared/{ => main}/v1beta1/metadata.yaml | 0 .../{ => main}/v1beta1_provider/metadata.yaml | 7 + test/integration/integration-dev.yaml | 10 +- tilt-provider.json | 1 + 41 files changed, 90 insertions(+), 1971 deletions(-) delete mode 100644 test/e2e/capi_clusterctl_upgrade_test.go delete mode 100644 test/e2e/data/cni/kindnet/kindnet.yaml delete mode 100644 test/e2e/data/infrastructure-vsphere/capi-upgrades/v1alpha3/cluster-template.yaml delete mode 100644 test/e2e/data/infrastructure-vsphere/capi-upgrades/v1alpha4/cluster-template.yaml rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/base/kustomization.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/commons/cluster-network-CIDR.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/commons/cluster-resource-set-csi-insecure.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/commons/cluster-resource-set-label.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/commons/cluster-resource-set.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/commons/remove-storage-policy.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/commons/vcpu.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/conformance/kustomization.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/conformance/worker-node-size.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/dhcp-overrides/dhcp-overrides.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/dhcp-overrides/kustomization.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/hw-upgrade/kustomization.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/ignition/ignition.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/ignition/kustomization.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/mhc-remediation/kcp/kustomization.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/mhc-remediation/kcp/mhc.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/mhc-remediation/md/kustomization.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/mhc-remediation/md/mhc-label.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/mhc-remediation/md/mhc.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/node-drain/kcp-drain.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/node-drain/kustomization.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/node-drain/md-drain.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/pci/kustomization.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/pci/pci-device-template.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/remote-management/image-injection.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/remote-management/kustomization.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/storage-policy/kustomization.yaml (100%) rename test/e2e/data/infrastructure-vsphere/{kustomization => main}/topology/kustomization.yaml (100%) rename test/e2e/data/shared/{ => main}/v1beta1/metadata.yaml (100%) rename test/e2e/data/shared/{ => main}/v1beta1_provider/metadata.yaml (84%) diff --git a/.gitignore b/.gitignore index 3efcaf0d23..84e222a1bd 100644 --- a/.gitignore +++ b/.gitignore @@ -8,15 +8,16 @@ /clusterctl /cluster-api-provider-vsphere* -# Generated files -/cluster-api-provider-vsphere +# Examples /examples/provider-components/provider-components*.yaml -test/e2e/data/infrastructure-vsphere/kustomization/base/cluster-template.yaml -test/e2e/data/infrastructure-vsphere/kustomization/topology/cluster-template-topology.yaml -test/e2e/data/infrastructure-vsphere/cluster-template*.yaml -test/e2e/data/infrastructure-vsphere/clusterclass-quick-start.yaml + +# E2E test artifacts folder _artifacts/ +# E2E test templates +test/e2e/data/infrastructure-vsphere/**/cluster-template*.yaml +test/e2e/data/infrastructure-vsphere/main/clusterclass-quick-start.yaml + # env vars file used in getting-started.md and manifests generation envvars.txt diff --git a/Makefile b/Makefile index aa2144b021..1b18a4193d 100644 --- a/Makefile +++ b/Makefile @@ -288,28 +288,30 @@ generate-doctoc: TRACE=$(TRACE) ./hack/generate-doctoc.sh .PHONY: generate-e2e-templates -generate-e2e-templates: $(KUSTOMIZE) ## Generate e2e cluster templates - $(MAKE) release-flavors - - cp $(RELEASE_DIR)/cluster-template.yaml $(E2E_TEMPLATE_DIR)/kustomization/base/cluster-template.yaml - "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/kustomization/base > $(E2E_TEMPLATE_DIR)/cluster-template.yaml - "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/kustomization/hw-upgrade > $(E2E_TEMPLATE_DIR)/cluster-template-hw-upgrade.yaml - "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/kustomization/storage-policy > $(E2E_TEMPLATE_DIR)/cluster-template-storage-policy.yaml - "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/kustomization/remote-management > $(E2E_TEMPLATE_DIR)/cluster-template-remote-management.yaml - "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/kustomization/conformance > $(E2E_TEMPLATE_DIR)/cluster-template-conformance.yaml +generate-e2e-templates: $(KUSTOMIZE) $(addprefix generate-e2e-templates-, main) ## Generate test templates for all branches + +.PHONY: generate-e2e-templates-main +generate-e2e-templates-main: $(KUSTOMIZE) ## Generate test templates for the main branch + $(MAKE) e2e-flavors-main + cp $(RELEASE_DIR)/main/cluster-template.yaml $(E2E_TEMPLATE_DIR)/main/base/cluster-template.yaml + "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/main/base > $(E2E_TEMPLATE_DIR)/main/cluster-template.yaml + "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/main/hw-upgrade > $(E2E_TEMPLATE_DIR)/main/cluster-template-hw-upgrade.yaml + "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/main/storage-policy > $(E2E_TEMPLATE_DIR)/main/cluster-template-storage-policy.yaml + "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/main/remote-management > $(E2E_TEMPLATE_DIR)/main/cluster-template-remote-management.yaml + "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/main/conformance > $(E2E_TEMPLATE_DIR)/main/cluster-template-conformance.yaml # Since CAPI uses different flavor names for KCP and MD remediation using MHC - "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/kustomization/mhc-remediation/kcp > $(E2E_TEMPLATE_DIR)/cluster-template-kcp-remediation.yaml - "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/kustomization/mhc-remediation/md > $(E2E_TEMPLATE_DIR)/cluster-template-md-remediation.yaml - "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/kustomization/node-drain > $(E2E_TEMPLATE_DIR)/cluster-template-node-drain.yaml - "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/kustomization/ignition > $(E2E_TEMPLATE_DIR)/cluster-template-ignition.yaml + "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/main/mhc-remediation/kcp > $(E2E_TEMPLATE_DIR)/main/cluster-template-kcp-remediation.yaml + "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/main/mhc-remediation/md > $(E2E_TEMPLATE_DIR)/main/cluster-template-md-remediation.yaml + "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/main/node-drain > $(E2E_TEMPLATE_DIR)/main/cluster-template-node-drain.yaml + "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/main/ignition > $(E2E_TEMPLATE_DIR)/main/cluster-template-ignition.yaml # generate clusterclass and cluster topology - cp $(RELEASE_DIR)/cluster-template-topology.yaml $(E2E_TEMPLATE_DIR)/kustomization/topology/cluster-template-topology.yaml - cp $(RELEASE_DIR)/clusterclass-template.yaml $(E2E_TEMPLATE_DIR)/clusterclass-quick-start.yaml - "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/kustomization/topology > $(E2E_TEMPLATE_DIR)/cluster-template-topology.yaml + cp $(RELEASE_DIR)/main/cluster-template-topology.yaml $(E2E_TEMPLATE_DIR)/main/topology/cluster-template-topology.yaml + cp $(RELEASE_DIR)/main/clusterclass-template.yaml $(E2E_TEMPLATE_DIR)/main/clusterclass-quick-start.yaml + "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/main/topology > $(E2E_TEMPLATE_DIR)/main/cluster-template-topology.yaml # for PCI passthrough template - "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/kustomization/pci > $(E2E_TEMPLATE_DIR)/cluster-template-pci.yaml + "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/main/pci > $(E2E_TEMPLATE_DIR)/main/cluster-template-pci.yaml # for DHCP overrides - "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/kustomization/dhcp-overrides > $(E2E_TEMPLATE_DIR)/cluster-template-dhcp-overrides.yaml + "$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build $(E2E_TEMPLATE_DIR)/main/dhcp-overrides > $(E2E_TEMPLATE_DIR)/main/cluster-template-dhcp-overrides.yaml ## -------------------------------------- @@ -598,10 +600,19 @@ release-manifests: $(BUILD_DIR) $(MANIFEST_DIR) $(KUSTOMIZE) $(STAGE)-flavors ## release-flavors: $(RELEASE_DIR) $(MAKE) generate-flavors FLAVOR_DIR=$(RELEASE_DIR) -.PHONY: dev-flavors ## Create release flavor manifests +.PHONY: dev-flavors ## Create dev flavor manifests dev-flavors: $(OVERRIDES_DIR) $(MAKE) generate-flavors FLAVOR_DIR=$(OVERRIDES_DIR) +.PHONY: e2e-flavors ## Create dev flavor manifests for e2e testing +e2e-flavors: $(KUSTOMIZE) $(addprefix e2e-flavors-, main) + +.PHONY: e2e-flavors-main ## Create dev flavor manifests for e2e testing for main branch +e2e-flavors-main: $(RELEASE_DIR) + mkdir -p $(RELEASE_DIR)/main + $(MAKE) generate-flavors FLAVOR_DIR=$(RELEASE_DIR)/main + + .PHONY: generate-flavors generate-flavors: $(FLAVOR_DIR) go run ./packaging/flavorgen --output-dir $(FLAVOR_DIR) diff --git a/docs/release/release-tasks.md b/docs/release/release-tasks.md index 6bc80cfc72..e5a5517c02 100644 --- a/docs/release/release-tasks.md +++ b/docs/release/release-tasks.md @@ -28,17 +28,17 @@ This comes down to changing occurrences of the old version to the new version, e 1. Setup E2E tests for the new release: 1. Goal is that our clusterctl upgrade tests are testing the right versions. For `v1.8` this means: + - v1beta1: `v1.8` (will change with each new release) - v1beta1: `v1.7` (will change with each new release) - - v1alpha4: `v0.8` 2. Update providers in `vsphere-ci.yaml`, `vsphere-dev.yaml`, `integration-dev.yaml`: 1. Add a new `v1.7.0` entry. 2. Remove providers that are not used anymore in clusterctl upgrade tests. 3. Change `v1.7.99` to `v1.8.99`. 3. Adjust `metadata.yaml`'s: 1. Add new release to the top-level `metadata.yaml` - 2. Create a new `v1.7` `metadata.yaml` (`test/e2e/data/shared/v1.7/metadata.yaml`) by copying - `test/e2e/data/shared/main/metadata.yaml` - 3. Add the new v1.8 release to the main `metadata.yaml` (`test/e2e/data/shared/main/metadata.yaml`). + 2. Create a new `v1.7` `metadata.yaml` (`test/e2e/data/shared/v1.7/v1beta1_provider/metadata.yaml`) by copying + `test/e2e/data/shared/main/v1beta1_provider/metadata.yaml` + 3. Add the new v1.8 release to the main `metadata.yaml` (`test/e2e/data/shared/main/v1beta1_provider/metadata.yaml`). 4. Remove old `metadata.yaml`'s that are not used anymore in clusterctl upgrade tests. 4. Adjust cluster templates in `test/e2e/data/infrastructure-vsphere`: 1. Create a new `v1.7` folder. It should be created based on the `main` folder and only contain the templates diff --git a/test/e2e/capi_clusterctl_upgrade_test.go b/test/e2e/capi_clusterctl_upgrade_test.go deleted file mode 100644 index 8bf040d727..0000000000 --- a/test/e2e/capi_clusterctl_upgrade_test.go +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package e2e - -import ( - "context" - - . "github.com/onsi/ginkgo/v2" - capi_e2e "sigs.k8s.io/cluster-api/test/e2e" -) - -var _ = PContext("ClusterAPI Upgrade Tests [clusterctl-Upgrade]", func() { - Describe("Upgrading cluster from v1alpha4 to v1beta1 using clusterctl", func() { - capi_e2e.ClusterctlUpgradeSpec(context.Background(), func() capi_e2e.ClusterctlUpgradeSpecInput { - return capi_e2e.ClusterctlUpgradeSpecInput{ - E2EConfig: e2eConfig, - ClusterctlConfigPath: clusterctlConfigPath, - BootstrapClusterProxy: bootstrapClusterProxy, - ArtifactFolder: artifactFolder, - SkipCleanup: skipCleanup, - InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.8/clusterctl-{OS}-{ARCH}", - InitWithProvidersContract: "v1alpha4", - MgmtFlavor: "remote-management", - } - }) - }) -}) diff --git a/test/e2e/config/vsphere-ci.yaml b/test/e2e/config/vsphere-ci.yaml index 007480799a..2f5de98f74 100644 --- a/test/e2e/config/vsphere-ci.yaml +++ b/test/e2e/config/vsphere-ci.yaml @@ -28,22 +28,13 @@ providers: - name: cluster-api type: CoreProvider versions: - - name: v0.4.7 # latest published release in the v1alpha4 series; this is used for v1alpha4 --> v1beta1 clusterctl upgrades test only. - contract: v1alpha4 - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.7/core-components.yaml" - type: "url" - files: - - sourcePath: "../data/shared/v1beta1/metadata.yaml" - replacements: - - old: "imagePullPolicy: Always" - new: "imagePullPolicy: IfNotPresent" - name: v1.5.0 # Use manifest from source files value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/core-components.yaml" type: "url" contract: v1beta1 files: - - sourcePath: "../data/shared/v1beta1/metadata.yaml" + - sourcePath: "../data/shared/main/v1beta1/metadata.yaml" replacements: - old: "imagePullPolicy: Always" new: "imagePullPolicy: IfNotPresent" @@ -51,22 +42,13 @@ providers: - name: kubeadm type: BootstrapProvider versions: - - name: v0.4.7 # latest published release in the v1alpha4 series; this is used for v1alpha4 --> v1beta1 clusterctl upgrades test only. - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.7/bootstrap-components.yaml" - type: "url" - contract: v1alpha4 - files: - - sourcePath: "../data/shared/v1beta1/metadata.yaml" - replacements: - - old: "imagePullPolicy: Always" - new: "imagePullPolicy: IfNotPresent" - name: v1.5.0 # Use manifest from source files value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/bootstrap-components.yaml" type: "url" contract: v1beta1 files: - - sourcePath: "../data/shared/v1beta1/metadata.yaml" + - sourcePath: "../data/shared/main/v1beta1/metadata.yaml" replacements: - old: "imagePullPolicy: Always" new: "imagePullPolicy: IfNotPresent" @@ -74,22 +56,13 @@ providers: - name: kubeadm type: ControlPlaneProvider versions: - - name: v0.4.7 - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.7/control-plane-components.yaml" - type: "url" - contract: v1alpha4 - files: - - sourcePath: "../data/shared/v1beta1/metadata.yaml" - replacements: - - old: "imagePullPolicy: Always" - new: "imagePullPolicy: IfNotPresent" - name: v1.5.0 # Use manifest from source files value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/control-plane-components.yaml" type: "url" contract: v1beta1 files: - - sourcePath: "../data/shared/v1beta1/metadata.yaml" + - sourcePath: "../data/shared/main/v1beta1/metadata.yaml" replacements: - old: "imagePullPolicy: Always" new: "imagePullPolicy: IfNotPresent" @@ -97,14 +70,7 @@ providers: - name: vsphere type: InfrastructureProvider versions: - - name: v0.8.2 - value: https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/download/v0.8.2/infrastructure-components.yaml - type: "url" - contract: v1alpha4 - files: - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/capi-upgrades/v1alpha4/cluster-template.yaml" - - sourcePath: "../../../metadata.yaml" - - name: v1.7.0 + - name: v1.9.99 # Use manifest from source files value: ../../../../cluster-api-provider-vsphere/config/default contract: v1beta1 @@ -115,20 +81,20 @@ providers: new: "imagePullPolicy: IfNotPresent" files: # Add a cluster template - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-conformance.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-hw-upgrade.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-kcp-remediation.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-md-remediation.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-node-drain.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-pci.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-remote-management.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-storage-policy.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-topology.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-dhcp-overrides.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/clusterclass-quick-start.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-ignition.yaml" - - sourcePath: "../data/shared/v1beta1_provider/metadata.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-conformance.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-hw-upgrade.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-kcp-remediation.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-md-remediation.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-node-drain.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-pci.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-remote-management.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-storage-policy.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-topology.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-dhcp-overrides.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/clusterclass-quick-start.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-ignition.yaml" + - sourcePath: "../data/shared/main/v1beta1_provider/metadata.yaml" variables: KUBERNETES_VERSION: "v1.27.3" diff --git a/test/e2e/config/vsphere-dev.yaml b/test/e2e/config/vsphere-dev.yaml index 6826d1c8f7..636e625fa5 100644 --- a/test/e2e/config/vsphere-dev.yaml +++ b/test/e2e/config/vsphere-dev.yaml @@ -31,22 +31,13 @@ providers: - name: cluster-api type: CoreProvider versions: - - name: v0.4.7 # latest published release in the v1alpha4 series; this is used for v1alpha4 --> v1beta1 clusterctl upgrades test only. - contract: v1alpha4 - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.7/core-components.yaml" - type: "url" - files: - - sourcePath: "../data/shared/v1beta1/metadata.yaml" - replacements: - - old: "imagePullPolicy: Always" - new: "imagePullPolicy: IfNotPresent" - name: v1.5.0 # Use manifest from source files value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/core-components.yaml" type: "url" contract: v1beta1 files: - - sourcePath: "../data/shared/v1beta1/metadata.yaml" + - sourcePath: "../data/shared/main/v1beta1/metadata.yaml" replacements: - old: "imagePullPolicy: Always" new: "imagePullPolicy: IfNotPresent" @@ -54,22 +45,13 @@ providers: - name: kubeadm type: BootstrapProvider versions: - - name: v0.4.7 # latest published release in the v1alpha4 series; this is used for v1alpha4 --> v1beta1 clusterctl upgrades test only. - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.7/bootstrap-components.yaml" - type: "url" - contract: v1alpha4 - files: - - sourcePath: "../data/shared/v1beta1/metadata.yaml" - replacements: - - old: "imagePullPolicy: Always" - new: "imagePullPolicy: IfNotPresent" - name: v1.5.0 # Use manifest from source files value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/bootstrap-components.yaml" type: "url" contract: v1beta1 files: - - sourcePath: "../data/shared/v1beta1/metadata.yaml" + - sourcePath: "../data/shared/main/v1beta1/metadata.yaml" replacements: - old: "imagePullPolicy: Always" new: "imagePullPolicy: IfNotPresent" @@ -77,22 +59,13 @@ providers: - name: kubeadm type: ControlPlaneProvider versions: - - name: v0.4.7 - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.7/control-plane-components.yaml" - type: "url" - contract: v1alpha4 - files: - - sourcePath: "../data/shared/v1beta1/metadata.yaml" - replacements: - - old: "imagePullPolicy: Always" - new: "imagePullPolicy: IfNotPresent" - name: v1.5.0 # Use manifest from source files value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/control-plane-components.yaml" type: "url" contract: v1beta1 files: - - sourcePath: "../data/shared/v1beta1/metadata.yaml" + - sourcePath: "../data/shared/main/v1beta1/metadata.yaml" replacements: - old: "imagePullPolicy: Always" new: "imagePullPolicy: IfNotPresent" @@ -100,14 +73,7 @@ providers: - name: vsphere type: InfrastructureProvider versions: - - name: v0.8.2 - value: https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/download/v0.8.2/infrastructure-components.yaml - type: "url" - contract: v1alpha4 - files: - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/capi-upgrades/v1alpha4/cluster-template.yaml" - - sourcePath: "../../../metadata.yaml" - - name: v1.7.0 + - name: v1.9.99 # Use manifest from source files value: ../../../../cluster-api-provider-vsphere/config/default contract: v1beta1 @@ -118,20 +84,20 @@ providers: new: "imagePullPolicy: IfNotPresent" files: # Add a cluster template - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-conformance.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-hw-upgrade.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-kcp-remediation.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-md-remediation.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-node-drain.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-pci.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-remote-management.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-storage-policy.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-topology.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-dhcp-overrides.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/clusterclass-quick-start.yaml" - - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/cluster-template-ignition.yaml" - - sourcePath: "../data/shared/v1beta1_provider/metadata.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-conformance.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-hw-upgrade.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-kcp-remediation.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-md-remediation.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-node-drain.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-pci.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-remote-management.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-storage-policy.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-topology.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-dhcp-overrides.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/clusterclass-quick-start.yaml" + - sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-ignition.yaml" + - sourcePath: "../data/shared/main/v1beta1_provider/metadata.yaml" variables: KUBERNETES_VERSION: "v1.27.3" diff --git a/test/e2e/data/cni/kindnet/kindnet.yaml b/test/e2e/data/cni/kindnet/kindnet.yaml deleted file mode 100644 index d3a4579707..0000000000 --- a/test/e2e/data/cni/kindnet/kindnet.yaml +++ /dev/null @@ -1,113 +0,0 @@ -# kindnetd networking manifest ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: kindnet -rules: - - apiGroups: - - policy - resources: - - podsecuritypolicies - verbs: - - use - resourceNames: - - kindnet - - apiGroups: - - "" - resources: - - nodes - verbs: - - list - - watch ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: kindnet -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: kindnet -subjects: - - kind: ServiceAccount - name: kindnet - namespace: kube-system ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: kindnet - namespace: kube-system ---- -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: kindnet - namespace: kube-system - labels: - tier: node - app: kindnet - k8s-app: kindnet -spec: - selector: - matchLabels: - app: kindnet - template: - metadata: - labels: - tier: node - app: kindnet - k8s-app: kindnet - spec: - hostNetwork: true - tolerations: - - operator: Exists - effect: NoSchedule - serviceAccountName: kindnet - containers: - - name: kindnet-cni - image: kindest/kindnetd:0.5.4 - env: - - name: HOST_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: POD_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - - name: POD_SUBNET - value: "192.168.0.0/16" - volumeMounts: - - name: cni-cfg - mountPath: /etc/cni/net.d - - name: xtables-lock - mountPath: /run/xtables.lock - readOnly: false - - name: lib-modules - mountPath: /lib/modules - readOnly: true - resources: - requests: - cpu: "100m" - memory: "50Mi" - limits: - cpu: "100m" - memory: "50Mi" - securityContext: - privileged: false - capabilities: - add: ["NET_RAW", "NET_ADMIN"] - volumes: - - name: cni-cfg - hostPath: - path: /etc/cni/net.d - - name: xtables-lock - hostPath: - path: /run/xtables.lock - type: FileOrCreate - - name: lib-modules - hostPath: - path: /lib/modules ---- diff --git a/test/e2e/data/infrastructure-vsphere/capi-upgrades/v1alpha3/cluster-template.yaml b/test/e2e/data/infrastructure-vsphere/capi-upgrades/v1alpha3/cluster-template.yaml deleted file mode 100644 index 69fe199bb3..0000000000 --- a/test/e2e/data/infrastructure-vsphere/capi-upgrades/v1alpha3/cluster-template.yaml +++ /dev/null @@ -1,735 +0,0 @@ ---- -apiVersion: cluster.x-k8s.io/v1alpha3 -kind: Cluster -metadata: - labels: - cluster.x-k8s.io/cluster-name: '${CLUSTER_NAME}' - name: '${CLUSTER_NAME}' - namespace: '${NAMESPACE}' -spec: - clusterNetwork: - pods: - cidrBlocks: - - 192.168.0.0/16 - controlPlaneRef: - apiVersion: controlplane.cluster.x-k8s.io/v1alpha3 - kind: KubeadmControlPlane - name: '${CLUSTER_NAME}' - infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 - kind: VSphereCluster - name: '${CLUSTER_NAME}' ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 -kind: VSphereCluster -metadata: - name: '${CLUSTER_NAME}' - namespace: '${NAMESPACE}' -spec: - cloudProviderConfiguration: - global: - secretName: cloud-provider-vsphere-credentials - secretNamespace: kube-system - thumbprint: ${VSPHERE_TLS_THUMBPRINT} - network: - name: '${VSPHERE_NETWORK}' - providerConfig: - cloud: - controllerImage: gcr.io/cloud-provider-vsphere/cpi/release/manager:v1.18.1 - virtualCenter: - ${VSPHERE_SERVER}: - datacenters: '${VSPHERE_DATACENTER}' - thumbprint: ${VSPHERE_TLS_THUMBPRINT} - workspace: - datacenter: '${VSPHERE_DATACENTER}' - datastore: '${VSPHERE_DATASTORE}' - folder: '${VSPHERE_FOLDER}' - resourcePool: '${VSPHERE_RESOURCE_POOL}' - server: '${VSPHERE_SERVER}' - controlPlaneEndpoint: - host: ${WORKLOAD_CONTROL_PLANE_ENDPOINT_IP} - port: 6443 - identityRef: - kind: Secret - name: '${CLUSTER_NAME}' - server: '${VSPHERE_SERVER}' - thumbprint: ${VSPHERE_TLS_THUMBPRINT} ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 -kind: VSphereMachineTemplate -metadata: - name: '${CLUSTER_NAME}' - namespace: '${NAMESPACE}' -spec: - template: - spec: - cloneMode: linkedClone - datacenter: '${VSPHERE_DATACENTER}' - datastore: '${VSPHERE_DATASTORE}' - diskGiB: 25 - folder: '${VSPHERE_FOLDER}' - memoryMiB: 8192 - network: - devices: - - dhcp4: true - networkName: '${VSPHERE_NETWORK}' - numCPUs: 2 - resourcePool: '${VSPHERE_RESOURCE_POOL}' - server: '${VSPHERE_SERVER}' - storagePolicyName: ${VSPHERE_STORAGE_POLICY} - template: '${VSPHERE_TEMPLATE}' - thumbprint: ${VSPHERE_TLS_THUMBPRINT} ---- -apiVersion: controlplane.cluster.x-k8s.io/v1alpha3 -kind: KubeadmControlPlane -metadata: - name: '${CLUSTER_NAME}' - namespace: '${NAMESPACE}' -spec: - infrastructureTemplate: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 - kind: VSphereMachineTemplate - name: '${CLUSTER_NAME}' - kubeadmConfigSpec: - clusterConfiguration: - apiServer: - extraArgs: - cloud-provider: external - controllerManager: - extraArgs: - cloud-provider: external - files: - - content: | - apiVersion: v1 - kind: Pod - metadata: - creationTimestamp: null - name: kube-vip - namespace: kube-system - spec: - containers: - - name: kube-vip - image: ghcr.io/kube-vip/kube-vip:v0.4.0 - imagePullPolicy: IfNotPresent - args: - - manager - env: - - name: cp_enable - value: "true" - - name: vip_interface - value: eth0 - - name: address - value: ${WORKLOAD_CONTROL_PLANE_ENDPOINT_IP} - - name: port - value: "6443" - - name: vip_arp - value: "true" - - name: vip_leaderelection - value: "true" - - name: vip_leaseduration - value: "15" - - name: vip_renewdeadline - value: "10" - - name: vip_retryperiod - value: "2" - securityContext: - capabilities: - add: - - NET_ADMIN - - SYS_TIME - - NET_RAW - volumeMounts: - - mountPath: /etc/kubernetes/admin.conf - name: kubeconfig - resources: {} - hostNetwork: true - hostAliases: - - hostnames: - - kubernetes - ip: 127.0.0.1 - volumes: - - name: kubeconfig - hostPath: - type: FileOrCreate - path: /etc/kubernetes/admin.conf - status: {} - owner: root:root - path: /etc/kubernetes/manifests/kube-vip.yaml - initConfiguration: - nodeRegistration: - criSocket: /var/run/containerd/containerd.sock - kubeletExtraArgs: - cloud-provider: external - name: '{{ ds.meta_data.hostname }}' - joinConfiguration: - nodeRegistration: - criSocket: /var/run/containerd/containerd.sock - kubeletExtraArgs: - cloud-provider: external - name: '{{ ds.meta_data.hostname }}' - preKubeadmCommands: - - hostname "{{ ds.meta_data.hostname }}" - - echo "::1 ipv6-localhost ipv6-loopback" >/etc/hosts - - echo "127.0.0.1 localhost" >>/etc/hosts - - echo "127.0.0.1 {{ ds.meta_data.hostname }}" >>/etc/hosts - - echo "{{ ds.meta_data.hostname }}" >/etc/hostname - useExperimentalRetryJoin: true - users: - - name: capv - sshAuthorizedKeys: - - '${VSPHERE_SSH_AUTHORIZED_KEY}' - sudo: ALL=(ALL) NOPASSWD:ALL - replicas: ${CONTROL_PLANE_MACHINE_COUNT} - version: '${KUBERNETES_VERSION}' ---- -apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 -kind: KubeadmConfigTemplate -metadata: - name: '${CLUSTER_NAME}-md-0' - namespace: '${NAMESPACE}' -spec: - template: - spec: - joinConfiguration: - nodeRegistration: - criSocket: /var/run/containerd/containerd.sock - kubeletExtraArgs: - cloud-provider: external - name: '{{ ds.meta_data.hostname }}' - preKubeadmCommands: - - hostname "{{ ds.meta_data.hostname }}" - - echo "::1 ipv6-localhost ipv6-loopback" >/etc/hosts - - echo "127.0.0.1 localhost" >>/etc/hosts - - echo "127.0.0.1 {{ ds.meta_data.hostname }}" >>/etc/hosts - - echo "{{ ds.meta_data.hostname }}" >/etc/hostname - users: - - name: capv - sshAuthorizedKeys: - - '${VSPHERE_SSH_AUTHORIZED_KEY}' - sudo: ALL=(ALL) NOPASSWD:ALL ---- -apiVersion: cluster.x-k8s.io/v1alpha3 -kind: MachineDeployment -metadata: - labels: - cluster.x-k8s.io/cluster-name: '${CLUSTER_NAME}' - name: '${CLUSTER_NAME}-md-0' - namespace: '${NAMESPACE}' -spec: - clusterName: '${CLUSTER_NAME}' - replicas: ${WORKER_MACHINE_COUNT} - selector: - matchLabels: {} - template: - metadata: - labels: - cluster.x-k8s.io/cluster-name: '${CLUSTER_NAME}' - spec: - bootstrap: - configRef: - apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 - kind: KubeadmConfigTemplate - name: '${CLUSTER_NAME}-md-0' - clusterName: '${CLUSTER_NAME}' - infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 - kind: VSphereMachineTemplate - name: '${CLUSTER_NAME}' - version: '${KUBERNETES_VERSION}' ---- -apiVersion: addons.cluster.x-k8s.io/v1alpha3 -kind: ClusterResourceSet -metadata: - labels: - cluster.x-k8s.io/cluster-name: '${CLUSTER_NAME}' - name: ${CLUSTER_NAME}-crs-0 - namespace: '${NAMESPACE}' -spec: - clusterSelector: - matchLabels: - cluster.x-k8s.io/cluster-name: '${CLUSTER_NAME}' - resources: - - kind: Secret - name: vsphere-csi-controller - - kind: ConfigMap - name: vsphere-csi-controller-role - - kind: ConfigMap - name: vsphere-csi-controller-binding - - kind: Secret - name: csi-vsphere-config - - kind: ConfigMap - name: csi.vsphere.vmware.com - - kind: ConfigMap - name: vsphere-csi-node - - kind: ConfigMap - name: vsphere-csi-controller ---- -apiVersion: v1 -kind: Secret -metadata: - name: '${CLUSTER_NAME}' - namespace: '${NAMESPACE}' -stringData: - password: ${VSPHERE_PASSWORD} - username: ${VSPHERE_USERNAME} ---- -apiVersion: v1 -kind: Secret -metadata: - name: vsphere-csi-controller - namespace: '${NAMESPACE}' -stringData: - data: | - apiVersion: v1 - kind: ServiceAccount - metadata: - name: vsphere-csi-controller - namespace: kube-system -type: addons.cluster.x-k8s.io/resource-set ---- -apiVersion: v1 -data: - data: | - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: vsphere-csi-controller-role - rules: - - apiGroups: - - storage.k8s.io - resources: - - csidrivers - verbs: - - create - - delete - - apiGroups: - - "" - resources: - - nodes - - pods - - secrets - - configmaps - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - persistentvolumes - verbs: - - get - - list - - watch - - update - - create - - delete - - patch - - apiGroups: - - storage.k8s.io - resources: - - volumeattachments - verbs: - - get - - list - - watch - - update - - patch - - apiGroups: - - storage.k8s.io - resources: - - volumeattachments/status - verbs: - - patch - - apiGroups: - - "" - resources: - - persistentvolumeclaims - verbs: - - get - - list - - watch - - update - - apiGroups: - - storage.k8s.io - resources: - - storageclasses - - csinodes - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - events - verbs: - - list - - watch - - create - - update - - patch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - watch - - list - - delete - - update - - create - - apiGroups: - - snapshot.storage.k8s.io - resources: - - volumesnapshots - verbs: - - get - - list - - apiGroups: - - snapshot.storage.k8s.io - resources: - - volumesnapshotcontents - verbs: - - get - - list -kind: ConfigMap -metadata: - name: vsphere-csi-controller-role - namespace: '${NAMESPACE}' ---- -apiVersion: v1 -data: - data: | - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: - name: vsphere-csi-controller-binding - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: vsphere-csi-controller-role - subjects: - - kind: ServiceAccount - name: vsphere-csi-controller - namespace: kube-system -kind: ConfigMap -metadata: - name: vsphere-csi-controller-binding - namespace: '${NAMESPACE}' ---- -apiVersion: v1 -kind: Secret -metadata: - name: csi-vsphere-config - namespace: '${NAMESPACE}' -stringData: - data: | - apiVersion: v1 - kind: Secret - metadata: - name: csi-vsphere-config - namespace: kube-system - stringData: - csi-vsphere.conf: |+ - [Global] - cluster-id = "${NAMESPACE}/${CLUSTER_NAME}" - - [VirtualCenter "${VSPHERE_SERVER}"] - user = "${VSPHERE_USERNAME}" - password = "${VSPHERE_PASSWORD}" - datacenters = "${VSPHERE_DATACENTER}" - - [Network] - public-network = "${VSPHERE_NETWORK}" - - type: Opaque -type: addons.cluster.x-k8s.io/resource-set ---- -apiVersion: v1 -data: - data: | - apiVersion: storage.k8s.io/v1 - kind: CSIDriver - metadata: - name: csi.vsphere.vmware.com - spec: - attachRequired: true -kind: ConfigMap -metadata: - name: csi.vsphere.vmware.com - namespace: '${NAMESPACE}' ---- -apiVersion: v1 -data: - data: | - apiVersion: apps/v1 - kind: DaemonSet - metadata: - name: vsphere-csi-node - namespace: kube-system - spec: - selector: - matchLabels: - app: vsphere-csi-node - template: - metadata: - labels: - app: vsphere-csi-node - role: vsphere-csi - spec: - containers: - - args: - - --v=5 - - --csi-address=$(ADDRESS) - - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) - env: - - name: ADDRESS - value: /csi/csi.sock - - name: DRIVER_REG_SOCK_PATH - value: /var/lib/kubelet/plugins/csi.vsphere.vmware.com/csi.sock - image: quay.io/k8scsi/csi-node-driver-registrar:v2.0.1 - lifecycle: - preStop: - exec: - command: - - /bin/sh - - -c - - rm -rf /registration/csi.vsphere.vmware.com-reg.sock /csi/csi.sock - name: node-driver-registrar - resources: {} - securityContext: - privileged: true - volumeMounts: - - mountPath: /csi - name: plugin-dir - - mountPath: /registration - name: registration-dir - - env: - - name: CSI_ENDPOINT - value: unix:///csi/csi.sock - - name: X_CSI_MODE - value: node - - name: X_CSI_SPEC_REQ_VALIDATION - value: "false" - - name: VSPHERE_CSI_CONFIG - value: /etc/cloud/csi-vsphere.conf - - name: LOGGER_LEVEL - value: PRODUCTION - - name: X_CSI_LOG_LEVEL - value: INFO - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - image: gcr.io/cloud-provider-vsphere/csi/release/driver:v2.1.0 - livenessProbe: - failureThreshold: 3 - httpGet: - path: /healthz - port: healthz - initialDelaySeconds: 10 - periodSeconds: 5 - timeoutSeconds: 3 - name: vsphere-csi-node - ports: - - containerPort: 9808 - name: healthz - protocol: TCP - resources: {} - securityContext: - allowPrivilegeEscalation: true - capabilities: - add: - - SYS_ADMIN - privileged: true - volumeMounts: - - mountPath: /etc/cloud - name: vsphere-config-volume - - mountPath: /csi - name: plugin-dir - - mountPath: /var/lib/kubelet - mountPropagation: Bidirectional - name: pods-mount-dir - - mountPath: /dev - name: device-dir - - args: - - --csi-address=/csi/csi.sock - image: quay.io/k8scsi/livenessprobe:v2.1.0 - name: liveness-probe - resources: {} - volumeMounts: - - mountPath: /csi - name: plugin-dir - dnsPolicy: Default - tolerations: - - effect: NoSchedule - operator: Exists - - effect: NoExecute - operator: Exists - volumes: - - name: vsphere-config-volume - secret: - secretName: csi-vsphere-config - - hostPath: - path: /var/lib/kubelet/plugins_registry - type: Directory - name: registration-dir - - hostPath: - path: /var/lib/kubelet/plugins/csi.vsphere.vmware.com/ - type: DirectoryOrCreate - name: plugin-dir - - hostPath: - path: /var/lib/kubelet - type: Directory - name: pods-mount-dir - - hostPath: - path: /dev - name: device-dir - updateStrategy: - type: RollingUpdate -kind: ConfigMap -metadata: - name: vsphere-csi-node - namespace: '${NAMESPACE}' ---- -apiVersion: v1 -data: - data: | - apiVersion: apps/v1 - kind: Deployment - metadata: - name: vsphere-csi-controller - namespace: kube-system - spec: - replicas: 1 - selector: - matchLabels: - app: vsphere-csi-controller - template: - metadata: - labels: - app: vsphere-csi-controller - role: vsphere-csi - spec: - containers: - - args: - - --v=4 - - --timeout=300s - - --csi-address=$(ADDRESS) - - --leader-election - env: - - name: ADDRESS - value: /csi/csi.sock - image: quay.io/k8scsi/csi-attacher:v3.0.0 - name: csi-attacher - resources: {} - volumeMounts: - - mountPath: /csi - name: socket-dir - - env: - - name: CSI_ENDPOINT - value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock - - name: X_CSI_MODE - value: controller - - name: VSPHERE_CSI_CONFIG - value: /etc/cloud/csi-vsphere.conf - - name: LOGGER_LEVEL - value: PRODUCTION - - name: X_CSI_LOG_LEVEL - value: INFO - image: gcr.io/cloud-provider-vsphere/csi/release/driver:v2.1.0 - livenessProbe: - failureThreshold: 3 - httpGet: - path: /healthz - port: healthz - initialDelaySeconds: 10 - periodSeconds: 5 - timeoutSeconds: 3 - name: vsphere-csi-controller - ports: - - containerPort: 9808 - name: healthz - protocol: TCP - resources: {} - volumeMounts: - - mountPath: /etc/cloud - name: vsphere-config-volume - readOnly: true - - mountPath: /var/lib/csi/sockets/pluginproxy/ - name: socket-dir - - args: - - --csi-address=$(ADDRESS) - env: - - name: ADDRESS - value: /var/lib/csi/sockets/pluginproxy/csi.sock - image: quay.io/k8scsi/livenessprobe:v2.1.0 - name: liveness-probe - resources: {} - volumeMounts: - - mountPath: /var/lib/csi/sockets/pluginproxy/ - name: socket-dir - - args: - - --leader-election - env: - - name: X_CSI_FULL_SYNC_INTERVAL_MINUTES - value: "30" - - name: LOGGER_LEVEL - value: PRODUCTION - - name: VSPHERE_CSI_CONFIG - value: /etc/cloud/csi-vsphere.conf - image: gcr.io/cloud-provider-vsphere/csi/release/syncer:v2.1.0 - name: vsphere-syncer - resources: {} - volumeMounts: - - mountPath: /etc/cloud - name: vsphere-config-volume - readOnly: true - - args: - - --v=4 - - --timeout=300s - - --csi-address=$(ADDRESS) - - --leader-election - - --default-fstype=ext4 - env: - - name: ADDRESS - value: /csi/csi.sock - image: quay.io/k8scsi/csi-provisioner:v2.0.0 - name: csi-provisioner - resources: {} - volumeMounts: - - mountPath: /csi - name: socket-dir - dnsPolicy: Default - serviceAccountName: vsphere-csi-controller - tolerations: - - effect: NoSchedule - key: node-role.kubernetes.io/master - operator: Exists - volumes: - - name: vsphere-config-volume - secret: - secretName: csi-vsphere-config - - emptyDir: {} - name: socket-dir -kind: ConfigMap -metadata: - name: vsphere-csi-controller - namespace: '${NAMESPACE}' ---- -apiVersion: v1 -data: - data: | - apiVersion: v1 - data: - csi-migration: "false" - kind: ConfigMap - metadata: - name: internal-feature-states.csi.vsphere.vmware.com - namespace: kube-system -kind: ConfigMap -metadata: - name: internal-feature-states.csi.vsphere.vmware.com - namespace: '${NAMESPACE}' diff --git a/test/e2e/data/infrastructure-vsphere/capi-upgrades/v1alpha4/cluster-template.yaml b/test/e2e/data/infrastructure-vsphere/capi-upgrades/v1alpha4/cluster-template.yaml deleted file mode 100644 index 96ca172be0..0000000000 --- a/test/e2e/data/infrastructure-vsphere/capi-upgrades/v1alpha4/cluster-template.yaml +++ /dev/null @@ -1,944 +0,0 @@ ---- -apiVersion: cluster.x-k8s.io/v1alpha4 -kind: Cluster -metadata: - labels: - cluster.x-k8s.io/cluster-name: '${CLUSTER_NAME}' - name: '${CLUSTER_NAME}' - namespace: '${NAMESPACE}' -spec: - clusterNetwork: - pods: - cidrBlocks: - - 192.168.0.0/16 - controlPlaneRef: - apiVersion: controlplane.cluster.x-k8s.io/v1alpha4 - kind: KubeadmControlPlane - name: '${CLUSTER_NAME}' - infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 - kind: VSphereCluster - name: '${CLUSTER_NAME}' ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 -kind: VSphereCluster -metadata: - name: '${CLUSTER_NAME}' - namespace: '${NAMESPACE}' -spec: - controlPlaneEndpoint: - host: ${WORKLOAD_CONTROL_PLANE_ENDPOINT_IP} - port: 6443 - identityRef: - kind: Secret - name: '${CLUSTER_NAME}' - server: '${VSPHERE_SERVER}' - thumbprint: ${VSPHERE_TLS_THUMBPRINT} ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 -kind: VSphereMachineTemplate -metadata: - name: '${CLUSTER_NAME}' - namespace: '${NAMESPACE}' -spec: - template: - spec: - cloneMode: linkedClone - datacenter: '${VSPHERE_DATACENTER}' - datastore: '${VSPHERE_DATASTORE}' - diskGiB: 25 - folder: '${VSPHERE_FOLDER}' - memoryMiB: 8192 - network: - devices: - - dhcp4: true - networkName: '${VSPHERE_NETWORK}' - numCPUs: 2 - resourcePool: '${VSPHERE_RESOURCE_POOL}' - server: '${VSPHERE_SERVER}' - storagePolicyName: ${VSPHERE_STORAGE_POLICY} - template: '${VSPHERE_TEMPLATE}' - thumbprint: ${VSPHERE_TLS_THUMBPRINT} ---- -apiVersion: controlplane.cluster.x-k8s.io/v1alpha4 -kind: KubeadmControlPlane -metadata: - name: '${CLUSTER_NAME}' - namespace: '${NAMESPACE}' -spec: - kubeadmConfigSpec: - clusterConfiguration: - apiServer: - extraArgs: - cloud-provider: external - controllerManager: - extraArgs: - cloud-provider: external - files: - - content: | - apiVersion: v1 - kind: Pod - metadata: - creationTimestamp: null - name: kube-vip - namespace: kube-system - spec: - containers: - - name: kube-vip - image: ghcr.io/kube-vip/kube-vip:v0.4.0 - imagePullPolicy: IfNotPresent - args: - - manager - env: - - name: cp_enable - value: "true" - - name: vip_interface - value: eth0 - - name: address - value: ${WORKLOAD_CONTROL_PLANE_ENDPOINT_IP} - - name: port - value: "6443" - - name: vip_arp - value: "true" - - name: vip_leaderelection - value: "true" - - name: vip_leaseduration - value: "15" - - name: vip_renewdeadline - value: "10" - - name: vip_retryperiod - value: "2" - securityContext: - capabilities: - add: - - NET_ADMIN - - SYS_TIME - - NET_RAW - volumeMounts: - - mountPath: /etc/kubernetes/admin.conf - name: kubeconfig - resources: {} - hostNetwork: true - hostAliases: - - hostnames: - - kubernetes - ip: 127.0.0.1 - volumes: - - name: kubeconfig - hostPath: - type: FileOrCreate - path: /etc/kubernetes/admin.conf - status: {} - owner: root:root - path: /etc/kubernetes/manifests/kube-vip.yaml - initConfiguration: - nodeRegistration: - criSocket: /var/run/containerd/containerd.sock - kubeletExtraArgs: - cloud-provider: external - name: '{{ ds.meta_data.hostname }}' - joinConfiguration: - nodeRegistration: - criSocket: /var/run/containerd/containerd.sock - kubeletExtraArgs: - cloud-provider: external - name: '{{ ds.meta_data.hostname }}' - preKubeadmCommands: - - hostname "{{ ds.meta_data.hostname }}" - - echo "::1 ipv6-localhost ipv6-loopback" >/etc/hosts - - echo "127.0.0.1 localhost" >>/etc/hosts - - echo "127.0.0.1 {{ ds.meta_data.hostname }}" >>/etc/hosts - - echo "{{ ds.meta_data.hostname }}" >/etc/hostname - useExperimentalRetryJoin: true - users: - - name: capv - sshAuthorizedKeys: - - '${VSPHERE_SSH_AUTHORIZED_KEY}' - sudo: ALL=(ALL) NOPASSWD:ALL - machineTemplate: - infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 - kind: VSphereMachineTemplate - name: '${CLUSTER_NAME}' - replicas: ${CONTROL_PLANE_MACHINE_COUNT} - version: '${KUBERNETES_VERSION}' ---- -apiVersion: bootstrap.cluster.x-k8s.io/v1alpha4 -kind: KubeadmConfigTemplate -metadata: - name: '${CLUSTER_NAME}-md-0' - namespace: '${NAMESPACE}' -spec: - template: - spec: - joinConfiguration: - nodeRegistration: - criSocket: /var/run/containerd/containerd.sock - kubeletExtraArgs: - cloud-provider: external - name: '{{ ds.meta_data.hostname }}' - preKubeadmCommands: - - hostname "{{ ds.meta_data.hostname }}" - - echo "::1 ipv6-localhost ipv6-loopback" >/etc/hosts - - echo "127.0.0.1 localhost" >>/etc/hosts - - echo "127.0.0.1 {{ ds.meta_data.hostname }}" >>/etc/hosts - - echo "{{ ds.meta_data.hostname }}" >/etc/hostname - users: - - name: capv - sshAuthorizedKeys: - - '${VSPHERE_SSH_AUTHORIZED_KEY}' - sudo: ALL=(ALL) NOPASSWD:ALL ---- -apiVersion: cluster.x-k8s.io/v1alpha4 -kind: MachineDeployment -metadata: - labels: - cluster.x-k8s.io/cluster-name: '${CLUSTER_NAME}' - name: '${CLUSTER_NAME}-md-0' - namespace: '${NAMESPACE}' -spec: - clusterName: '${CLUSTER_NAME}' - replicas: ${WORKER_MACHINE_COUNT} - selector: - matchLabels: {} - template: - metadata: - labels: - cluster.x-k8s.io/cluster-name: '${CLUSTER_NAME}' - spec: - bootstrap: - configRef: - apiVersion: bootstrap.cluster.x-k8s.io/v1alpha4 - kind: KubeadmConfigTemplate - name: '${CLUSTER_NAME}-md-0' - clusterName: '${CLUSTER_NAME}' - infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 - kind: VSphereMachineTemplate - name: '${CLUSTER_NAME}' - version: '${KUBERNETES_VERSION}' ---- -apiVersion: addons.cluster.x-k8s.io/v1alpha4 -kind: ClusterResourceSet -metadata: - labels: - cluster.x-k8s.io/cluster-name: '${CLUSTER_NAME}' - name: ${CLUSTER_NAME}-crs-0 - namespace: '${NAMESPACE}' -spec: - clusterSelector: - matchLabels: - cluster.x-k8s.io/cluster-name: '${CLUSTER_NAME}' - resources: - - kind: Secret - name: vsphere-csi-controller - - kind: ConfigMap - name: vsphere-csi-controller-role - - kind: ConfigMap - name: vsphere-csi-controller-binding - - kind: Secret - name: csi-vsphere-config - - kind: ConfigMap - name: csi.vsphere.vmware.com - - kind: ConfigMap - name: vsphere-csi-node - - kind: ConfigMap - name: vsphere-csi-controller - - kind: Secret - name: cloud-controller-manager - - kind: Secret - name: cloud-provider-vsphere-credentials - - kind: ConfigMap - name: cpi-manifests ---- -apiVersion: v1 -kind: Secret -metadata: - name: '${CLUSTER_NAME}' - namespace: '${NAMESPACE}' -stringData: - password: ${VSPHERE_PASSWORD} - username: ${VSPHERE_USERNAME} ---- -apiVersion: v1 -kind: Secret -metadata: - name: vsphere-csi-controller - namespace: '${NAMESPACE}' -stringData: - data: | - apiVersion: v1 - kind: ServiceAccount - metadata: - name: vsphere-csi-controller - namespace: kube-system -type: addons.cluster.x-k8s.io/resource-set ---- -apiVersion: v1 -data: - data: | - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: vsphere-csi-controller-role - rules: - - apiGroups: - - storage.k8s.io - resources: - - csidrivers - verbs: - - create - - delete - - apiGroups: - - "" - resources: - - nodes - - pods - - secrets - - configmaps - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - persistentvolumes - verbs: - - get - - list - - watch - - update - - create - - delete - - patch - - apiGroups: - - storage.k8s.io - resources: - - volumeattachments - verbs: - - get - - list - - watch - - update - - patch - - apiGroups: - - storage.k8s.io - resources: - - volumeattachments/status - verbs: - - patch - - apiGroups: - - "" - resources: - - persistentvolumeclaims - verbs: - - get - - list - - watch - - update - - apiGroups: - - storage.k8s.io - resources: - - storageclasses - - csinodes - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - events - verbs: - - list - - watch - - create - - update - - patch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - watch - - list - - delete - - update - - create - - apiGroups: - - snapshot.storage.k8s.io - resources: - - volumesnapshots - verbs: - - get - - list - - apiGroups: - - snapshot.storage.k8s.io - resources: - - volumesnapshotcontents - verbs: - - get - - list -kind: ConfigMap -metadata: - name: vsphere-csi-controller-role - namespace: '${NAMESPACE}' ---- -apiVersion: v1 -data: - data: | - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: - name: vsphere-csi-controller-binding - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: vsphere-csi-controller-role - subjects: - - kind: ServiceAccount - name: vsphere-csi-controller - namespace: kube-system -kind: ConfigMap -metadata: - name: vsphere-csi-controller-binding - namespace: '${NAMESPACE}' ---- -apiVersion: v1 -kind: Secret -metadata: - name: csi-vsphere-config - namespace: '${NAMESPACE}' -stringData: - data: | - apiVersion: v1 - kind: Secret - metadata: - name: csi-vsphere-config - namespace: kube-system - stringData: - csi-vsphere.conf: |+ - [Global] - cluster-id = "${NAMESPACE}/${CLUSTER_NAME}" - - [VirtualCenter "${VSPHERE_SERVER}"] - user = "${VSPHERE_USERNAME}" - password = "${VSPHERE_PASSWORD}" - datacenters = "${VSPHERE_DATACENTER}" - - [Network] - public-network = "${VSPHERE_NETWORK}" - - type: Opaque -type: addons.cluster.x-k8s.io/resource-set ---- -apiVersion: v1 -data: - data: | - apiVersion: storage.k8s.io/v1 - kind: CSIDriver - metadata: - name: csi.vsphere.vmware.com - spec: - attachRequired: true -kind: ConfigMap -metadata: - name: csi.vsphere.vmware.com - namespace: '${NAMESPACE}' ---- -apiVersion: v1 -data: - data: | - apiVersion: apps/v1 - kind: DaemonSet - metadata: - name: vsphere-csi-node - namespace: kube-system - spec: - selector: - matchLabels: - app: vsphere-csi-node - template: - metadata: - labels: - app: vsphere-csi-node - role: vsphere-csi - spec: - containers: - - args: - - --v=5 - - --csi-address=$(ADDRESS) - - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) - env: - - name: ADDRESS - value: /csi/csi.sock - - name: DRIVER_REG_SOCK_PATH - value: /var/lib/kubelet/plugins/csi.vsphere.vmware.com/csi.sock - image: quay.io/k8scsi/csi-node-driver-registrar:v2.0.1 - lifecycle: - preStop: - exec: - command: - - /bin/sh - - -c - - rm -rf /registration/csi.vsphere.vmware.com-reg.sock /csi/csi.sock - name: node-driver-registrar - resources: {} - securityContext: - privileged: true - volumeMounts: - - mountPath: /csi - name: plugin-dir - - mountPath: /registration - name: registration-dir - - env: - - name: CSI_ENDPOINT - value: unix:///csi/csi.sock - - name: X_CSI_MODE - value: node - - name: X_CSI_SPEC_REQ_VALIDATION - value: "false" - - name: VSPHERE_CSI_CONFIG - value: /etc/cloud/csi-vsphere.conf - - name: LOGGER_LEVEL - value: PRODUCTION - - name: X_CSI_LOG_LEVEL - value: INFO - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - image: gcr.io/cloud-provider-vsphere/csi/release/driver:v2.1.0 - livenessProbe: - failureThreshold: 3 - httpGet: - path: /healthz - port: healthz - initialDelaySeconds: 10 - periodSeconds: 5 - timeoutSeconds: 3 - name: vsphere-csi-node - ports: - - containerPort: 9808 - name: healthz - protocol: TCP - resources: {} - securityContext: - allowPrivilegeEscalation: true - capabilities: - add: - - SYS_ADMIN - privileged: true - volumeMounts: - - mountPath: /etc/cloud - name: vsphere-config-volume - - mountPath: /csi - name: plugin-dir - - mountPath: /var/lib/kubelet - mountPropagation: Bidirectional - name: pods-mount-dir - - mountPath: /dev - name: device-dir - - args: - - --csi-address=/csi/csi.sock - image: quay.io/k8scsi/livenessprobe:v2.1.0 - name: liveness-probe - resources: {} - volumeMounts: - - mountPath: /csi - name: plugin-dir - dnsPolicy: Default - tolerations: - - effect: NoSchedule - operator: Exists - - effect: NoExecute - operator: Exists - volumes: - - name: vsphere-config-volume - secret: - secretName: csi-vsphere-config - - hostPath: - path: /var/lib/kubelet/plugins_registry - type: Directory - name: registration-dir - - hostPath: - path: /var/lib/kubelet/plugins/csi.vsphere.vmware.com/ - type: DirectoryOrCreate - name: plugin-dir - - hostPath: - path: /var/lib/kubelet - type: Directory - name: pods-mount-dir - - hostPath: - path: /dev - name: device-dir - updateStrategy: - type: RollingUpdate -kind: ConfigMap -metadata: - name: vsphere-csi-node - namespace: '${NAMESPACE}' ---- -apiVersion: v1 -data: - data: | - apiVersion: apps/v1 - kind: Deployment - metadata: - name: vsphere-csi-controller - namespace: kube-system - spec: - replicas: 1 - selector: - matchLabels: - app: vsphere-csi-controller - template: - metadata: - labels: - app: vsphere-csi-controller - role: vsphere-csi - spec: - containers: - - args: - - --v=4 - - --timeout=300s - - --csi-address=$(ADDRESS) - - --leader-election - env: - - name: ADDRESS - value: /csi/csi.sock - image: quay.io/k8scsi/csi-attacher:v3.0.0 - name: csi-attacher - resources: {} - volumeMounts: - - mountPath: /csi - name: socket-dir - - env: - - name: CSI_ENDPOINT - value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock - - name: X_CSI_MODE - value: controller - - name: VSPHERE_CSI_CONFIG - value: /etc/cloud/csi-vsphere.conf - - name: LOGGER_LEVEL - value: PRODUCTION - - name: X_CSI_LOG_LEVEL - value: INFO - image: gcr.io/cloud-provider-vsphere/csi/release/driver:v2.1.0 - livenessProbe: - failureThreshold: 3 - httpGet: - path: /healthz - port: healthz - initialDelaySeconds: 10 - periodSeconds: 5 - timeoutSeconds: 3 - name: vsphere-csi-controller - ports: - - containerPort: 9808 - name: healthz - protocol: TCP - resources: {} - volumeMounts: - - mountPath: /etc/cloud - name: vsphere-config-volume - readOnly: true - - mountPath: /var/lib/csi/sockets/pluginproxy/ - name: socket-dir - - args: - - --csi-address=$(ADDRESS) - env: - - name: ADDRESS - value: /var/lib/csi/sockets/pluginproxy/csi.sock - image: quay.io/k8scsi/livenessprobe:v2.1.0 - name: liveness-probe - resources: {} - volumeMounts: - - mountPath: /var/lib/csi/sockets/pluginproxy/ - name: socket-dir - - args: - - --leader-election - env: - - name: X_CSI_FULL_SYNC_INTERVAL_MINUTES - value: "30" - - name: LOGGER_LEVEL - value: PRODUCTION - - name: VSPHERE_CSI_CONFIG - value: /etc/cloud/csi-vsphere.conf - image: gcr.io/cloud-provider-vsphere/csi/release/syncer:v2.1.0 - name: vsphere-syncer - resources: {} - volumeMounts: - - mountPath: /etc/cloud - name: vsphere-config-volume - readOnly: true - - args: - - --v=4 - - --timeout=300s - - --csi-address=$(ADDRESS) - - --leader-election - - --default-fstype=ext4 - env: - - name: ADDRESS - value: /csi/csi.sock - image: quay.io/k8scsi/csi-provisioner:v2.0.0 - name: csi-provisioner - resources: {} - volumeMounts: - - mountPath: /csi - name: socket-dir - dnsPolicy: Default - serviceAccountName: vsphere-csi-controller - tolerations: - - effect: NoSchedule - key: node-role.kubernetes.io/master - operator: Exists - volumes: - - name: vsphere-config-volume - secret: - secretName: csi-vsphere-config - - emptyDir: {} - name: socket-dir -kind: ConfigMap -metadata: - name: vsphere-csi-controller - namespace: '${NAMESPACE}' ---- -apiVersion: v1 -kind: Secret -metadata: - name: cloud-controller-manager - namespace: '${NAMESPACE}' -stringData: - data: | - apiVersion: v1 - kind: ServiceAccount - metadata: - name: cloud-controller-manager - namespace: kube-system -type: addons.cluster.x-k8s.io/resource-set ---- -apiVersion: v1 -kind: Secret -metadata: - name: cloud-provider-vsphere-credentials - namespace: '${NAMESPACE}' -stringData: - data: | - apiVersion: v1 - kind: Secret - metadata: - name: cloud-provider-vsphere-credentials - namespace: kube-system - stringData: - ${VSPHERE_SERVER}.password: ${VSPHERE_PASSWORD} - ${VSPHERE_SERVER}.username: ${VSPHERE_USERNAME} - type: Opaque -type: addons.cluster.x-k8s.io/resource-set ---- -apiVersion: v1 -data: - data: | - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: system:cloud-controller-manager - rules: - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - update - - apiGroups: - - "" - resources: - - nodes - verbs: - - '*' - - apiGroups: - - "" - resources: - - nodes/status - verbs: - - patch - - apiGroups: - - "" - resources: - - services - verbs: - - list - - patch - - update - - watch - - apiGroups: - - "" - resources: - - serviceaccounts - verbs: - - create - - get - - list - - watch - - update - - apiGroups: - - "" - resources: - - persistentvolumes - verbs: - - get - - list - - watch - - update - - apiGroups: - - "" - resources: - - endpoints - verbs: - - create - - get - - list - - watch - - update - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - - list - - watch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - watch - - list - - delete - - update - - create - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: - name: system:cloud-controller-manager - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: system:cloud-controller-manager - subjects: - - kind: ServiceAccount - name: cloud-controller-manager - namespace: kube-system - - kind: User - name: cloud-controller-manager - --- - apiVersion: v1 - data: - vsphere.conf: | - global: - secretName: cloud-provider-vsphere-credentials - secretNamespace: kube-system - thumbprint: ${VSPHERE_TLS_THUMBPRINT} - vcenter: - ${VSPHERE_SERVER}: - datacenters: - - '${VSPHERE_DATACENTER}' - secretName: cloud-provider-vsphere-credentials - secretNamespace: kube-system - server: '${VSPHERE_SERVER}' - thumbprint: ${VSPHERE_TLS_THUMBPRINT} - kind: ConfigMap - metadata: - name: vsphere-cloud-config - namespace: kube-system - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: RoleBinding - metadata: - name: servicecatalog.k8s.io:apiserver-authentication-reader - namespace: kube-system - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: extension-apiserver-authentication-reader - subjects: - - kind: ServiceAccount - name: cloud-controller-manager - namespace: kube-system - - kind: User - name: cloud-controller-manager - --- - apiVersion: v1 - kind: Service - metadata: - labels: - component: cloud-controller-manager - name: cloud-controller-manager - namespace: kube-system - spec: - ports: - - port: 443 - protocol: TCP - targetPort: 43001 - selector: - component: cloud-controller-manager - type: NodePort - --- - apiVersion: apps/v1 - kind: DaemonSet - metadata: - labels: - k8s-app: vsphere-cloud-controller-manager - name: vsphere-cloud-controller-manager - namespace: kube-system - spec: - selector: - matchLabels: - k8s-app: vsphere-cloud-controller-manager - template: - metadata: - labels: - k8s-app: vsphere-cloud-controller-manager - spec: - containers: - - args: - - --v=2 - - --cloud-provider=vsphere - - --cloud-config=/etc/cloud/vsphere.conf - image: gcr.io/cloud-provider-vsphere/cpi/release/manager:v1.18.1 - name: vsphere-cloud-controller-manager - resources: - requests: - cpu: 200m - volumeMounts: - - mountPath: /etc/cloud - name: vsphere-config-volume - readOnly: true - hostNetwork: true - serviceAccountName: cloud-controller-manager - tolerations: - - effect: NoSchedule - key: node.cloudprovider.kubernetes.io/uninitialized - value: "true" - - effect: NoSchedule - key: node-role.kubernetes.io/master - - effect: NoSchedule - key: node.kubernetes.io/not-ready - volumes: - - configMap: - name: vsphere-cloud-config - name: vsphere-config-volume - updateStrategy: - type: RollingUpdate -kind: ConfigMap -metadata: - name: cpi-manifests - namespace: '${NAMESPACE}' diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/base/kustomization.yaml b/test/e2e/data/infrastructure-vsphere/main/base/kustomization.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/base/kustomization.yaml rename to test/e2e/data/infrastructure-vsphere/main/base/kustomization.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/commons/cluster-network-CIDR.yaml b/test/e2e/data/infrastructure-vsphere/main/commons/cluster-network-CIDR.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/commons/cluster-network-CIDR.yaml rename to test/e2e/data/infrastructure-vsphere/main/commons/cluster-network-CIDR.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/commons/cluster-resource-set-csi-insecure.yaml b/test/e2e/data/infrastructure-vsphere/main/commons/cluster-resource-set-csi-insecure.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/commons/cluster-resource-set-csi-insecure.yaml rename to test/e2e/data/infrastructure-vsphere/main/commons/cluster-resource-set-csi-insecure.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/commons/cluster-resource-set-label.yaml b/test/e2e/data/infrastructure-vsphere/main/commons/cluster-resource-set-label.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/commons/cluster-resource-set-label.yaml rename to test/e2e/data/infrastructure-vsphere/main/commons/cluster-resource-set-label.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/commons/cluster-resource-set.yaml b/test/e2e/data/infrastructure-vsphere/main/commons/cluster-resource-set.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/commons/cluster-resource-set.yaml rename to test/e2e/data/infrastructure-vsphere/main/commons/cluster-resource-set.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/commons/remove-storage-policy.yaml b/test/e2e/data/infrastructure-vsphere/main/commons/remove-storage-policy.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/commons/remove-storage-policy.yaml rename to test/e2e/data/infrastructure-vsphere/main/commons/remove-storage-policy.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/commons/vcpu.yaml b/test/e2e/data/infrastructure-vsphere/main/commons/vcpu.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/commons/vcpu.yaml rename to test/e2e/data/infrastructure-vsphere/main/commons/vcpu.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/conformance/kustomization.yaml b/test/e2e/data/infrastructure-vsphere/main/conformance/kustomization.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/conformance/kustomization.yaml rename to test/e2e/data/infrastructure-vsphere/main/conformance/kustomization.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/conformance/worker-node-size.yaml b/test/e2e/data/infrastructure-vsphere/main/conformance/worker-node-size.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/conformance/worker-node-size.yaml rename to test/e2e/data/infrastructure-vsphere/main/conformance/worker-node-size.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/dhcp-overrides/dhcp-overrides.yaml b/test/e2e/data/infrastructure-vsphere/main/dhcp-overrides/dhcp-overrides.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/dhcp-overrides/dhcp-overrides.yaml rename to test/e2e/data/infrastructure-vsphere/main/dhcp-overrides/dhcp-overrides.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/dhcp-overrides/kustomization.yaml b/test/e2e/data/infrastructure-vsphere/main/dhcp-overrides/kustomization.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/dhcp-overrides/kustomization.yaml rename to test/e2e/data/infrastructure-vsphere/main/dhcp-overrides/kustomization.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/hw-upgrade/kustomization.yaml b/test/e2e/data/infrastructure-vsphere/main/hw-upgrade/kustomization.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/hw-upgrade/kustomization.yaml rename to test/e2e/data/infrastructure-vsphere/main/hw-upgrade/kustomization.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/ignition/ignition.yaml b/test/e2e/data/infrastructure-vsphere/main/ignition/ignition.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/ignition/ignition.yaml rename to test/e2e/data/infrastructure-vsphere/main/ignition/ignition.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/ignition/kustomization.yaml b/test/e2e/data/infrastructure-vsphere/main/ignition/kustomization.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/ignition/kustomization.yaml rename to test/e2e/data/infrastructure-vsphere/main/ignition/kustomization.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/mhc-remediation/kcp/kustomization.yaml b/test/e2e/data/infrastructure-vsphere/main/mhc-remediation/kcp/kustomization.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/mhc-remediation/kcp/kustomization.yaml rename to test/e2e/data/infrastructure-vsphere/main/mhc-remediation/kcp/kustomization.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/mhc-remediation/kcp/mhc.yaml b/test/e2e/data/infrastructure-vsphere/main/mhc-remediation/kcp/mhc.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/mhc-remediation/kcp/mhc.yaml rename to test/e2e/data/infrastructure-vsphere/main/mhc-remediation/kcp/mhc.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/mhc-remediation/md/kustomization.yaml b/test/e2e/data/infrastructure-vsphere/main/mhc-remediation/md/kustomization.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/mhc-remediation/md/kustomization.yaml rename to test/e2e/data/infrastructure-vsphere/main/mhc-remediation/md/kustomization.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/mhc-remediation/md/mhc-label.yaml b/test/e2e/data/infrastructure-vsphere/main/mhc-remediation/md/mhc-label.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/mhc-remediation/md/mhc-label.yaml rename to test/e2e/data/infrastructure-vsphere/main/mhc-remediation/md/mhc-label.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/mhc-remediation/md/mhc.yaml b/test/e2e/data/infrastructure-vsphere/main/mhc-remediation/md/mhc.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/mhc-remediation/md/mhc.yaml rename to test/e2e/data/infrastructure-vsphere/main/mhc-remediation/md/mhc.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/node-drain/kcp-drain.yaml b/test/e2e/data/infrastructure-vsphere/main/node-drain/kcp-drain.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/node-drain/kcp-drain.yaml rename to test/e2e/data/infrastructure-vsphere/main/node-drain/kcp-drain.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/node-drain/kustomization.yaml b/test/e2e/data/infrastructure-vsphere/main/node-drain/kustomization.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/node-drain/kustomization.yaml rename to test/e2e/data/infrastructure-vsphere/main/node-drain/kustomization.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/node-drain/md-drain.yaml b/test/e2e/data/infrastructure-vsphere/main/node-drain/md-drain.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/node-drain/md-drain.yaml rename to test/e2e/data/infrastructure-vsphere/main/node-drain/md-drain.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/pci/kustomization.yaml b/test/e2e/data/infrastructure-vsphere/main/pci/kustomization.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/pci/kustomization.yaml rename to test/e2e/data/infrastructure-vsphere/main/pci/kustomization.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/pci/pci-device-template.yaml b/test/e2e/data/infrastructure-vsphere/main/pci/pci-device-template.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/pci/pci-device-template.yaml rename to test/e2e/data/infrastructure-vsphere/main/pci/pci-device-template.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/remote-management/image-injection.yaml b/test/e2e/data/infrastructure-vsphere/main/remote-management/image-injection.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/remote-management/image-injection.yaml rename to test/e2e/data/infrastructure-vsphere/main/remote-management/image-injection.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/remote-management/kustomization.yaml b/test/e2e/data/infrastructure-vsphere/main/remote-management/kustomization.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/remote-management/kustomization.yaml rename to test/e2e/data/infrastructure-vsphere/main/remote-management/kustomization.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/storage-policy/kustomization.yaml b/test/e2e/data/infrastructure-vsphere/main/storage-policy/kustomization.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/storage-policy/kustomization.yaml rename to test/e2e/data/infrastructure-vsphere/main/storage-policy/kustomization.yaml diff --git a/test/e2e/data/infrastructure-vsphere/kustomization/topology/kustomization.yaml b/test/e2e/data/infrastructure-vsphere/main/topology/kustomization.yaml similarity index 100% rename from test/e2e/data/infrastructure-vsphere/kustomization/topology/kustomization.yaml rename to test/e2e/data/infrastructure-vsphere/main/topology/kustomization.yaml diff --git a/test/e2e/data/shared/v1beta1/metadata.yaml b/test/e2e/data/shared/main/v1beta1/metadata.yaml similarity index 100% rename from test/e2e/data/shared/v1beta1/metadata.yaml rename to test/e2e/data/shared/main/v1beta1/metadata.yaml diff --git a/test/e2e/data/shared/v1beta1_provider/metadata.yaml b/test/e2e/data/shared/main/v1beta1_provider/metadata.yaml similarity index 84% rename from test/e2e/data/shared/v1beta1_provider/metadata.yaml rename to test/e2e/data/shared/main/v1beta1_provider/metadata.yaml index 6edf676aba..5b352b0917 100644 --- a/test/e2e/data/shared/v1beta1_provider/metadata.yaml +++ b/test/e2e/data/shared/main/v1beta1_provider/metadata.yaml @@ -18,3 +18,10 @@ releaseSeries: - major: 1 minor: 7 contract: v1beta1 + - major: 1 + minor: 8 + contract: v1beta1 + - major: 1 + minor: 9 + contract: v1beta1 + diff --git a/test/integration/integration-dev.yaml b/test/integration/integration-dev.yaml index acec8499a3..fc037d2828 100644 --- a/test/integration/integration-dev.yaml +++ b/test/integration/integration-dev.yaml @@ -36,7 +36,7 @@ providers: type: "url" contract: v1beta1 files: - - sourcePath: "../e2e/data/shared/v1beta1/metadata.yaml" + - sourcePath: "../e2e/data/shared/main/v1beta1/metadata.yaml" replacements: - old: "imagePullPolicy: Always" new: "imagePullPolicy: IfNotPresent" @@ -50,7 +50,7 @@ providers: type: "url" contract: v1beta1 files: - - sourcePath: "../e2e/data/shared/v1beta1/metadata.yaml" + - sourcePath: "../e2e/data/shared/main/v1beta1/metadata.yaml" replacements: - old: "imagePullPolicy: Always" new: "imagePullPolicy: IfNotPresent" @@ -64,7 +64,7 @@ providers: type: "url" contract: v1beta1 files: - - sourcePath: "../e2e/data/shared/v1beta1/metadata.yaml" + - sourcePath: "../e2e/data/shared/main/v1beta1/metadata.yaml" replacements: - old: "imagePullPolicy: Always" new: "imagePullPolicy: IfNotPresent" @@ -72,12 +72,12 @@ providers: - name: vsphere type: InfrastructureProvider versions: - - name: v1.7.0 + - name: v1.9.99 # Use manifest from source files value: ../../../cluster-api-provider-vsphere/config/deployments/integration-tests contract: v1beta1 files: - - sourcePath: "../e2e/data/shared/v1beta1_provider/metadata.yaml" + - sourcePath: "../e2e/data/shared/main/v1beta1_provider/metadata.yaml" replacements: - old: gcr.io/cluster-api-provider-vsphere/release/manager:latest new: gcr.io/k8s-staging-cluster-api/capv-manager:e2e diff --git a/tilt-provider.json b/tilt-provider.json index 7fb39fdd9c..dfea63a1a0 100644 --- a/tilt-provider.json +++ b/tilt-provider.json @@ -1,6 +1,7 @@ { "name": "vsphere", "config": { + "version": "v1.9.99", "image": "gcr.io/cluster-api-provider-vsphere/release/manager", "live_reload_deps": [ "main.go",