Skip to content

Commit

Permalink
feat: update e2e test config and docs changes
Browse files Browse the repository at this point in the history
This updates the kubernetes versions used in the e2e tests to use k8s
versions that we AMIs for. It also marks some of the old CSI tests as
pending and some upgrade tests as pending (which will be re-enabled
at a later time).

A few minor docs updates have been made as a result of review.

Signed-off-by: Richard Case <[email protected]>
  • Loading branch information
richardcase committed Oct 21, 2024
1 parent e1bc243 commit 30d00c5
Show file tree
Hide file tree
Showing 6 changed files with 138 additions and 91 deletions.
4 changes: 2 additions & 2 deletions docs/book/src/topics/images/built-amis.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ New AMIs are built on a best effort basis when a new Kubernetes version is relea
- When there is a new k8s release series then any AMIs no longer covered by the previous point will be deleted. For example, when v1.31.0 is published then any AMIs for the v1.28 release series will be deleted.
- Existing AMIs are not updated for security fixes and it is recommended to always use the latest patch version for the Kubernetes version you want to run.

> NOTE: As the old community images where located in an AWS account that the project no longer has access to and because those AMIs have been automatically deleted we have started publishing images again from v1.29.9
> NOTE: As the old community images were located in an AWS account that the project no longer has access to and because those AMIs have been automatically deleted, we have started publishing images again starting from Kubernetes v1.29.9.
## Finding AMIs

Expand All @@ -21,7 +21,7 @@ If you are using a version of clusterawsadm prior to v2.6.2 then you will need t
- Ubuntu (ubuntu-22.04, ubuntu-24.04)
- Flatcar (flatcar-stable)

> Note: Centos (centos-7) and Amazon Linux 2 (amazon-2) where supported but there are some issues with the AMI build that need fixing.
> Note: Centos (centos-7) and Amazon Linux 2 (amazon-2) where supported but there are some issues with the AMI build that need fixing. See this [issue](https://github.com/kubernetes-sigs/cluster-api-provider-aws/issues/5142) for details.
## Supported AWS Regions
- ap-northeast-1
Expand Down
14 changes: 7 additions & 7 deletions test/e2e/data/e2e_conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ variables:
# allowing the same e2e config file to be re-used in different Prow jobs e.g. each one with a K8s version permutation.
# The following Kubernetes versions should be the latest versions with already published kindest/node images.
# This avoids building node images in the default case which improves the test duration significantly.
KUBERNETES_VERSION_MANAGEMENT: "v1.30.2"
KUBERNETES_VERSION: "v1.26.6"
KUBERNETES_VERSION_UPGRADE_TO: "v1.26.6"
KUBERNETES_VERSION_UPGRADE_FROM: "v1.25.12"
KUBERNETES_VERSION_MANAGEMENT: "v1.29.8"
KUBERNETES_VERSION: "v1.29.9"
KUBERNETES_VERSION_UPGRADE_TO: "v1.29.9"
KUBERNETES_VERSION_UPGRADE_FROM: "v1.29.8"
# Pre and post 1.23 Kubernetes versions are being used for CSI upgrade tests
PRE_1_23_KUBERNETES_VERSION: "v1.22.17"
POST_1_23_KUBERNETES_VERSION: "v1.23.15"
Expand All @@ -190,11 +190,11 @@ variables:
AWS_NODE_MACHINE_TYPE: t3.large
AWS_MACHINE_TYPE_VCPU_USAGE: 2
AWS_SSH_KEY_NAME: "cluster-api-provider-aws-sigs-k8s-io"
CONFORMANCE_CI_ARTIFACTS_KUBERNETES_VERSION: "v1.29.1"
CONFORMANCE_CI_ARTIFACTS_KUBERNETES_VERSION: "v1.29.9"
CONFORMANCE_WORKER_MACHINE_COUNT: "5"
CONFORMANCE_CONTROL_PLANE_MACHINE_COUNT: "3"
ETCD_VERSION_UPGRADE_TO: "3.5.11-0"
COREDNS_VERSION_UPGRADE_TO: "v1.9.4"
COREDNS_VERSION_UPGRADE_TO: "v1.11.1"
MULTI_TENANCY_ROLE_NAME: "multi-tenancy-role"
MULTI_TENANCY_NESTED_ROLE_NAME: "multi-tenancy-nested-role"
IP_FAMILY: "IPv4"
Expand All @@ -206,7 +206,7 @@ variables:
INIT_WITH_BINARY_V1BETA1: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.2.0/clusterctl-{OS}-{ARCH}"
# INIT_WITH_KUBERNETES_VERSION are only used by the clusterctl upgrade test to initialize
# the management cluster to be upgraded.
INIT_WITH_KUBERNETES_VERSION: "v1.25.12"
INIT_WITH_KUBERNETES_VERSION: "v1.29.8"
EXP_BOOTSTRAP_FORMAT_IGNITION: "true"
EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION: "true"
EXP_EXTERNAL_RESOURCE_GC: "true"
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/suites/unmanaged/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ func makeJoinBootstrapConfigTemplate(namespace, name string) *bootstrapv1.Kubead
JoinConfiguration: &bootstrapv1.JoinConfiguration{
NodeRegistration: bootstrapv1.NodeRegistrationOptions{
Name: "{{ ds.meta_data.local_hostname }}",
KubeletExtraArgs: map[string]string{"cloud-provider": "aws"},
KubeletExtraArgs: map[string]string{"cloud-provider": "external"},
},
},
},
Expand Down
30 changes: 19 additions & 11 deletions test/e2e/suites/unmanaged/unmanaged_CAPI_clusterclass_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,14 @@ var _ = ginkgo.Context("[unmanaged] [Cluster API Framework] [ClusterClass]", fun
})
})

ginkgo.Describe("Cluster Upgrade Spec - HA control plane with workers [K8s-Upgrade] [ClusterClass]", func() {
ginkgo.PDescribe("Cluster Upgrade Spec - HA control plane with workers [K8s-Upgrade] [ClusterClass]", func() {
ginkgo.BeforeEach(func() {
// As the resources cannot be defined by the It() clause in CAPI tests, using the largest values required for all It() tests in this CAPI test.
requiredResources = &shared.TestResource{EC2Normal: 5 * e2eCtx.Settings.InstanceVCPU, IGW: 2, NGW: 2, VPC: 2, ClassicLB: 2, EIP: 2, EventBridgeRules: 50}
requiredResources.WriteRequestedResources(e2eCtx, "capi-cluster-upgrade-clusterclass-test")
Expect(shared.AcquireResources(requiredResources, ginkgo.GinkgoParallelProcess(), flock.New(shared.ResourceQuotaFilePath))).To(Succeed())
if !e2eCtx.Settings.SkipQuotas {
// As the resources cannot be defined by the It() clause in CAPI tests, using the largest values required for all It() tests in this CAPI test.
requiredResources = &shared.TestResource{EC2Normal: 5 * e2eCtx.Settings.InstanceVCPU, IGW: 2, NGW: 2, VPC: 2, ClassicLB: 2, EIP: 2, EventBridgeRules: 50}
requiredResources.WriteRequestedResources(e2eCtx, "capi-cluster-upgrade-clusterclass-test")
Expect(shared.AcquireResources(requiredResources, ginkgo.GinkgoParallelProcess(), flock.New(shared.ResourceQuotaFilePath))).To(Succeed())
}
})

capi_e2e.ClusterUpgradeConformanceSpec(ctx, func() capi_e2e.ClusterUpgradeConformanceSpecInput {
Expand All @@ -87,16 +89,20 @@ var _ = ginkgo.Context("[unmanaged] [Cluster API Framework] [ClusterClass]", fun
})

ginkgo.AfterEach(func() {
shared.ReleaseResources(requiredResources, ginkgo.GinkgoParallelProcess(), flock.New(shared.ResourceQuotaFilePath))
if !e2eCtx.Settings.SkipQuotas {
shared.ReleaseResources(requiredResources, ginkgo.GinkgoParallelProcess(), flock.New(shared.ResourceQuotaFilePath))
}
})
})

ginkgo.Describe("ClusterClass Changes Spec - SSA immutability checks [ClusterClass]", func() {
ginkgo.BeforeEach(func() {
// As the resources cannot be defined by the It() clause in CAPI tests, using the largest values required for all It() tests in this CAPI test.
requiredResources = &shared.TestResource{EC2Normal: 5 * e2eCtx.Settings.InstanceVCPU, IGW: 2, NGW: 2, VPC: 2, ClassicLB: 2, EIP: 2, EventBridgeRules: 50}
requiredResources.WriteRequestedResources(e2eCtx, "capi-cluster-ssa-clusterclass-test")
Expect(shared.AcquireResources(requiredResources, ginkgo.GinkgoParallelProcess(), flock.New(shared.ResourceQuotaFilePath))).To(Succeed())
if !e2eCtx.Settings.SkipQuotas {
// As the resources cannot be defined by the It() clause in CAPI tests, using the largest values required for all It() tests in this CAPI test.
requiredResources = &shared.TestResource{EC2Normal: 5 * e2eCtx.Settings.InstanceVCPU, IGW: 2, NGW: 2, VPC: 2, ClassicLB: 2, EIP: 2, EventBridgeRules: 50}
requiredResources.WriteRequestedResources(e2eCtx, "capi-cluster-ssa-clusterclass-test")
Expect(shared.AcquireResources(requiredResources, ginkgo.GinkgoParallelProcess(), flock.New(shared.ResourceQuotaFilePath))).To(Succeed())
}
})

capi_e2e.ClusterClassChangesSpec(ctx, func() capi_e2e.ClusterClassChangesSpecInput {
Expand Down Expand Up @@ -133,7 +139,9 @@ var _ = ginkgo.Context("[unmanaged] [Cluster API Framework] [ClusterClass]", fun
})

ginkgo.AfterEach(func() {
shared.ReleaseResources(requiredResources, ginkgo.GinkgoParallelProcess(), flock.New(shared.ResourceQuotaFilePath))
if !e2eCtx.Settings.SkipQuotas {
shared.ReleaseResources(requiredResources, ginkgo.GinkgoParallelProcess(), flock.New(shared.ResourceQuotaFilePath))
}
})
})
})
30 changes: 19 additions & 11 deletions test/e2e/suites/unmanaged/unmanaged_CAPI_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,12 @@ var _ = ginkgo.Context("[unmanaged] [Cluster API Framework]", func() {

ginkgo.Describe("Self Hosted Spec", func() {
ginkgo.BeforeEach(func() {
// As the resources cannot be defined by the It() clause in CAPI tests, using the largest values required for all It() tests in this CAPI test.
requiredResources = &shared.TestResource{EC2Normal: 2 * e2eCtx.Settings.InstanceVCPU, IGW: 1, NGW: 1, VPC: 1, ClassicLB: 1, EIP: 1, EventBridgeRules: 50}
requiredResources.WriteRequestedResources(e2eCtx, "capi-clusterctl-self-hosted-test")
Expect(shared.AcquireResources(requiredResources, ginkgo.GinkgoParallelProcess(), flock.New(shared.ResourceQuotaFilePath))).To(Succeed())
if !e2eCtx.Settings.SkipQuotas {
// As the resources cannot be defined by the It() clause in CAPI tests, using the largest values required for all It() tests in this CAPI test.
requiredResources = &shared.TestResource{EC2Normal: 2 * e2eCtx.Settings.InstanceVCPU, IGW: 1, NGW: 1, VPC: 1, ClassicLB: 1, EIP: 1, EventBridgeRules: 50}
requiredResources.WriteRequestedResources(e2eCtx, "capi-clusterctl-self-hosted-test")
Expect(shared.AcquireResources(requiredResources, ginkgo.GinkgoParallelProcess(), flock.New(shared.ResourceQuotaFilePath))).To(Succeed())
}
})

capi_e2e.SelfHostedSpec(ctx, func() capi_e2e.SelfHostedSpecInput {
Expand All @@ -105,16 +107,20 @@ var _ = ginkgo.Context("[unmanaged] [Cluster API Framework]", func() {
}
})
ginkgo.AfterEach(func() {
shared.ReleaseResources(requiredResources, ginkgo.GinkgoParallelProcess(), flock.New(shared.ResourceQuotaFilePath))
if !e2eCtx.Settings.SkipQuotas {
shared.ReleaseResources(requiredResources, ginkgo.GinkgoParallelProcess(), flock.New(shared.ResourceQuotaFilePath))
}
})
})

ginkgo.Describe("Clusterctl Upgrade Spec [from latest v1beta1 release to v1beta2]", func() {
ginkgo.PDescribe("Clusterctl Upgrade Spec [from latest v1beta1 release to v1beta2]", func() {
ginkgo.BeforeEach(func() {
// As the resources cannot be defined by the It() clause in CAPI tests, using the largest values required for all It() tests in this CAPI test.
requiredResources = &shared.TestResource{EC2Normal: 5 * e2eCtx.Settings.InstanceVCPU, IGW: 2, NGW: 2, VPC: 2, ClassicLB: 2, EIP: 2, EventBridgeRules: 50}
requiredResources.WriteRequestedResources(e2eCtx, "capi-clusterctl-upgrade-test-v1beta1-to-v1beta2")
Expect(shared.AcquireResources(requiredResources, ginkgo.GinkgoParallelProcess(), flock.New(shared.ResourceQuotaFilePath))).To(Succeed())
if !e2eCtx.Settings.SkipQuotas {
// As the resources cannot be defined by the It() clause in CAPI tests, using the largest values required for all It() tests in this CAPI test.
requiredResources = &shared.TestResource{EC2Normal: 5 * e2eCtx.Settings.InstanceVCPU, IGW: 2, NGW: 2, VPC: 2, ClassicLB: 2, EIP: 2, EventBridgeRules: 50}
requiredResources.WriteRequestedResources(e2eCtx, "capi-clusterctl-upgrade-test-v1beta1-to-v1beta2")
Expect(shared.AcquireResources(requiredResources, ginkgo.GinkgoParallelProcess(), flock.New(shared.ResourceQuotaFilePath))).To(Succeed())
}
})

capi_e2e.ClusterctlUpgradeSpec(ctx, func() capi_e2e.ClusterctlUpgradeSpecInput {
Expand All @@ -135,7 +141,9 @@ var _ = ginkgo.Context("[unmanaged] [Cluster API Framework]", func() {
}
})
ginkgo.AfterEach(func() {
shared.ReleaseResources(requiredResources, ginkgo.GinkgoParallelProcess(), flock.New(shared.ResourceQuotaFilePath))
if !e2eCtx.Settings.SkipQuotas {
shared.ReleaseResources(requiredResources, ginkgo.GinkgoParallelProcess(), flock.New(shared.ResourceQuotaFilePath))
}
})
})

Expand Down
Loading

0 comments on commit 30d00c5

Please sign in to comment.