Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

fix: Partial upgrades with stack name overrides #1524

Merged
merged 1 commit into from
Jan 11, 2019

Conversation

koen92
Copy link
Contributor

@koen92 koen92 commented Jan 9, 2019

#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.

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.
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 9, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: c-knowles

If they are not already assigned, you can assign the PR to them by writing /assign @c-knowles in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@@ -4,27 +4,18 @@ import "strings"

// TODO: Add etcd
Copy link
Contributor Author

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?

Copy link
Contributor

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-io
Copy link

Codecov Report

Merging #1524 into v0.12.x will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a09fae4...cd14f27. Read the comment docs.

@koen92
Copy link
Contributor Author

koen92 commented Jan 9, 2019

/assign @mumoshu

@mumoshu
Copy link
Contributor

mumoshu commented Jan 9, 2019

@koen92 Thanks for your effort! Just to clarify, what was the exact issue? You had to say e.g. apply --targets network even what you wanted was updating only the network stack named control-plane?

@koen92
Copy link
Contributor Author

koen92 commented Jan 10, 2019

@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:

$ kube-aws-v0.12.0+dirty validate --targets control-plane
Validating UserData and stack template...
generating assets for control-plane
updating template url of control-plane
Error: failed to find assets for stack control-plane: [bug] failed to get the asset for the id "{control-plane stack.json}"

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).

@mumoshu
Copy link
Contributor

mumoshu commented Jan 11, 2019

Ah, makes sense. And I think we have no other way to fix the issue. Good job 👍

@mumoshu mumoshu merged commit 8898234 into kubernetes-retired:v0.12.x Jan 11, 2019
@mumoshu mumoshu added this to the v0.12.1 milestone Jan 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants