Skip to content

Commit

Permalink
Watch packet capture cr only for enterprise (#3323)
Browse files Browse the repository at this point in the history
  • Loading branch information
vara2504 committed Apr 23, 2024
1 parent 990caef commit ec36675
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/controller/apiserver/apiserver_controller.go
Expand Up @@ -114,12 +114,6 @@ func add(c ctrlruntime.Controller, r *ReconcileAPIServer) error {
return fmt.Errorf("apiserver-controller failed to watch primary resource: %v", err)
}

// Watch for changes to packet capture.
err = c.WatchObject(&operatorv1.PacketCapture{}, &handler.EnqueueRequestForObject{})
if err != nil {
return fmt.Errorf("apiserver-controller failed to watch resource: %w", err)
}

if err = utils.AddInstallationWatch(c); err != nil {
log.V(5).Info("Failed to create network watch", "err", err)
return fmt.Errorf("apiserver-controller failed to watch Tigera network resource: %v", err)
Expand Down Expand Up @@ -155,6 +149,12 @@ func add(c ctrlruntime.Controller, r *ReconcileAPIServer) error {
if err != nil {
return fmt.Errorf("apiserver-controller failed to watch resource: %w", err)
}

// Watch for changes to packet capture.
err = c.WatchObject(&operatorv1.PacketCapture{}, &handler.EnqueueRequestForObject{})
if err != nil {
return fmt.Errorf("apiserver-controller failed to watch resource: %w", err)
}
}

// Watch for the namespace(s) managed by this controller.
Expand Down

0 comments on commit ec36675

Please sign in to comment.