Skip to content

Cleanup Orphan node objects - #9

Merged
shafinhasnat merged 2 commits into
masterfrom
HPB-5875
Oct 30, 2025
Merged

shafinhasnat merged 2 commits into
masterfrom
HPB-5875

Conversation

@shafinhasnat

Copy link
Copy Markdown

What type of PR is this?

What this PR does / why we need it:

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.:


if err != nil {
return fmt.Errorf("failed to get in-cluster config: %v", err)
}
clientset, err := kubernetes.NewForConfig(config)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion: consider a helper to initialise and reuse the client

Comment thread cluster-autoscaler/cloudprovider/hyperstack/hyperstack_kubernetes.go Outdated

// Refresh updates manager node groups from the provider state.
func (m *Manager) Refresh() error {
defer CleanUpOrphanNodeObject()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion: consider wrapping in a function that logs if cleanup fails so that errors aren't silently discarded.

@shafinhasnat
shafinhasnat merged commit 6c2e863 into master Oct 30, 2025
3 of 5 checks passed
@shafinhasnat
shafinhasnat deleted the HPB-5875 branch October 30, 2025 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants