Skip to content

Commit e65bef2

Browse files
committed
set watch option
1 parent c65629b commit e65bef2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main.go

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import (
2929
"github.com/spf13/pflag"
3030
colfeaturegate "go.opentelemetry.io/collector/featuregate"
3131
networkingv1 "k8s.io/api/networking/v1"
32+
"k8s.io/apimachinery/pkg/labels"
3233
k8sruntime "k8s.io/apimachinery/pkg/runtime"
3334
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
3435
"k8s.io/client-go/kubernetes"
@@ -275,6 +276,9 @@ func main() {
275276
}),
276277
Cache: cache.Options{
277278
DefaultNamespaces: namespaces,
279+
DefaultLabelSelector: labels.SelectorFromSet(map[string]string{
280+
"app.kubernetes.io/managed-by": "opentelemetry-operator",
281+
}),
278282
},
279283
}
280284

0 commit comments

Comments
 (0)