Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 fix: e2e changes to remove v1.23 #5297

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 3 additions & 3 deletions 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 All @@ -127,8 +129,6 @@ variables:
EXP_EKS_IAM: "false"
EXP_EKS_ADD_ROLES: "false"
VPC_ADDON_VERSION: "v1.18.1-eksbuild.3"
COREDNS_ADDON_VERSION: "v1.11.1-eksbuild.8"
COREDNS_ADDON_CONFIGURATION: '{"replicaCount":3}'
KUBE_PROXY_ADDON_VERSION: "v1.30.0-eksbuild.3"
CONFORMANCE_CI_ARTIFACTS_KUBERNETES_VERSION: "1.30.2"
IP_FAMILY: "IPv4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ spec:
- name: "vpc-cni"
version: "${VPC_ADDON_VERSION}"
conflictResolution: "overwrite"
- name: "coredns"
version: "${COREDNS_ADDON_VERSION}"
conflictResolution: "overwrite"
configuration: '${COREDNS_ADDON_CONFIGURATION}'
identityRef:
kind: AWSClusterStaticIdentity
name: e2e-account
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"
nrb marked this conversation as resolved.
Show resolved Hide resolved
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
28 changes: 6 additions & 22 deletions test/e2e/suites/managed/eks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ import (
// General EKS e2e test.
var _ = ginkgo.Describe("[managed] [general] EKS cluster tests", func() {
var (
namespace *corev1.Namespace
ctx context.Context
specName = "cluster"
clusterName string
cniAddonName = "vpc-cni"
corednsAddonName = "coredns"
namespace *corev1.Namespace
ctx context.Context
specName = "cluster"
clusterName string
cniAddonName = "vpc-cni"
)

shared.ConditionalIt(runGeneralTests, "should create a cluster and add nodes", func() {
Expand All @@ -50,7 +49,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 +68,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 Expand Up @@ -99,20 +97,6 @@ var _ = ginkgo.Describe("[managed] [general] EKS cluster tests", func() {
}
})

ginkgo.By("should have the Coredns addon installed")
CheckAddonExistsSpec(ctx, func() CheckAddonExistsSpecInput {
return CheckAddonExistsSpecInput{
E2EConfig: e2eCtx.E2EConfig,
BootstrapClusterProxy: e2eCtx.Environment.BootstrapClusterProxy,
AWSSession: e2eCtx.BootstrapUserAWSSession,
Namespace: namespace,
ClusterName: clusterName,
AddonName: corednsAddonName,
AddonVersion: e2eCtx.E2EConfig.GetVariable(shared.CorednsAddonVersion),
AddonConfiguration: e2eCtx.E2EConfig.GetVariable(shared.CorednsAddonConfiguration),
}
})

ginkgo.By("should create a MachineDeployment")
MachineDeploymentSpec(ctx, func() MachineDeploymentSpecInput {
return MachineDeploymentSpecInput{
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
Loading