Wrap error stating that it is coming from netpol

Signed-off-by: Manuel Buil <mbuil@suse.com>
This commit is contained in:
Manuel Buil 2023-05-12 11:50:37 +02:00
parent cbe8d33c93
commit 4aafff0219

View File

@ -129,7 +129,7 @@ func Run(ctx context.Context, nodeConfig *config.Node) error {
npc, err := netpol.NewNetworkPolicyController(client, krConfig, podInformer, npInformer, nsInformer, &sync.Mutex{},
iptablesCmdHandlers, ipSetHandlers)
if err != nil {
return err
return errors.Wrap(err, "unable to initialize Network Policy Controller")
}
podInformer.AddEventHandler(npc.PodEventHandler)