-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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: Sub Module Prefix Separator #1792
fix: Sub Module Prefix Separator #1792
Conversation
the prefix-separator was added to prevent the cluster resources from being re-created, and I believe we discussed not adding them to node groups. since node groups in theory should be ephemeral, I am leaning towards excluding this change to avoid any additional v17.x creep back into this version |
"prefix-separator was added to prevent the cluster resources from being re-created" |
No, like I said - we added it to cluster resources because the cluster control plane holds the etcd data, etc.. You can do target applies and bring up new node groups before destroying the existing node groups. Also, we've made no guarantees on zero downtime upgrades. Its marked as a breaking change for a reason |
Ref #1745 (comment) |
You simply cannot ask users of this module to simply destroy their production node groups and not expect them to push back. Targeted applies being a solution, but also as much as a hack and as unpleasant as just allowing the separator where it is needed. It is not an unreasonable expectation to not want to recreate your node groups, ephemeral or not. Users are going to take the path of least resistance. This is a simple addition, irrelevant on where it is. It is still in the module. |
@jurgen-weber-deltatre I don't expect anything from users other than compassion and understanding - users are able to stay at the last v17.x version until they are ready to plan an upgrade path. Making demands of free OSS that was provided by individuals on their own time is not a good look. You can check out other threads, people that are savvy with Terraform are those that will be most successful in navigating and upgrade path based on their current configurations #1744 |
nice touch with all the 👍🏽 👎🏽 |
@bryantbiggs I believe this discussion essentially boils down to "should the node groups or the nodes be ephemeral?". Seeing as the use of spot/replaceable instances is an extremely common cost saving measure, I am inclined to argue that the nodes are ephemeral while their state/configuration is held in a parent node group/ASG/etc. object. I'm happy to discuss this further outside of this PR, however the point of this PR is more to give users the choice of where they sit on that question. From an ease of migration point of view, for all users of Terraform, an upgrade path that requires the least number of resources to be destroyed/replaced would be the path of least resistance. Which is what this PR is hoping to achieve. Not forcing the replacement of resources is IMO, the safest upgrade approach. I understand that this module is designed to have breaking changes when compared to v17.X, this is more about reducing the barrier to entry when upgrading. |
Ideally you would provide a migration path for users: |
You just described a breaking change to support a breaking change |
Breaking change would be done over two releases which gives users a path to migrate workloads. |
You can achieve this today by doing targetted applies.
|
Thanks, I tested it a couple hours ago. Trick was that you have to create security groups before running terraform apply on node group, else nodes cannot talk to cluster. I am guessing there are some missing dependencies in terraform.
|
some workaround which I often use is to remove existing node groups from terraform via:
and then rerun new terraform code. After new node groups will be created I just remove existing ones (which are outside terraform) via WEB UI |
Couldn't you also use the new sub-modules outside the parent module? Spin up some new node groups that match the old ones, migrate workloads over to them, upgrade the cluster/destroy the old node groups (while using the existing prefix-separator variable in the main cluster). |
I don't like the hack/fix with manipulating the state, we do a have a wrapper for terraform that does some gitops magic so running these import/state rm would be an excess for us, of course we can do it, but why. @bryantbiggs @daroga0002 will you be open to mitigate state manipulation to just renaming some resources back? like I do here: master...ivankovnatsky:master |
no we are not going to revert those changes - they were intentionally made within a breaking change as planned. if you don't want to do state move commands at the CLI, you can use the new |
Chiming in here as I have been away for a while. When using the This is because Terraform requires that the Testing locally by editting my moved { moved { Implementing these |
A word of caution for others going through the upgrade process, that even after adding the https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/main.tf#L173 |
We decided not to upgrade at all, and in the future just migrate out of module. |
@bryantbiggs is there any update on this? Based on the feedback from here it sounds like there are others that have been having this issue. If this PR/idea is not likely to be adopted, then please close this PR. I understand that this issue has been flagged as |
while I appreciate the PR, I don't think this is a change we will be implementing |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
This PR addresses the issue raised in issue #1791 of different prefix separators being used pre v18.0.
prefix_separator
toeks-managed-node-group
,fargate-profile
andself-managed-node-group
submodules that defaults to "-"prefix_separator
variableMotivation and Context
This PR addresses the issue raised in issue #1791. When upgrading from v17.X to v18.X, many resources are replaced due to the previous default separator of empty string ("") not being used in all locations by sub modules. This PR adds support for passing a custom prefix separator to each sub module to address this.
Breaking Changes
N/A
How Has This Been Tested?
examples/*
projectsterraform init
andterraform plan
for theeks_managed_node_group
,fargate_profile
andself_managed_node_group
examples. All successfully planned.