Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
chrischdi committed Feb 16, 2024
1 parent 091f636 commit c1da1de
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 71 deletions.
2 changes: 2 additions & 0 deletions test/e2e/clusterctl_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
)

var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.9=>current, CAPI 1.6=>1.6) [ClusterClass]", func() {
Skip("Will fail due to not existing CAPI versions in config")
const specName = "clusterctl-upgrade-1.9-current" // prefix (clusterctl-upgrade) copied from CAPI
Setup(specName, func(testSpecificClusterctlConfigPathGetter func() string) {
capi_e2e.ClusterctlUpgradeSpec(ctx, func() capi_e2e.ClusterctlUpgradeSpecInput {
Expand Down Expand Up @@ -50,6 +51,7 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.9=
})

var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.8=>current, CAPI 1.5=>1.6) [ClusterClass]", func() {
Skip("Will fail due to not existing CAPI versions in config")
const specName = "clusterctl-upgrade-1.8-current" // prefix (clusterctl-upgrade) copied from CAPI
Setup(specName, func(testSpecificClusterctlConfigPathGetter func() string) {
capi_e2e.ClusterctlUpgradeSpec(ctx, func() capi_e2e.ClusterctlUpgradeSpecInput {
Expand Down
93 changes: 22 additions & 71 deletions test/e2e/config/vsphere.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
# For creating local images, run ./hack/e2e.sh

images:
- name: registry.k8s.io/cluster-api/cluster-api-controller:v1.6.1
- name: registry.k8s.io/cluster-api/cluster-api-controller:v1.4.5
loadBehavior: tryLoad
- name: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.6.1
- name: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.4.5
loadBehavior: tryLoad
- name: registry.k8s.io/cluster-api/kubeadm-control-plane-controller:v1.6.1
- name: registry.k8s.io/cluster-api/kubeadm-control-plane-controller:v1.4.5
loadBehavior: tryLoad
- name: gcr.io/k8s-staging-capi-vsphere/cluster-api-vsphere-controller-{ARCH}:dev
- name: gcr.io/cluster-api-provider-vsphere/release/manager:v1.7.1
loadBehavior: mustLoad
- name: quay.io/jetstack/cert-manager-cainjector:v1.12.2
loadBehavior: tryLoad
Expand All @@ -28,84 +28,55 @@ providers:
- name: cluster-api
type: CoreProvider
versions:
- name: v1.6.1
- name: v1.4.5
# Use manifest from source files
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.1/core-components.yaml"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.5/core-components.yaml"
type: "url"
contract: v1beta1
files:
- sourcePath: "../data/shared/v1.9/v1beta1/metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"
- name: v1.5.4
# Use manifest from source files
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.4/core-components.yaml"
type: "url"
contract: v1beta1
files:
- sourcePath: "../data/shared/v1.8/v1beta1/metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"

- name: kubeadm
type: BootstrapProvider
versions:
- name: v1.6.1
- name: v1.4.5
# Use manifest from source files
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.1/bootstrap-components.yaml"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.5/bootstrap-components.yaml"
type: "url"
contract: v1beta1
files:
- sourcePath: "../data/shared/v1.9/v1beta1/metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"
- name: v1.5.4
# Use manifest from source files
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.4/bootstrap-components.yaml"
type: "url"
contract: v1beta1
files:
- sourcePath: "../data/shared/v1.8/v1beta1/metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"

- name: kubeadm
type: ControlPlaneProvider
versions:
- name: v1.6.1
- name: v1.4.5
# Use manifest from source files
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.1/control-plane-components.yaml"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.5/control-plane-components.yaml"
type: "url"
contract: v1beta1
files:
- sourcePath: "../data/shared/v1.9/v1beta1/metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"
- name: v1.5.4
# Use manifest from source files
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.4/control-plane-components.yaml"
type: "url"
contract: v1beta1
files:
- sourcePath: "../data/shared/v1.8/v1beta1/metadata.yaml"
replacements:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"

- name: vsphere
type: InfrastructureProvider
versions:
- name: v1.10.99
- name: v1.7.1
# Use manifest from source files
value: ../../../../cluster-api-provider-vsphere/config/default
value: "https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/download/v1.7.1/infrastructure-components.yaml"
type: "url"
contract: v1beta1
files:
# Add a cluster template
# Add cluster templates from main
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-conformance.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-install-on-bootstrap.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-dhcp-overrides.yaml"
Expand All @@ -121,35 +92,15 @@ providers:
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template-topology.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/cluster-template.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere/main/clusterclass-quick-start.yaml"
- sourcePath: "../data/shared/main/v1beta1_provider/metadata.yaml"
- name: v1.9.0
# Use manifest from source files
value: "https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/download/v1.9.0/infrastructure-components.yaml"
type: "url"
contract: v1beta1
files:
# Add a cluster template
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere/v1.9/cluster-template-workload.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere/v1.9/clusterclass-quick-start.yaml"
- sourcePath: "../data/shared/v1.9/v1beta1_provider/metadata.yaml"
- name: v1.8.4
# Use manifest from source files
value: "https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/download/v1.8.4/infrastructure-components.yaml"
type: "url"
contract: v1beta1
files:
# Add a cluster template
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere/v1.8/cluster-template-workload.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere/v1.8/clusterclass-quick-start.yaml"
- sourcePath: "../data/shared/v1.8/v1beta1_provider/metadata.yaml"
- sourcePath: "../data/shared/v1.7/v1beta1_provider/metadata.yaml"

variables:
# Ensure all Kubernetes versions used here are covered in patch-vsphere-template.yaml
KUBERNETES_VERSION: "v1.29.0"
KUBERNETES_VERSION_UPGRADE_FROM: "v1.28.0"
KUBERNETES_VERSION_UPGRADE_TO: "v1.29.0"
KUBERNETES_VERSION_LATEST_CI: "ci/latest-1.30"
CPI_IMAGE_K8S_VERSION: "v1.29.0"
KUBERNETES_VERSION: "v1.28.0"
KUBERNETES_VERSION_UPGRADE_FROM: "v1.27.3"
KUBERNETES_VERSION_UPGRADE_TO: "v1.28.0"
KUBERNETES_VERSION_LATEST_CI: "stable-1.28"
CPI_IMAGE_K8S_VERSION: "v1.28.0"
CNI: "./data/cni/calico/calico.yaml"
EXP_CLUSTER_RESOURCE_SET: "true"
EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION: "true"
Expand All @@ -164,8 +115,8 @@ variables:
VSPHERE_DATASTORE: "WorkloadDatastore"
VSPHERE_STORAGE_POLICY: "Cluster API vSphere Storage Policy"
VSPHERE_NETWORK: "sddc-cgw-network-6"
VSPHERE_TEMPLATE: "ubuntu-2204-kube-v1.29.0"
FLATCAR_VSPHERE_TEMPLATE: "flatcar-stable-3602.2.3-kube-v1.29.0"
VSPHERE_TEMPLATE: "ubuntu-2204-kube-v1.28.0"
FLATCAR_VSPHERE_TEMPLATE: "flatcar-stable-3602.2.3-kube-v1.28.0"
VSPHERE_INSECURE_CSI: "true"
KUBETEST_CONFIGURATION: "./data/kubetest/conformance.yaml"
NODE_DRAIN_TIMEOUT: "60s"
Expand Down
11 changes: 11 additions & 0 deletions test/e2e/data/shared/v1.7/v1beta1_provider/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# maps release series of major.minor to cluster-api contract version
# the contract version may change between minor or major versions, but *not*
# between patch versions.
#
# update this file only when a new major or minor version is released
apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3
kind: Metadata
releaseSeries:
- major: 1
minor: 7
contract: v1beta1

0 comments on commit c1da1de

Please sign in to comment.