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

add option for disabling instance refresh #3730

Merged

Conversation

harveyxia
Copy link
Contributor

@harveyxia harveyxia commented Sep 12, 2022

What type of PR is this?

/kind feature
/kind api-change

What this PR does / why we need it:

Fixes #3447

Special notes for your reviewer:

I was hoping for guidance/feedback on the following:

  1. API representation—I added a new AWSMachinePool.spec.disableInstanceRefresh boolean field. This preserves existing behavior, which is to perform instance refresh when new launch templates are detected. Users that require disabling instance refresh will explicitly specify this field as false.
  2. Testing—I was sure how best to test this change, there doesn't appear to be any existing test coverage of ReconcileLaunchTemplate's runPostLaunchTemplateUpdateOperation (link).

Checklist:

  • squashed commits
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 12, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: harveyxia / name: Harvey Xia (a63c6184e30ca4595c568453838a6ef243a27917)

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-priority labels Sep 12, 2022
@k8s-ci-robot
Copy link
Contributor

Welcome @harveyxia!

It looks like this is your first PR to kubernetes-sigs/cluster-api-provider-aws 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api-provider-aws has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @harveyxia. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 12, 2022
@harveyxia harveyxia force-pushed the disable-asg-instance-refresh branch 2 times, most recently from ced0eb5 to a63c618 Compare September 12, 2022 20:53
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Sep 12, 2022
@sedefsavas
Copy link
Contributor

I think disabling instance refresh can go under RefreshPreferences logically as @mweibel mentioned in the issue:

@mweibel any thoughts?

@sedefsavas
Copy link
Contributor

/hold
until #3720 is merged.

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. 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 Sep 13, 2022
@mweibel
Copy link
Contributor

mweibel commented Sep 20, 2022

Makes sense! I'd rename it to just Disabled since RefreshPreferences.DisableInstanceRefresh is a little redundant, but that's a detail.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 21, 2022
@sedefsavas
Copy link
Contributor

/hold cancel

@k8s-ci-robot k8s-ci-robot added do-not-merge/contains-merge-commits and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Sep 22, 2022
@harveyxia
Copy link
Contributor Author

@sedefsavas this should be good to review now

@sedefsavas
Copy link
Contributor

We need conversion for the new field.
An example of how to add conversion here

I don't know how Fuzzy conversion test did not catch this though, any ideas @richardcase?

@harveyxia
Copy link
Contributor Author

@sedefsavas Gentle bump, any chance I could get a review? Thank you!

@richardcase
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 10, 2022
@richardcase
Copy link
Member

/test ?

@k8s-ci-robot
Copy link
Contributor

@richardcase: The following commands are available to trigger required jobs:

  • /test pull-cluster-api-provider-aws-build
  • /test pull-cluster-api-provider-aws-test
  • /test pull-cluster-api-provider-aws-verify

The following commands are available to trigger optional jobs:

  • /test pull-cluster-api-provider-aws-apidiff-main
  • /test pull-cluster-api-provider-aws-e2e
  • /test pull-cluster-api-provider-aws-e2e-blocking
  • /test pull-cluster-api-provider-aws-e2e-clusterclass
  • /test pull-cluster-api-provider-aws-e2e-conformance
  • /test pull-cluster-api-provider-aws-e2e-conformance-with-ci-artifacts
  • /test pull-cluster-api-provider-aws-e2e-eks

Use /test all to run the following jobs that were automatically triggered:

  • pull-cluster-api-provider-aws-apidiff-main
  • pull-cluster-api-provider-aws-build
  • pull-cluster-api-provider-aws-test
  • pull-cluster-api-provider-aws-verify

In response to this:

/test ?

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@richardcase
Copy link
Member

/test pull-cluster-api-provider-aws-e2e
/test pull-cluster-api-provider-aws-e2e-eks

@harveyxia
Copy link
Contributor Author

/retest

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 13, 2022
@richardcase
Copy link
Member

@harveyxia - thanks for this change. Would you be able to rebase it?

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 13, 2022
@harveyxia
Copy link
Contributor Author

@richardcase should be good to go now, thanks!

@harveyxia
Copy link
Contributor Author

/test pull-cluster-api-provider-aws-e2e
/test pull-cluster-api-provider-aws-e2e-eks

@harveyxia
Copy link
Contributor Author

/retest

@harveyxia
Copy link
Contributor Author

/test pull-cluster-api-provider-aws-e2e

@harveyxia
Copy link
Contributor Author

/test pull-cluster-api-provider-aws-e2e-eks

@richardcase
Copy link
Member

/test pull-cluster-api-provider-aws-e2e-eks

@richardcase
Copy link
Member

/kind feature
/kind api-change

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Oct 14, 2022
@richardcase
Copy link
Member

Thanks for this @harveyxia 👍

/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 Oct 14, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: richardcase

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 Oct 14, 2022
@k8s-ci-robot k8s-ci-robot merged commit b58d614 into kubernetes-sigs:main Oct 14, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.x milestone Oct 14, 2022
@harveyxia harveyxia deleted the disable-asg-instance-refresh branch October 14, 2022 19:33
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. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

Disable MachinePool ASG instance refresh
5 participants