Skip to content

Commit

Permalink
fix renamed field in VM status
Browse files Browse the repository at this point in the history
Signed-off-by: yaroslavborbat <yaroslav.752@gmail.com>
  • Loading branch information
yaroslavborbat authored and diafour committed Apr 26, 2024
1 parent d6ab3e2 commit 9b08bae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions images/vmi-router/netlinkmanager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func (m *Manager) isManagedIP(ip string) (bool, error) {
func (m *Manager) UpdateRoute(ctx context.Context, vm *virtv1alpha2.VirtualMachine) {
// TODO Add cleanup if node was lost?
// TODO What about migration? Is nodeName just changed to new node or we need some workarounds when 2 Pods are running?
if vm.Status.NodeName == "" {
if vm.Status.Node == "" {
// VMI has no node assigned
return
}
Expand Down Expand Up @@ -222,7 +222,7 @@ func (m *Manager) UpdateRoute(ctx context.Context, vm *virtv1alpha2.VirtualMachi

// Retrieve a Cilium Node by VMs node name.
ciliumNode := &ciliumv2.CiliumNode{}
err = m.client.Get(ctx, types.NamespacedName{Namespace: "", Name: vm.Status.NodeName}, ciliumNode)
err = m.client.Get(ctx, types.NamespacedName{Namespace: "", Name: vm.Status.Node}, ciliumNode)
if err != nil {
m.log.Error(err, "failed to get cilium node for vmi")
}
Expand Down

0 comments on commit 9b08bae

Please sign in to comment.