Skip to content

Commit

Permalink
Skip netpol startup on windows instead of panicing
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
brandond committed Feb 6, 2025
1 parent c17edde commit 22f3e26
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/agent/netpol/netpol_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 22f3e26

Please sign in to comment.