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

Update tags support for LaunchTemplates #8466

Merged
merged 1 commit into from
Feb 21, 2020

Conversation

hakman
Copy link
Member

@hakman hakman commented Feb 3, 2020

Launch Templates are the recommended way of creating an ASG in AWS and allows specifying various options that are not possible with Launch Configurations.
https://docs.aws.amazon.com/autoscaling/ec2/userguide/LaunchTemplates.html

This is a followup of #8462 with the following improvements:

  • adds remaining cloud tags
  • checks for changes before applying new tags

This is a bit more complicated as it has to account Launch Configurations, Mixed Instance Policies and Launch Templates at same time.
A lot of testing is also required to avoid breaking existing features.

@johngmyers as I said during office hours, I am looking into this for some time. If you plan to do any other changes in this area, we should sync so that we don't duplicate the effort.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 3, 2020
@johngmyers
Copy link
Member

This would be easier to review if the separate concerns were in separate commits.

@johngmyers
Copy link
Member

Once we get Terraform and Cloudformation support, I was thinking we'd change the following setting to be false when using launch templates:

PropagateAtLaunch: aws.Bool(true),

I don't have any changes planned in this area other than seeing if we can change the default value of the EnableLaunchTemplates feature flag.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 4, 2020
@hakman hakman changed the title [WIP] Update tags support for LaunchTemplates Update tags support for LaunchTemplates Feb 4, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 4, 2020
@hakman
Copy link
Member Author

hakman commented Feb 4, 2020

Separated the CF and TF support for a future PR. This one is pretty easy to review now.

@hakman
Copy link
Member Author

hakman commented Feb 4, 2020

/cc @rifelpet

@hakman
Copy link
Member Author

hakman commented Feb 21, 2020

@rifelpet I think this is finally ready to go. Thanks!

@rifelpet
Copy link
Member

hm is CloudTagsForInstanceGroup not used when we target terraform? I would expect some of the terraform integration test files to require updating.

@hakman
Copy link
Member Author

hakman commented Feb 21, 2020

The initial commit contained terraform and cloudformation files also, but I was asked to split them to make it easier to review.
f434b48

@rifelpet
Copy link
Member

right, but I would think that CloudTagsForInstanceGroup is used by both "direct" and "terraform" targets. What additional change to the terraform target needs to be made?

Ah, I see that the terraform target doesnt mention tags at all so we'll need to plumb that through before the terraform integration tests require updating. 👍 makes sense now.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman, rifelpet

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 21, 2020
@hakman
Copy link
Member Author

hakman commented Feb 21, 2020

My general impression with this is that the direct target needs a lot of "love". There are warning during cluster setup (resource order), there are warnings on delete, launch templates are not deleted on cluster delete, ...

Terraform and CF targets also need a bit of tweaking, as they don't seem to work out of the box with EnableLaunchTemplates=true.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@hakman
Copy link
Member Author

hakman commented Feb 21, 2020

/retest

@hakman
Copy link
Member Author

hakman commented Feb 21, 2020

/retest

1 similar comment
@hakman
Copy link
Member Author

hakman commented Feb 21, 2020

/retest

@k8s-ci-robot k8s-ci-robot merged commit 0aa97af into kubernetes:master Feb 21, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.18 milestone Feb 21, 2020
@hakman hakman deleted the fix-launch-template-tags branch March 1, 2020 05:39
k8s-ci-robot added a commit that referenced this pull request Mar 27, 2020
…8466-upstream-release-1.16

Automated cherry pick of #8462: Tag EBS volumes when using launch templates with AWS API #8466: Update tags support for LaunchTemplates
k8s-ci-robot added a commit that referenced this pull request Mar 27, 2020
…8466-upstream-release-1.17

Automated cherry pick of #8462: Tag EBS volumes when using launch templates with AWS API #8466: Update tags support for LaunchTemplates
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. 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

5 participants