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

Fix disabling spot instances when using launch templates #10198

Merged
merged 2 commits into from
Nov 9, 2020

Conversation

hakman
Copy link
Member

@hakman hakman commented Nov 8, 2020

Some extra fixes after #10187, to be able to remove the SpotPrice when already set.

/cc @rifelpet

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 8, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

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

@k8s-ci-robot k8s-ci-robot added area/provider/aws Issues or PRs related to aws provider approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 8, 2020
@hakman hakman force-pushed the fix-spot-instance-2 branch 4 times, most recently from 17819d5 to 6df9c2f Compare November 8, 2020 12:50
@hakman
Copy link
Member Author

hakman commented Nov 8, 2020

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 8, 2020
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 8, 2020
@hakman hakman changed the title Fix auto scaling group removal when using spot instances Fix disabling spot instances when using launch templates Nov 8, 2020
@hakman
Copy link
Member Author

hakman commented Nov 8, 2020

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 8, 2020
@@ -456,8 +456,8 @@ func (v *AutoscalingGroup) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *Autos

if changes.LaunchTemplate != nil {
spec := &autoscaling.LaunchTemplateSpecification{
LaunchTemplateId: changes.LaunchTemplate.ID,
Version: &launchTemplateVersion,
LaunchTemplateName: changes.LaunchTemplate.ID,
Copy link
Member

Choose a reason for hiding this comment

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

I'm just curious, why is this change necessary?

Copy link
Member Author

Choose a reason for hiding this comment

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

There is some strange mix in the current code as you can see in other sections of the file:

LaunchTemplateName: e.LaunchTemplate.ID,

This will be changed in #10151 where I tested the fix initially and this is why the current "mismatch".

@rifelpet
Copy link
Member

rifelpet commented Nov 9, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 9, 2020
@k8s-ci-robot k8s-ci-robot merged commit ecea477 into kubernetes:master Nov 9, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.20 milestone Nov 9, 2020
@hakman hakman deleted the fix-spot-instance-2 branch November 9, 2020 13:33
k8s-ci-robot added a commit that referenced this pull request Nov 9, 2020
…10198-upstream-release-1.19

Automated cherry pick of #10187: Fix auto scaling group changes when using spot instances #10198: Fix mismatch between expected launch template Name and ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/aws Issues or PRs related to aws provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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

3 participants