Skip to content

Commit d004496

Browse files
committed
fix: e2e changes to remove v1.23
This changes the EKS upgrade test to use a newer version of Kubernetes. It was using v1.23 which isn't supported. Removed old CSI tests as they where testing upgrades to v1.23 for unmanaged clusters. Removed references to CoreDNS addon in EKS tests. Signed-off-by: Richard Case <[email protected]>
1 parent 85759ce commit d004496

11 files changed

+23
-608
lines changed

test/e2e/data/e2e_conf.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,6 @@ variables:
180180
KUBERNETES_VERSION: "v1.29.9"
181181
KUBERNETES_VERSION_UPGRADE_TO: "v1.29.9"
182182
KUBERNETES_VERSION_UPGRADE_FROM: "v1.29.8"
183-
# Pre and post 1.23 Kubernetes versions are being used for CSI upgrade tests
184-
PRE_1_23_KUBERNETES_VERSION: "v1.22.17"
185-
POST_1_23_KUBERNETES_VERSION: "v1.23.15"
186183
CNI: "../../data/cni/calico.yaml"
187184
KUBETEST_CONFIGURATION: "../../data/kubetest/conformance.yaml"
188185
EVENT_BRIDGE_INSTANCE_STATE: "true"

test/e2e/data/e2e_eks_conf.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ images:
1616
- name: gcr.io/k8s-staging-cluster-api/capa-manager:e2e
1717
loadBehavior: mustLoad
1818

19-
## PLEASE KEEP THESE UP TO DATE WITH THE COMPONENTS
19+
## PLEASE KEEP THESE UP TO DATE WITH THE COMPONENTS
2020
- name: quay.io/jetstack/cert-manager-cainjector:v1.15.1
2121
loadBehavior: tryLoad
2222
- name: quay.io/jetstack/cert-manager-webhook:v1.15.1
@@ -118,6 +118,8 @@ providers:
118118
variables:
119119
KUBERNETES_VERSION: "v1.30.2"
120120
KUBERNETES_VERSION_MANAGEMENT: "v1.30.0" # Kind bootstrap
121+
UPGRADE_FROM_VERSION: "v1.30.0"
122+
UPGRADE_TO_VERSION: "v1.31.0"
121123
EXP_MACHINE_POOL: "true"
122124
EXP_CLUSTER_RESOURCE_SET: "true"
123125
EVENT_BRIDGE_INSTANCE_STATE: "true"
@@ -127,8 +129,6 @@ variables:
127129
EXP_EKS_IAM: "false"
128130
EXP_EKS_ADD_ROLES: "false"
129131
VPC_ADDON_VERSION: "v1.18.1-eksbuild.3"
130-
COREDNS_ADDON_VERSION: "v1.11.1-eksbuild.8"
131-
COREDNS_ADDON_CONFIGURATION: '{"replicaCount":3}'
132132
KUBE_PROXY_ADDON_VERSION: "v1.30.0-eksbuild.3"
133133
CONFORMANCE_CI_ARTIFACTS_KUBERNETES_VERSION: "1.30.2"
134134
IP_FAMILY: "IPv4"

test/e2e/data/eks/cluster-template-eks-control-plane-only-withaddon.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ spec:
4040
- name: "vpc-cni"
4141
version: "${VPC_ADDON_VERSION}"
4242
conflictResolution: "overwrite"
43-
- name: "coredns"
44-
version: "${COREDNS_ADDON_VERSION}"
45-
conflictResolution: "overwrite"
46-
configuration: '${COREDNS_ADDON_CONFIGURATION}'
4743
identityRef:
4844
kind: AWSClusterStaticIdentity
4945
name: e2e-account

test/e2e/data/eks/cluster-template-eks-ipv6-cluster.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ spec:
4545
- name: "vpc-cni"
4646
version: "${VPC_ADDON_VERSION}"
4747
conflictResolution: "overwrite"
48-
- name: "coredns"
49-
version: "${COREDNS_ADDON_VERSION}"
50-
conflictResolution: "overwrite"
5148
- name: "kube-proxy"
5249
version: "${KUBE_PROXY_ADDON_VERSION}"
5350
conflictResolution: "overwrite"

test/e2e/shared/defaults.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ const (
4343
CNIPath = "CNI"
4444
CNIResources = "CNI_RESOURCES"
4545
CNIAddonVersion = "VPC_ADDON_VERSION"
46-
CorednsAddonVersion = "COREDNS_ADDON_VERSION"
47-
CorednsAddonConfiguration = "COREDNS_ADDON_CONFIGURATION"
4846
GcWorkloadPath = "GC_WORKLOAD"
4947
KubeproxyAddonVersion = "KUBE_PROXY_ADDON_VERSION"
5048
AwsNodeMachineType = "AWS_NODE_MACHINE_TYPE"
@@ -66,11 +64,11 @@ const (
6664
StorageClassOutTreeZoneLabel = "topology.ebs.csi.aws.com/zone"
6765
GPUFlavor = "gpu"
6866
InstanceVcpu = "AWS_MACHINE_TYPE_VCPU_USAGE"
69-
PreCSIKubernetesVer = "PRE_1_23_KUBERNETES_VERSION"
70-
PostCSIKubernetesVer = "POST_1_23_KUBERNETES_VERSION"
7167
EFSSupport = "efs-support"
7268
IntreeCloudProvider = "intree-cloud-provider"
7369
MultiTenancy = "MULTI_TENANCY_"
70+
EksUpgradeFromVersion = "UPGRADE_FROM_VERSION"
71+
EksUpgradeToVersion = "UPGRADE_TO_VERSION"
7472
)
7573

7674
// ResourceQuotaFilePath is the path to the file that contains the resource usage.

test/e2e/suites/managed/eks_ipv6_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ var _ = ginkgo.Describe("[managed] [general] [ipv6] EKS cluster tests", func() {
5151
Expect(e2eCtx.E2EConfig).ToNot(BeNil(), "Invalid argument. e2eConfig can't be nil when calling %s spec", specName)
5252
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.KubernetesVersion))
5353
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.CNIAddonVersion))
54-
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.CorednsAddonVersion))
5554
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.KubeproxyAddonVersion))
5655

5756
ctx = context.TODO()

test/e2e/suites/managed/eks_legacy_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ var _ = ginkgo.Describe("[managed] [legacy] EKS cluster tests - single kind", fu
5050
Expect(e2eCtx.E2EConfig).ToNot(BeNil(), "Invalid argument. e2eConfig can't be nil when calling %s spec", specName)
5151
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.KubernetesVersion))
5252
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.CNIAddonVersion))
53-
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.CorednsAddonVersion))
5453
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.KubeproxyAddonVersion))
5554

5655
ctx = context.TODO()
@@ -71,7 +70,7 @@ var _ = ginkgo.Describe("[managed] [legacy] EKS cluster tests - single kind", fu
7170
Namespace: namespace,
7271
ClusterName: clusterName,
7372
Flavour: EKSControlPlaneOnlyLegacyFlavor,
74-
ControlPlaneMachineCount: 1, //NOTE: this cannot be zero as clusterctl returns an error
73+
ControlPlaneMachineCount: 1, // NOTE: this cannot be zero as clusterctl returns an error
7574
WorkerMachineCount: 0,
7675
}
7776
})

test/e2e/suites/managed/eks_test.go

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,11 @@ import (
3636
// General EKS e2e test.
3737
var _ = ginkgo.Describe("[managed] [general] EKS cluster tests", func() {
3838
var (
39-
namespace *corev1.Namespace
40-
ctx context.Context
41-
specName = "cluster"
42-
clusterName string
43-
cniAddonName = "vpc-cni"
44-
corednsAddonName = "coredns"
39+
namespace *corev1.Namespace
40+
ctx context.Context
41+
specName = "cluster"
42+
clusterName string
43+
cniAddonName = "vpc-cni"
4544
)
4645

4746
shared.ConditionalIt(runGeneralTests, "should create a cluster and add nodes", func() {
@@ -50,7 +49,6 @@ var _ = ginkgo.Describe("[managed] [general] EKS cluster tests", func() {
5049
Expect(e2eCtx.E2EConfig).ToNot(BeNil(), "Invalid argument. e2eConfig can't be nil when calling %s spec", specName)
5150
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.KubernetesVersion))
5251
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.CNIAddonVersion))
53-
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(shared.CorednsAddonVersion))
5452

5553
ctx = context.TODO()
5654
namespace = shared.SetupSpecNamespace(ctx, specName, e2eCtx)
@@ -70,7 +68,7 @@ var _ = ginkgo.Describe("[managed] [general] EKS cluster tests", func() {
7068
Namespace: namespace,
7169
ClusterName: clusterName,
7270
Flavour: EKSControlPlaneOnlyWithAddonFlavor,
73-
ControlPlaneMachineCount: 1, //NOTE: this cannot be zero as clusterctl returns an error
71+
ControlPlaneMachineCount: 1, // NOTE: this cannot be zero as clusterctl returns an error
7472
WorkerMachineCount: 0,
7573
}
7674
})
@@ -99,20 +97,6 @@ var _ = ginkgo.Describe("[managed] [general] EKS cluster tests", func() {
9997
}
10098
})
10199

102-
ginkgo.By("should have the Coredns addon installed")
103-
CheckAddonExistsSpec(ctx, func() CheckAddonExistsSpecInput {
104-
return CheckAddonExistsSpecInput{
105-
E2EConfig: e2eCtx.E2EConfig,
106-
BootstrapClusterProxy: e2eCtx.Environment.BootstrapClusterProxy,
107-
AWSSession: e2eCtx.BootstrapUserAWSSession,
108-
Namespace: namespace,
109-
ClusterName: clusterName,
110-
AddonName: corednsAddonName,
111-
AddonVersion: e2eCtx.E2EConfig.GetVariable(shared.CorednsAddonVersion),
112-
AddonConfiguration: e2eCtx.E2EConfig.GetVariable(shared.CorednsAddonConfiguration),
113-
}
114-
})
115-
116100
ginkgo.By("should create a MachineDeployment")
117101
MachineDeploymentSpec(ctx, func() MachineDeploymentSpecInput {
118102
return MachineDeploymentSpecInput{

test/e2e/suites/managed/upgrade_test.go

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,29 @@ import (
3535

3636
// EKS cluster upgrade tests.
3737
var _ = ginkgo.Describe("EKS Cluster upgrade test", func() {
38-
const (
39-
initialVersion = "v1.23.6"
40-
upgradeToVersion = "v1.24.4"
41-
)
4238
var (
43-
namespace *corev1.Namespace
44-
ctx context.Context
45-
specName = "eks-upgrade"
46-
clusterName string
39+
namespace *corev1.Namespace
40+
ctx context.Context
41+
specName = "eks-upgrade"
42+
clusterName string
43+
initialVersion string
44+
upgradeToVersion string
4745
)
4846

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

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

58+
initialVersion = e2eCtx.E2EConfig.GetVariable(shared.EksUpgradeFromVersion)
59+
upgradeToVersion = e2eCtx.E2EConfig.GetVariable(shared.EksUpgradeToVersion)
60+
5961
ginkgo.By("default iam role should exist")
6062
VerifyRoleExistsAndOwned(ekscontrolplanev1.DefaultEKSControlPlaneRole, clusterName, false, e2eCtx.BootstrapUserAWSSession)
6163

0 commit comments

Comments
 (0)