Skip to content

Commit 6db0f6f

Browse files
committed
SQUASH: Allow raw source
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
1 parent ca692b1 commit 6db0f6f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pkg/builder/controller.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -355,19 +355,19 @@ func (blder *Builder) doWatch() error {
355355
if len(blder.watchesInput) == 0 && blder.forInput.object == nil && len(blder.rawSources) == 0 {
356356
return errors.New("there are no watches configured, controller will never get triggered. Use For(), Owns(), Watches() or WatchesRawSource() to set them up")
357357
}
358-
if *blder.ctrlOptions.EngageWithProviderClusters && len(blder.rawSources) > 0 {
359-
return errors.New("when using a cluster adapter, custom raw watches are not allowed")
358+
if !*blder.ctrlOptions.EngageWithDefaultCluster && len(blder.rawSources) > 0 {
359+
return errors.New("when using a cluster adapter without watching the default cluster, non-cluster-aware custom raw watches are not allowed")
360360
}
361361

362362
if *blder.ctrlOptions.EngageWithDefaultCluster {
363363
if err := blder.Watch(unboundedContext, blder.mgr); err != nil {
364364
return err
365365
}
366-
}
367366

368-
for _, src := range blder.rawSources {
369-
if err := blder.ctrl.Watch(src); err != nil {
370-
return err
367+
for _, src := range blder.rawSources {
368+
if err := blder.ctrl.Watch(src); err != nil {
369+
return err
370+
}
371371
}
372372
}
373373
return nil

0 commit comments

Comments
 (0)