File tree Expand file tree Collapse file tree 1 file changed +7
-16
lines changed
components/node-labeler/cmd Expand file tree Collapse file tree 1 file changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -80,29 +80,20 @@ var runCmd = &cobra.Command{
80
80
client ,
81
81
}
82
82
83
- rfPredicate , err := predicate .LabelSelectorPredicate (metav1.LabelSelector {
84
- MatchLabels : map [string ]string {
85
- "app" : "gitpod" ,
86
- "component" : "registry-facade" ,
87
- },
88
- })
89
- if err != nil {
90
- log .WithError (err ).Fatal ("unable to create predicate" )
91
- }
92
-
93
- wsPredicate , err := predicate .LabelSelectorPredicate (metav1.LabelSelector {
94
- MatchLabels : map [string ]string {
95
- "app" : "gitpod" ,
96
- "component" : "ws-daemon" ,
97
- },
83
+ componentPredicate , err := predicate .LabelSelectorPredicate (metav1.LabelSelector {
84
+ MatchExpressions : []metav1.LabelSelectorRequirement {{
85
+ Key : "component" ,
86
+ Operator : metav1 .LabelSelectorOpIn ,
87
+ Values : []string {"ws-daemon" , "registry-facade" },
88
+ }},
98
89
})
99
90
if err != nil {
100
91
log .WithError (err ).Fatal ("unable to create predicate" )
101
92
}
102
93
103
94
err = ctrl .NewControllerManagedBy (mgr ).
104
95
Named ("pod-watcher" ).
105
- For (& corev1.Pod {}, builder .WithPredicates (predicate .Or (rfPredicate , wsPredicate ))).
96
+ For (& corev1.Pod {}, builder .WithPredicates (predicate .Or (componentPredicate ))).
106
97
WithOptions (controller.Options {MaxConcurrentReconciles : 1 }).
107
98
Complete (r )
108
99
if err != nil {
You can’t perform that action at this time.
0 commit comments