Skip to content

Commit

Permalink
Merge pull request #5297 from richardcase/e2e_eks_changes
Browse files Browse the repository at this point in the history
🐛 fix: e2e changes to remove v1.23
  • Loading branch information
k8s-ci-robot authored Jan 21, 2025
2 parents 969bfc4 + d004496 commit b29e04c
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 582 deletions.
3 changes: 0 additions & 3 deletions test/e2e/data/e2e_conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,6 @@ variables:
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"
CNI: "../../data/cni/calico.yaml"
KUBETEST_CONFIGURATION: "../../data/kubetest/conformance.yaml"
EVENT_BRIDGE_INSTANCE_STATE: "true"
Expand Down
4 changes: 3 additions & 1 deletion test/e2e/data/e2e_eks_conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ images:
- name: gcr.io/k8s-staging-cluster-api/capa-manager:e2e
loadBehavior: mustLoad

## PLEASE KEEP THESE UP TO DATE WITH THE COMPONENTS
## PLEASE KEEP THESE UP TO DATE WITH THE COMPONENTS
- name: quay.io/jetstack/cert-manager-cainjector:v1.15.1
loadBehavior: tryLoad
- name: quay.io/jetstack/cert-manager-webhook:v1.15.1
Expand Down Expand Up @@ -118,6 +118,8 @@ providers:
variables:
KUBERNETES_VERSION: "v1.30.2"
KUBERNETES_VERSION_MANAGEMENT: "v1.30.0" # Kind bootstrap
UPGRADE_FROM_VERSION: "v1.30.0"
UPGRADE_TO_VERSION: "v1.31.0"
EXP_MACHINE_POOL: "true"
EXP_CLUSTER_RESOURCE_SET: "true"
EVENT_BRIDGE_INSTANCE_STATE: "true"
Expand Down
3 changes: 0 additions & 3 deletions test/e2e/data/eks/cluster-template-eks-ipv6-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ spec:
- name: "vpc-cni"
version: "${VPC_ADDON_VERSION}"
conflictResolution: "overwrite"
- name: "coredns"
version: "${COREDNS_ADDON_VERSION}"
conflictResolution: "overwrite"
- name: "kube-proxy"
version: "${KUBE_PROXY_ADDON_VERSION}"
conflictResolution: "overwrite"
Expand Down
6 changes: 2 additions & 4 deletions test/e2e/shared/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ const (
CNIPath = "CNI"
CNIResources = "CNI_RESOURCES"
CNIAddonVersion = "VPC_ADDON_VERSION"
CorednsAddonVersion = "COREDNS_ADDON_VERSION"
CorednsAddonConfiguration = "COREDNS_ADDON_CONFIGURATION"
GcWorkloadPath = "GC_WORKLOAD"
KubeproxyAddonVersion = "KUBE_PROXY_ADDON_VERSION"
AwsNodeMachineType = "AWS_NODE_MACHINE_TYPE"
Expand All @@ -66,11 +64,11 @@ const (
StorageClassOutTreeZoneLabel = "topology.ebs.csi.aws.com/zone"
GPUFlavor = "gpu"
InstanceVcpu = "AWS_MACHINE_TYPE_VCPU_USAGE"
PreCSIKubernetesVer = "PRE_1_23_KUBERNETES_VERSION"
PostCSIKubernetesVer = "POST_1_23_KUBERNETES_VERSION"
EFSSupport = "efs-support"
IntreeCloudProvider = "intree-cloud-provider"
MultiTenancy = "MULTI_TENANCY_"
EksUpgradeFromVersion = "UPGRADE_FROM_VERSION"
EksUpgradeToVersion = "UPGRADE_TO_VERSION"
)

// ResourceQuotaFilePath is the path to the file that contains the resource usage.
Expand Down
1 change: 0 additions & 1 deletion test/e2e/suites/managed/eks_ipv6_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ var _ = ginkgo.Describe("[managed] [general] [ipv6] EKS cluster tests", func() {
Expect(e2eCtx.E2EConfig).ToNot(BeNil(), "Invalid argument. e2eConfig can't be nil when calling %s spec", specName)
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.KubernetesVersion))
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.CNIAddonVersion))
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.CorednsAddonVersion))
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.KubeproxyAddonVersion))

ctx = context.TODO()
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/suites/managed/eks_legacy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ var _ = ginkgo.Describe("[managed] [legacy] EKS cluster tests - single kind", fu
Expect(e2eCtx.E2EConfig).ToNot(BeNil(), "Invalid argument. e2eConfig can't be nil when calling %s spec", specName)
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.KubernetesVersion))
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.CNIAddonVersion))
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.CorednsAddonVersion))
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.KubeproxyAddonVersion))

ctx = context.TODO()
Expand All @@ -71,7 +70,7 @@ var _ = ginkgo.Describe("[managed] [legacy] EKS cluster tests - single kind", fu
Namespace: namespace,
ClusterName: clusterName,
Flavour: EKSControlPlaneOnlyLegacyFlavor,
ControlPlaneMachineCount: 1, //NOTE: this cannot be zero as clusterctl returns an error
ControlPlaneMachineCount: 1, // NOTE: this cannot be zero as clusterctl returns an error
WorkerMachineCount: 0,
}
})
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/suites/managed/eks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ var _ = ginkgo.Describe("[managed] [general] EKS cluster tests", func() {
Expect(e2eCtx.E2EConfig).ToNot(BeNil(), "Invalid argument. e2eConfig can't be nil when calling %s spec", specName)
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.KubernetesVersion))
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.CNIAddonVersion))
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.CorednsAddonVersion))

ctx = context.TODO()
namespace = shared.SetupSpecNamespace(ctx, specName, e2eCtx)
Expand All @@ -70,7 +69,7 @@ var _ = ginkgo.Describe("[managed] [general] EKS cluster tests", func() {
Namespace: namespace,
ClusterName: clusterName,
Flavour: EKSControlPlaneOnlyWithAddonFlavor,
ControlPlaneMachineCount: 1, //NOTE: this cannot be zero as clusterctl returns an error
ControlPlaneMachineCount: 1, // NOTE: this cannot be zero as clusterctl returns an error
WorkerMachineCount: 0,
}
})
Expand Down
20 changes: 11 additions & 9 deletions test/e2e/suites/managed/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,29 @@ import (

// EKS cluster upgrade tests.
var _ = ginkgo.Describe("EKS Cluster upgrade test", func() {
const (
initialVersion = "v1.23.6"
upgradeToVersion = "v1.24.4"
)
var (
namespace *corev1.Namespace
ctx context.Context
specName = "eks-upgrade"
clusterName string
namespace *corev1.Namespace
ctx context.Context
specName = "eks-upgrade"
clusterName string
initialVersion string
upgradeToVersion string
)

shared.ConditionalIt(runUpgradeTests, "[managed] [upgrade] should create a cluster and upgrade the kubernetes version", func() {
ginkgo.By("should have a valid test configuration")
Expect(e2eCtx.Environment.BootstrapClusterProxy).ToNot(BeNil(), "Invalid argument. BootstrapClusterProxy can't be nil")
Expect(e2eCtx.E2EConfig).ToNot(BeNil(), "Invalid argument. e2eConfig can't be nil when calling %s spec", specName)
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.KubernetesVersion))
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.EksUpgradeFromVersion))
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.EksUpgradeToVersion))

ctx = context.TODO()
namespace = shared.SetupSpecNamespace(ctx, specName, e2eCtx)
clusterName = fmt.Sprintf("%s-%s", specName, util.RandomString(6))

initialVersion = e2eCtx.E2EConfig.GetVariable(shared.EksUpgradeFromVersion)
upgradeToVersion = e2eCtx.E2EConfig.GetVariable(shared.EksUpgradeToVersion)

ginkgo.By("default iam role should exist")
VerifyRoleExistsAndOwned(ekscontrolplanev1.DefaultEKSControlPlaneRole, clusterName, false, e2eCtx.BootstrapUserAWSSession)

Expand Down
Loading

0 comments on commit b29e04c

Please sign in to comment.