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

cherry-pick(1.28): HasInstance implementation #7114

Conversation

Bryce-Soghigian
Copy link
Member

What type of PR is this?

/kind feature

What this PR does / why we need it:

This pr cherry picks HasInstance into 1.28 #6956

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. 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 Aug 2, 2024
@k8s-ci-robot k8s-ci-robot requested a review from feiskyer August 2, 2024 17:16
@k8s-ci-robot k8s-ci-robot added the area/provider/azure Issues or PRs related to azure provider label Aug 2, 2024
@k8s-ci-robot k8s-ci-robot requested a review from tallaxes August 2, 2024 17:16
@Bryce-Soghigian Bryce-Soghigian changed the title feat: HasInstance implementation cherry-pick(1.28): HasInstance implementation Aug 2, 2024
fix: ci lint

refactor: cloudprovider HasInstance should use case sensitive instance group lookup

feat: using NodeGroupForNode for the azure provider has instance implementation

fix: ci lint

fix: ci

wip: HasInstance impl based on a fork of NodeGroupForNode

refactor: refactoring tests and sharing validation between ngfornode + hasinstance

test: removing commented out test

ci: fix formatting

fix: properly handling unmanaged nodes

fix: removing unused helper

fix: using provider id to get scaleset name

fix: putting items into the set as lowercase to avoid mismatch in lookup

Update cluster-autoscaler/cloudprovider/azure/azure_cloud_provider.go

Co-authored-by: Alex Leites <[email protected]>

fix: always fallback if we are unsure an instance is in the cache

test: adding back in TestNodeGroupForNodeWithNoProviderID

refactor: removing log lines since this will spam for non-autoscaled nodes

refactor: removing dead code

fix: simplifying logic since we no longer distinguish on delete

Update cluster-autoscaler/cloudprovider/azure/azure_cache.go

test: renaming test to better reflect the scenario

Update cluster-autoscaler/cloudprovider/azure/azure_cache.go

Co-authored-by: Alex Leites <[email protected]>

refactor: removing shared helpers since they are no longer shared and didnt make any sense in the first place

refactor: removing unused code and adding a test for has instance happy path

Update cluster-autoscaler/cloudprovider/azure/azure_cache.go

ci: lint

Update cluster-autoscaler/cloudprovider/azure/azure_cache.go

Co-authored-by: Alex Leites <[email protected]>

ci: lint
@Bryce-Soghigian Bryce-Soghigian force-pushed the bsoghigian/cp/hasinstance branch from 230b51a to c2c53d5 Compare August 2, 2024 17:19
@tallaxes
Copy link
Contributor

tallaxes commented Aug 2, 2024

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Aug 2, 2024
@tallaxes
Copy link
Contributor

tallaxes commented Aug 2, 2024

/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 Aug 2, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Bryce-Soghigian, tallaxes

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 Aug 2, 2024
@k8s-ci-robot k8s-ci-robot merged commit 36c12f3 into kubernetes:cluster-autoscaler-release-1.28 Aug 2, 2024
6 of 7 checks passed
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. area/provider/azure Issues or PRs related to azure provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

3 participants