Skip to content

Commit cbb12fa

Browse files
committed
Move watch to pre-apply
1 parent 8081eb5 commit cbb12fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/patterns/declarative/watch.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ type clusterWatch struct {
151151
registered map[string]struct{}
152152
}
153153

154-
// AfterApply is called by the controller after an apply. We establish any new watches.
155-
func (w *clusterWatch) AfterApply(ctx context.Context, op *ApplyOperation) error {
154+
// BeforeApply is called by the controller before an apply. We establish any new watches that will be needed by the apply.
155+
func (w *clusterWatch) BeforeApply(ctx context.Context, op *ApplyOperation) error {
156156
log := log.FromContext(ctx)
157157

158158
labelSelector, err := labels.ValidatedSelectorFromSet(w.labelMaker(ctx, op.Subject))

0 commit comments

Comments
 (0)