openshift / openshift/hypershift
fix(nodepool): add spot MHC cleanup on NodePool deletion
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 541
- Forks
- 567
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 136
Description
Background
When a NodePool with spot instances enabled is deleted, the deletion path in nodepool_controller.go (around line 527) only cleans up the regular MHC, not the spot-specific MHC (<nodepool-name>-spot).
This can leave orphaned spot MHC resources in the control plane namespace after the NodePool is removed.
Proposed Change
Update the NodePool deletion path to also delete the spot MHC alongside the regular MHC.
Context
- Identified during review of PR #8645
- The spot MHC is created in
reconcileSpotMachineHealthCheckwith the name pattern<nodepool-name>-spot
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in nodepool_controller.go around the NodePool deletion path near line 527, then review reconcileSpotMachineHealthCheck to confirm the spot MHC naming pattern. Ensure deletion handles both the regular MHC and the -spot resource, and verify that no orphaned spot MHC remains after NodePool deletion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- backend, infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100