File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
components/node-labeler/cmd Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -29,10 +29,12 @@ import (
29
29
"sigs.k8s.io/controller-runtime/pkg/builder"
30
30
"sigs.k8s.io/controller-runtime/pkg/client"
31
31
"sigs.k8s.io/controller-runtime/pkg/controller"
32
+ "sigs.k8s.io/controller-runtime/pkg/handler"
32
33
"sigs.k8s.io/controller-runtime/pkg/healthz"
33
34
"sigs.k8s.io/controller-runtime/pkg/metrics"
34
35
"sigs.k8s.io/controller-runtime/pkg/predicate"
35
36
"sigs.k8s.io/controller-runtime/pkg/reconcile"
37
+ "sigs.k8s.io/controller-runtime/pkg/source"
36
38
37
39
"github.com/gitpod-io/gitpod/common-go/log"
38
40
)
@@ -84,7 +86,12 @@ var runCmd = &cobra.Command{
84
86
85
87
err = ctrl .NewControllerManagedBy (mgr ).
86
88
Named ("pod-watcher" ).
87
- For (& corev1.Pod {}, builder .WithPredicates (filterPredicate )).
89
+ For (& corev1.Pod {}).
90
+ Watches (
91
+ & source.Kind {Type : & corev1.Pod {}},
92
+ & handler.EnqueueRequestForObject {},
93
+ builder .WithPredicates (filterPredicate ),
94
+ ).
88
95
WithOptions (controller.Options {
89
96
MaxConcurrentReconciles : 20 ,
90
97
}).
You can’t perform that action at this time.
0 commit comments