openshift / openshift/hypershift

fix(nodepool): add spot MHC cleanup on NodePool deletion

Open Beginner friendly
#8,736 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

lifecycle/stale
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 reconcileSpotMachineHealthCheck with the name pattern <nodepool-name>-spot

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.