-
Notifications
You must be signed in to change notification settings - Fork 295
feat: add CF stackNameOverride in cluster.yaml #1484
feat: add CF stackNameOverride in cluster.yaml #1484
Conversation
Add option in cluster.yaml to override the name of CF controlPlane, network and etcd stacks. This is useful for migration of CF stacks from kube-aws <0.11.x without creating a new VPC.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report
@@ Coverage Diff @@
## master #1484 +/- ##
==========================================
- Coverage 37.92% 37.86% -0.06%
==========================================
Files 75 75
Lines 4596 4608 +12
==========================================
+ Hits 1743 1745 +2
- Misses 2611 2620 +9
- Partials 242 243 +1
Continue to review full report at Codecov.
|
/assign @mumoshu |
Hey! Thanks for submitting this.
Ahhh... this is something I strongly suggest NOT to do. Sorry If I wasn't very clear about that in the kube-aws docs or related GitHub issues. Please give me a moment and I'll try to understand what you're going to do. Thanks. |
@koen92 Would you also mind submitting this to The current Edit: Fixed the wrong version nums in my prev comment |
# In this scenario the name of the networkstack becomes "ControlPlane". (which is the name of the stack which holds the vpc components in a kube-aws pre 0.11 cluster) | ||
# For clearity it is advised also rename the stack of the controlPlane components to, for example, "masters" | ||
# Note that this will keep some legacy naming around in your configs and CF stacks... | ||
#stackNameOverride: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit but:
cloudformation:
stackNameOverrides:
...
sounds slightly nicer to me because it expresses you can one or more stack names customized, and it works in term of CloudFormation.
Because it is part of the cloudformation config in cluster.yaml.
Yeah this maybe was a mistake on our side that we're now stuck with. Luckily, this PR fixes the problems for us for now!
I submitted two PRs for the v0.11.x and v0.12.x branches:
Thnx for the feedback! I fixed this in a5a359b. @mumoshu Let me know, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks a lot for contributing this!
This is the rework of kubernetes-retired#1484 after the huge refactorign
) * feat: add CF stackNameOverride in cluster.yaml Add option in cluster.yaml to override the name of CF controlPlane, network and etcd stacks. This is useful for migration of CF stacks from kube-aws <0.11.x without creating a new VPC. * wrap stackNameOverrides into cloudformation config Because it is part of the cloudformation config in cluster.yaml.
Kube-aws 0.11.x introduced a separate CloudFormation network stack. AWS VPCs are not movable between two CloudFormation stacks. This means that Kube-aws 0.11.x will create a new VPC when upgrading.
Because we added some extra LoadBalancers and RDS Databases that we cannot easily migrate to another VPC without downtime, creating a new VPC is not desired for us.
Therefore, we decided to keep the network stack in the original control plane stack and instead moved the control plane to a new separate stack. This means that we can stick with the original VPC.
The easiest way to do this with Kube-aws without adding legacy code, is by allowing the user to override the CF stacks names of the control plane, network and etcd stacks in cluster.yaml.
This PR adds an option in cluster.yaml to override the name of the CF controlPlane,
network and etcd stacks.