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

Handle edge case as described in issue #328 #335

Conversation

rishabh-11
Copy link

What this PR does / why we need it:
This PR modifies the Refresh method of CA to reset the priority annotation on the machine objects only if the number of annotated machines is more than desired. The desired count is totalMachines - mcd.Spec.Replicas. Terminating and Failed machines are excluded while calculating the total number of annotated machines.

Which issue(s) this PR fixes:
Fixes #328

Special notes for your reviewer:

Release note:

The Refresh method resets the priority annotation on machines with priority 1 to match the desired count. Refer to the PR for details on how the desired count is calculated.

@rishabh-11 rishabh-11 requested review from unmarshall and a team as code owners November 14, 2024 09:15
@gardener-robot gardener-robot added needs/review Needs review size/m Size of pull request is medium (see gardener-robot robot/bots/size.py) labels Nov 14, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 14, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Nov 14, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Nov 14, 2024
@gardener-robot gardener-robot added the needs/changes Needs (more) changes label Nov 15, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 20, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 20, 2024
Copy link

@unmarshall unmarshall left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging and removed needs/changes Needs (more) changes needs/review Needs review labels Nov 25, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 25, 2024
@rishabh-11 rishabh-11 merged commit 45e190f into gardener:machine-controller-manager-provider Nov 25, 2024
10 checks passed
@rishabh-11 rishabh-11 deleted the fix-edge-case branch November 25, 2024 07:05
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Nov 25, 2024
rishabh-11 added a commit to rishabh-11/autoscaler that referenced this pull request Nov 25, 2024
* handle edge case as described in issue gardener#328

* address review comments
rishabh-11 added a commit that referenced this pull request Nov 25, 2024
* handle edge case as described in issue #328

* address review comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) reviewed/lgtm Has approval for merging reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) size/m Size of pull request is medium (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix edge case mentioned in https://github.com/gardener/autoscaler/pull/215
7 participants