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

remove support for 1.18 #5073

Merged
merged 7 commits into from
Apr 8, 2022
Merged

remove support for 1.18 #5073

merged 7 commits into from
Apr 8, 2022

Conversation

aclevername
Copy link
Contributor

@aclevername aclevername commented Apr 5, 2022

Description

Closes #5062

eksctl create cluster --name jk --version 1.18
2022-04-05 16:44:00 [ℹ]  eksctl version 0.93.0-dev+2333ab45f.2022-04-05T16:43:52Z
2022-04-05 16:44:00 [ℹ]  using region us-west-2
Error: invalid version, 1.18 is no longer supported, supported values: 1.19, 1.20, 1.21, 1.22
see also: https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html

Skarlso
Skarlso previously requested changes Apr 6, 2022
Copy link
Contributor

@Skarlso Skarlso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also update dry-run.md and addons.md. :)

Copy link
Contributor

@Skarlso Skarlso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

Copy link
Collaborator

@Himangini Himangini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of questions on removal of supported versions checks for addons

pkg/actions/addon/addon.go Show resolved Hide resolved
pkg/actions/addon/addon.go Show resolved Hide resolved
pkg/actions/addon/addon_test.go Show resolved Hide resolved
pkg/addons/default/kube_proxy.go Show resolved Hide resolved
pkg/addons/default/kube_proxy_test.go Show resolved Hide resolved
pkg/addons/default/kube_proxy_test.go Show resolved Hide resolved
Copy link
Collaborator

@Himangini Himangini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also i noticed some specific checks in tests around 1.18, do we need to update them to 1.19 to make sure everything works fine for 1.19 in the following files?
pkg/actions/addon/create_test.go
pkg/actions/addon/delete_test.go
pkg/actions/addon/get_test.go
pkg/actions/addon/update_test.go
pkg/actions/addon/describe_versions_test.go

@aclevername
Copy link
Contributor Author

aclevername commented Apr 6, 2022

I will take a look but I have a feeling it doesn't matte for the tests, any version can be used for unit-testing, since we aren't talking to the real EKS API. We have lots of tests referencing old versions since its just not worth changing. E.g. kube-proxy tests reference 1.15/6 https://github.com/weaveworks/eksctl/blob/main/pkg/addons/default/kube_proxy_test.go

@Himangini
Copy link
Collaborator

I will take a look but I have a feeling it doesn't matte for the tests, any version can be used for unit-testing, since we aren't talking to the real EKS API. We have lots of tests referencing old versions since its just not worth changing. E.g. kube-proxy tests reference 1.15/6 https://github.com/weaveworks/eksctl/blob/main/pkg/addons/default/kube_proxy_test.go

As I mentioned in the earlier comment, the files refer to specific version 1.18 in tests. If we remove the supported version checks and greaterThanOrEqualTo1_18 checks, then we should remove those tests since it's irrelevant now or update them to use 1.19 otherwise it's confusing. Eg., Why would you test the creation of an addon with a non-supported cluster version?

@Skarlso
Copy link
Contributor

Skarlso commented Apr 7, 2022

As I mentioned in the earlier comment, the files refer to specific version 1.18 in tests. If we remove the supported version checks and greaterThanOrEqualTo1_18 checks, then we should remove those tests since it's irrelevant now or update them to use 1.19 otherwise it's confusing. Eg., Why would you test the creation of an addon with a non-supported cluster version?

In those tests, the version is irrelevant. :)
For example:

		clusterConfig = &api.ClusterConfig{Metadata: &api.ClusterMeta{
			Version: "1.18",
			Name:    "my-cluster",
		}}

The version there literally could be 1 and this test would still pass. :) The important things are different in nature. Things like, sorting, and that the right thing is returned / created / deleted / updated. Those versions don't really do anything in these tests.

We usually just leave them be as it's not worth continuously updating. Such as versions like these:

						{
							AddonVersion: aws.String("v1.0.0-eksbuild.1"),
						},
						{
							AddonVersion: aws.String("v1.7.5-eksbuild.1"),
						},
						{
							AddonVersion: aws.String("v1.7.5-eksbuild.2"),
						},
						{
							//not sure if all versions come with v prefix or not, so test a mix
							AddonVersion: aws.String("v1.7.7-eksbuild.2"),
						},
						{
							AddonVersion: aws.String("v1.7.6"),

We never update these either, because they don't matter. They aren't version checked any longer. The tests are testing a different thing. The relevant tests in kube_proxy have been updated however. Those do matter for version reasons.

@aclevername
Copy link
Contributor Author

+1 to what @Skarlso said 😄

@Himangini
Copy link
Collaborator

Himangini commented Apr 7, 2022

I didn't know there's a spokesperson for you @aclevername :D

@aclevername
Copy link
Contributor Author

I didn't know there's a spokesperson for you @aclevername :D

tbf all of the responses yesterday were while I was at the doctors, which I appreciate ❤️

@Skarlso
Copy link
Contributor

Skarlso commented Apr 7, 2022

I didn't know there's a spokesperson for you @aclevername :D

  1. I reviewed and approved this pr so I thought I'd share my findings with you.
  2. Jake was mostly out because of medical reasons and I wanted to move the PR review forward so you aren't blocked.
  3. Since Jake will be out, I take over most of his Prs so I kind of want the context.

Copy link
Contributor

@cPu1 cPu1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a comment about keeping the existing validation for addons but otherwise LGTM.

pkg/actions/addon/addon.go Show resolved Hide resolved
@aclevername aclevername merged commit cfae14a into main Apr 8, 2022
@aclevername aclevername deleted the remove-1.18 branch April 8, 2022 08:37
SlevinWasAlreadyTaken pushed a commit to SlevinWasAlreadyTaken/eksctl that referenced this pull request Apr 11, 2022
@hspencer77 hspencer77 mentioned this pull request Jul 8, 2022
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task] Remove support for EKS 1.18
4 participants