Skip to content

Commit 6a06b78

Browse files
author
Valeriy Khorunzhin
committed
fix vi vd watcher
Signed-off-by: Valeriy Khorunzhin <[email protected]>
1 parent 57e125f commit 6a06b78

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

images/virtualization-artifact/pkg/controller/vi/internal/watcher/virdualdisk_watcher.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,17 @@ func (w *VirtualDiskWatcher) enqueueRequestsFromVDs(ctx context.Context, vd *vir
104104
})
105105
}
106106

107+
if vd.Spec.DataSource != nil && vd.Spec.DataSource.Type == virtv2.DataSourceTypeObjectRef {
108+
if vd.Spec.DataSource.ObjectRef != nil && vd.Spec.DataSource.ObjectRef.Kind == virtv2.VirtualImageKind {
109+
// Need to trigger reconcile for update InUse condition.
110+
requests = append(requests, reconcile.Request{
111+
NamespacedName: types.NamespacedName{
112+
Name: vd.Spec.DataSource.ObjectRef.Name,
113+
Namespace: vd.Namespace,
114+
},
115+
})
116+
}
117+
}
118+
107119
return
108120
}

0 commit comments

Comments
 (0)