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 k8s_version variable #247

Merged
merged 2 commits into from
Oct 14, 2021
Merged

remove k8s_version variable #247

merged 2 commits into from
Oct 14, 2021

Conversation

ettiee
Copy link
Contributor

@ettiee ettiee commented Oct 12, 2021

We provided a variable for k8s_version in the module. This would allow users to set a different k8s version to the github release they are using, which may cause them to use incorrect configuration for that k8s version and use the wrong version of some addons.

We should make it clear that this isn't configurable and instead users should use the appropriate github release

Users should not set a k8s variable, instead they should use the release version for their intended k8s version
@ettiee ettiee requested a review from takanabe October 12, 2021 10:54
Copy link
Contributor

@takanabe takanabe left a comment

Choose a reason for hiding this comment

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

We should make it clear that this isn't configurable and instead users should use the appropriate github release

Could you elaborate on the reason why you think so?I think the version is configurable and we don't need this PR.

Let's say we want to deploy EKS cluster using K8s version 1.17 and 1.19 we can use the variable to specify the versions.

@ettiee
Copy link
Contributor Author

ettiee commented Oct 12, 2021

Could you elaborate on the reason why you think so?I think the version is configurable and we don't need this PR.

Sure! Let's say a user wants to use the module to set up a cluster with k8s 1.19. They should use the terraform cluster module targeting version 1.19. Let's say that user now wants to install a cluster with k8s 1.17, and they use that same terraform module (version 1.19) but set k8s_version = 1.17.0. This will configure the control plane and node template to version 1.17, but some other configuration in the module might cause bugs for k8s 1.17.0. For example the addons will be using the versions recommended for k8s 1.19 and might cause bugs on k8s 1.17. There might be some configuration dropped in a later version that's required in an earlier version of k8s - this might be missed if someone uses a later version of the terraform module and configures k8_version to be for an earlier release.

So two reasons for me to open this PR:

  • It's confusing for users to configure the k8s version in two places (as a variable, and by pulling the appropriate version of the terraform module)
  • Might cause bugs if users set a different k8s_version to the one that the release was tested against

@takanabe
Copy link
Contributor

Thank you for the explanation. Now, your intention is clear and I think this changes make sense. So, will we change all supported versions' k8s_version variables to local scopes?

@ettiee
Copy link
Contributor Author

ettiee commented Oct 13, 2021

Thank you for the explanation. Now, your intention is clear and I think this changes make sense. So, will we change all supported versions' k8s_version variables to local scopes?

Yes - do you agree with the implementation (change all supported versions' k8s_version variables to local scopes)?

@takanabe
Copy link
Contributor

Yes. When is the timing we declare this is a breaking change for the module? Maybe at the time to release a new patch version for each minor version?

@ettiee
Copy link
Contributor Author

ettiee commented Oct 13, 2021

Yes we should announce the breaking change with the release. What releases do you think we should target this PR to? I think we should release this with the next minor version 1.20, but I'm not sure we need to release a patch to previous minor version.

📝 I will add a note to https://github.com/cookpad/terraform-aws-eks/blob/main/UPGRADING.md about the breaking change

Copy link
Member

@errm errm left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@takanabe takanabe left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@mtpereira mtpereira left a comment

Choose a reason for hiding this comment

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

❤️ :shipit:

@ettiee ettiee merged commit 4db0cf3 into main Oct 14, 2021
@ettiee ettiee deleted the ee/remove-k8s_version-var branch October 14, 2021 14:41
@takanabe takanabe added breaking change enhancement New feature or request new feature and removed enhancement New feature or request new feature labels Nov 4, 2021
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.

None yet

4 participants