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

default spec.spotMaxPrice in AzureManagedMachinePool #4126

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

nojnhuh
Copy link
Contributor

@nojnhuh nojnhuh commented Oct 13, 2023

What type of PR is this?
/kind bug

What this PR does / why we need it:

This PR fixes the AzureManagedMachinePool controller from futilely endlessly reconciling based on a diff when no spec.spotMaxPrice is defined for CAPZ and the value for the AKS resource in Azure gets defaulted to -1. This PR adds logic to the defaulting webhook that will mirror the same defaulting done by AKS for Spot node pools.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #4112

Special notes for your reviewer:

  • cherry-pick candidate <- to 1.11, this feature does not exist in 1.10

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

Fixed a bug that caused AzureManagedMachinePools to endlessly reconcile Spot node pools when no `spec.spotMaxPrice` is set

@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. labels Oct 13, 2023
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 13, 2023
@nojnhuh
Copy link
Contributor Author

nojnhuh commented Oct 13, 2023

/cherry-pick release-1.11

@k8s-infra-cherrypick-robot

@nojnhuh: once the present PR merges, I will cherry-pick it on top of release-1.11 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.11

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.

Copy link
Contributor

@jackfrancis jackfrancis 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 Oct 13, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: a897fb973f2c9ce5d60f828957df9c50b59ea4dd

@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (30d08b2) 57.66% compared to head (6856444) 57.66%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4126   +/-   ##
=======================================
  Coverage   57.66%   57.66%           
=======================================
  Files         188      188           
  Lines       19320    19323    +3     
=======================================
+ Hits        11140    11143    +3     
  Misses       7548     7548           
  Partials      632      632           
Files Coverage Δ
api/v1beta1/azuremanagedmachinepool_webhook.go 81.56% <100.00%> (+0.13%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 13, 2023
Copy link
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

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

/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 13, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 2d64b2eaec5cb7c0fa10638ac381b44fd07e87ea

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon

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 13, 2023
@k8s-ci-robot
Copy link
Contributor

@nojnhuh: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-azure-windows-containerd-upstream-with-ci-artifacts 6856444 link false /test pull-cluster-api-provider-azure-windows-containerd-upstream-with-ci-artifacts

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@nojnhuh
Copy link
Contributor Author

nojnhuh commented Oct 13, 2023

/retest

@k8s-ci-robot k8s-ci-robot merged commit 8b3a1cf into kubernetes-sigs:main Oct 13, 2023
10 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.12 milestone Oct 13, 2023
@k8s-infra-cherrypick-robot

@nojnhuh: new pull request created: #4128

In response to this:

/cherry-pick release-1.11

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.

@nojnhuh nojnhuh deleted the aks-spot-diff branch October 13, 2023 21:18
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. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[AzureManagedCluster][Spot] AzureManagedMachinePool fluctuating between Running and Provisioned states
5 participants