Merge pull request #271628 from scvalex/kubernetes-flannel-dont-open-ports

kubernetes: don't always open flannel fw ports
This commit is contained in:
Pol Dellaiera 2023-12-05 12:29:21 +01:00 committed by GitHub
commit d79be73295
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,6 +13,13 @@ in
###### interface
options.services.kubernetes.flannel = {
enable = mkEnableOption (lib.mdDoc "flannel networking");
openFirewallPorts = mkOption {
description = lib.mdDoc ''
Whether to open the Flannel UDP ports in the firewall on all interfaces.'';
type = types.bool;
default = true;
};
};
###### implementation
@ -38,7 +45,7 @@ in
};
networking = {
firewall.allowedUDPPorts = [
firewall.allowedUDPPorts = mkIf cfg.openFirewallPorts [
8285 # flannel udp
8472 # flannel vxlan
];