From 96c2dd3865c5d59b3e3764b8dac82a800b8744f3 Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Thu, 6 Feb 2025 20:56:53 +0000 Subject: [PATCH] Skip netpol startup on windows instead of panicing Netpol startup is skipped with a warning on linux if ipset support is missing, we should do the same on windows Signed-off-by: Brad Davidson --- pkg/agent/netpol/netpol_windows.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/agent/netpol/netpol_windows.go b/pkg/agent/netpol/netpol_windows.go index 72aa41be62..8c15f5fec9 100644 --- a/pkg/agent/netpol/netpol_windows.go +++ b/pkg/agent/netpol/netpol_windows.go @@ -4,8 +4,10 @@ import ( "context" daemonconfig "github.com/k3s-io/k3s/pkg/daemons/config" + "github.com/sirupsen/logrus" ) func Run(ctx context.Context, nodeConfig *daemonconfig.Node) error { - panic("Netpol is not supported on windows ensure to pass --disable-network-policy") + logrus.Warnf("Skipping network policy controller start, netpol is not supported on windows") + return nil }