Skip to content

Conversation

fiunchinho
Copy link
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

When the spot instances options are changed, we want to update the launch template so that the changes take effect.

Special notes for your reviewer:

I've changed the unit tests for the LaunchTemplateNeedsUpdate function, because some cases were passing by pure chance. Basically these security groups are always added to the incoming AWSLaunchTemplate

{ID: aws.String("sg-111")},
{ID: aws.String("sg-222")},

So if the existing AWSLaunchTemplate that we use in the tests don't have these security groups, the function will always return true. Tests like the one testing changes to the IamInstanceProfile field were passing because of the different security groups, rather than the change on the IamInstanceProfile field.

Checklist:

  • squashed commits
  • includes documentation
  • includes emoji in title
  • adds unit tests
  • adds or updates e2e tests

Release note:

LaunchTemplate needs to be updated if spot options are changed

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 15, 2025
@k8s-ci-robot k8s-ci-robot requested review from dlipovetsky and faiq May 15, 2025 13:24
@fiunchinho
Copy link
Contributor Author

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

Copy link
Contributor

@alexander-demicev alexander-demicev left a comment

Choose a reason for hiding this comment

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

/lgtm

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

LGTM label has been added.

Git tree hash: d778b6d36ce012772b2bb23779e7a386fca21354

@fiunchinho fiunchinho force-pushed the fix-launchtemplate-needs-update branch from 99f00ed to 4a57ee5 Compare May 18, 2025 16:51
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 18, 2025
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 18, 2025
@fiunchinho fiunchinho force-pushed the fix-launchtemplate-needs-update branch 2 times, most recently from 6f3953d to e0d5e11 Compare May 19, 2025 13:23
@fiunchinho fiunchinho force-pushed the fix-launchtemplate-needs-update branch from e0d5e11 to 99c1047 Compare May 19, 2025 13:25
@fiunchinho
Copy link
Contributor Author

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

@fiunchinho
Copy link
Contributor Author

@alexander-demicev After testing the changes in our management cluster, I needed to do more changes to make this work. PTAL, thanks.

@fiunchinho
Copy link
Contributor Author

/assign @richardcase @nrb

@nrb
Copy link
Contributor

nrb commented May 21, 2025

/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 May 21, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 02415027f639a72267bbf198afc6bf2cbaa01b86

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nrb

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 May 21, 2025
@k8s-ci-robot k8s-ci-robot merged commit f8ec0c6 into kubernetes-sigs:main May 21, 2025
19 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v2.8 milestone May 21, 2025
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/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants