Skip to content

Commit

Permalink
Add default subnet in custom vpc to the beginning of the list (#4826)
Browse files Browse the repository at this point in the history
Signed-off-by: Karol Szwaj <[email protected]>
  • Loading branch information
cnvergence authored Dec 24, 2024
1 parent cec47b5 commit 9aa076b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/controller/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ func (c *Controller) handleAddNamespace(key string) error {
return err
}
if s.Name == vpc.Spec.DefaultSubnet {
lss = []string{s.Name}
if slices.Contains(vpc.Spec.Namespaces, key) && key != metav1.NamespaceSystem {
lss = append([]string{s.Name}, lss...)
}
}
}
}
Expand Down

0 comments on commit 9aa076b

Please sign in to comment.