Skip to content

Commit

Permalink
fix: make MachineSetNodeController handle machinesets without clusters
Browse files Browse the repository at this point in the history
Ignore such machine sets instead of failing, as fail leads to all other
machine sets being skipped.

Fixes: #208

Signed-off-by: Artem Chernyshev <[email protected]>
  • Loading branch information
Unix4ever committed May 6, 2024
1 parent fa3c9ff commit 89fa1ad
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ func (ctrl *MachineSetNodeController) reconcileMachineSet(
return nil
}

//nolint:gocognit
func (ctrl *MachineSetNodeController) createNodes(
ctx context.Context,
r controller.Runtime,
Expand All @@ -249,6 +250,10 @@ func (ctrl *MachineSetNodeController) createNodes(

cluster, err := safe.ReaderGetByID[*omni.Cluster](ctx, r, clusterName)
if err != nil {
if state.IsNotFoundError(err) {
return nil
}

return err
}

Expand Down

0 comments on commit 89fa1ad

Please sign in to comment.