levi: Get NetworkPolicy working

This commit is contained in:
Sean Buckley 2022-11-06 18:53:46 -05:00
parent a08a3618fb
commit f34cd7f5cc

View file

@ -1,14 +1,13 @@
{ pkgs, ... }:
{
networking.firewall.allowedTCPPorts = [ 6443 ];
environment.systemPackages = [
pkgs.kubectl
pkgs.kubernetes-helm
];
environment.systemPackages = [ pkgs.kubectl ];
services.k3s.enable = true;
services.k3s.extraFlags = toString [
# flags for using Calico instead of Flannel
"--disable-network-policy"
"--flannel-backend=none"
];
# Get NetworkPolicy working
networking.firewall.enable = false;
systemd.services.k3s.path = [ pkgs.ipset ];
services.k3s.package = pkgs.k3s.overrideAttrs (prev: {
buildInputs = prev.buildInputs ++ [ pkgs.ipset ];
});
}