Skip to content

Commit

Permalink
Fix nodepool reconciliation issue (#327)
Browse files Browse the repository at this point in the history
* Fix reconciliation comparisons when there are no NSGs
  • Loading branch information
shyamradhakrishnan committed Sep 11, 2023
1 parent 4be9fc9 commit 3cff30b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cloud/scope/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ const (

// GetNsgNamesFromId returns the names of the NSGs with the provided IDs
func GetNsgNamesFromId(ids []string, nsgs []*infrastructurev1beta2.NSG) []string {
if len(ids) == 0 {
return nil
}
names := make([]string, 0)
for _, id := range ids {
for _, nsg := range nsgs {
Expand Down
1 change: 0 additions & 1 deletion exp/controllers/ocimanaged_machinepool_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ func (r *OCIManagedMachinePoolReconciler) reconcileManagedMachines(ctx context.C
specInfraMachines := make([]infrav2exp.OCIMachinePoolMachine, 0)
for _, node := range nodePool.Nodes {
// deleted/failing nodes should not be added to spec
machinePoolScope.Info(string(node.LifecycleState))
if node.LifecycleState == oke.NodeLifecycleStateDeleted || node.LifecycleState == oke.NodeLifecycleStateFailing {
continue
}
Expand Down

0 comments on commit 3cff30b

Please sign in to comment.