File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
pkg/controller/operators/olm Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -453,12 +453,21 @@ func (a *Operator) now() metav1.Time {
453
453
}
454
454
455
455
func (a * Operator ) syncSubscription (obj interface {}) error {
456
- _ , ok := obj .(* v1alpha1.Subscription )
456
+ sub , ok := obj .(* v1alpha1.Subscription )
457
457
if ! ok {
458
458
a .logger .Debugf ("wrong type: %#v\n " , obj )
459
459
return fmt .Errorf ("casting Subscription failed" )
460
460
}
461
461
462
+ installedCSV := sub .Status .InstalledCSV
463
+ if installedCSV != "" {
464
+ a .logger .WithField ("csv" , installedCSV ).Debug ("subscription has changed, requeuing installed csv" )
465
+ if err := a .csvQueueSet .Requeue (sub .GetNamespace (), installedCSV ); err != nil {
466
+ a .logger .WithField ("csv" , installedCSV ).Debug ("failed to requeue installed csv" )
467
+ return err
468
+ }
469
+ }
470
+
462
471
return nil
463
472
}
464
473
You can’t perform that action at this time.
0 commit comments