kubernetes: fix conntrack-tools package name, missing dir, and tests

This commit is contained in:
Alexandru Scvortov 2021-06-28 20:33:17 +01:00
parent e34f40b92b
commit ab1567e812
3 changed files with 10 additions and 2 deletions

View file

@ -189,6 +189,7 @@ in
# manually paste it in place. Just symlink.
# otherwise, create the target file, ready for users to insert the token
mkdir -p $(dirname ${certmgrAPITokenPath})
if [ -f "${cfsslAPITokenPath}" ]; then
ln -fs "${cfsslAPITokenPath}" "${certmgrAPITokenPath}"
else

View file

@ -59,7 +59,7 @@ in
description = "Kubernetes Proxy Service";
wantedBy = [ "kubernetes.target" ];
after = [ "kube-apiserver.service" ];
path = with pkgs; [ iptables conntrack_tools ];
path = with pkgs; [ iptables conntrack-tools ];
serviceConfig = {
Slice = "kubernetes.slice";
ExecStart = ''${top.package}/bin/kube-proxy \

View file

@ -40,7 +40,7 @@ let
allowedTCPPorts = [
10250 # kubelet
];
trustedInterfaces = ["docker0"];
trustedInterfaces = ["mynet"];
extraCommands = concatMapStrings (node: ''
iptables -A INPUT -s ${node.config.networking.primaryIPAddress} -j ACCEPT
@ -61,6 +61,13 @@ let
advertiseAddress = master.ip;
};
masterAddress = "${masterName}.${config.networking.domain}";
# workaround for:
# https://github.com/kubernetes/kubernetes/issues/102676
# (workaround from) https://github.com/kubernetes/kubernetes/issues/95488
kubelet.extraOpts = ''\
--cgroups-per-qos=false \
--enforce-node-allocatable="" \
'';
};
}
(optionalAttrs (any (role: role == "master") machine.roles) {