-
Notifications
You must be signed in to change notification settings - Fork 295
fix: Partial upgrades with stack name overrides #1524
Conversation
kubernetes-retired#1487 introduced a bug when doing a partial stack upgrade with a stack name override. This is fixed by using the actual stack name in operation targets instead of the hard coded constants.
[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 |
@@ -4,27 +4,18 @@ import "strings" | |||
|
|||
// TODO: Add etcd |
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.
Don't know if this TODO comment is still relevant?
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.
Seems irrelevant now. Good catch!
Codecov Report
@@ Coverage Diff @@
## v0.12.x #1524 +/- ##
========================================
Coverage 37.86% 37.86%
========================================
Files 75 75
Lines 4608 4608
========================================
Hits 1745 1745
Misses 2620 2620
Partials 243 243 Continue to review full report at Codecov.
|
/assign @mumoshu |
@koen92 Thanks for your effort! Just to clarify, what was the exact issue? You had to say e.g. |
@mumoshu Thank you for your time! When we try to do a partial validate and/or apply to only the Controlplane (or other target that has been renamed via the stackNameOverride option), we get the following error:
This happens because kube-aws checks for a hard coded Controlplane name (see https://github.com/kubernetes-incubator/kube-aws/blob/v0.12.x/core/root/operation_targets.go#L56 and https://github.com/kubernetes-incubator/kube-aws/blob/v0.12.x/core/root/operation_targets.go#L7 ). With this PR I made this check dynamic and based on the actual Controlplane name (that is either 'control-plane' or the user provided name via cloudFormation.stackNameOverrides.controlPlane in cluster.yaml). |
Ah, makes sense. And I think we have no other way to fix the issue. Good job 👍 |
#1487 introduced a
bug when doing a partial stack upgrade with a stack name override.
This is fixed by using the actual stack names in operation targets
instead of the hard coded constants.