-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crdwatcher: Reuse watcher.K8sWatcher to watch TracingPolicy
Before, to watch TracingPolicy(Namespaced) custom resources, we were reading Kubernetes config, creating an informer factory and starting it, all in the WatchTracePolicy function. As now the watcher.K8sWatcher struct initializes informer factories, we can reuse it instead of configuring everything from scratch. This commit replaces the WatchTracePolicy function with AddTracingPolicyInformer, which only adds informers to the K8sWatcher. Initialization and start of the K8sWatcher happen in main. Signed-off-by: Anna Kapuscinska <[email protected]>
- Loading branch information
Showing
3 changed files
with
44 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters