Installing the cni plugins.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"cniVersion": "1.0.0",
|
||||
"name": "bridge",
|
||||
"type": "bridge",
|
||||
"bridge": "cni0",
|
||||
"isGateway": true,
|
||||
"ipMasq": true,
|
||||
"ipam": {
|
||||
"type": "host-local",
|
||||
"ranges": [
|
||||
[{"subnet": "SUBNET"}]
|
||||
],
|
||||
"routes": [{"dst": "0.0.0.0/0"}]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"cniVersion": "1.1.0",
|
||||
"name": "lo",
|
||||
"type": "loopback"
|
||||
}
|
||||
27
nix/kubernetes/roles/containerd/package/cni_conf/package.nix
Normal file
27
nix/kubernetes/roles/containerd/package/cni_conf/package.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
# unpackPhase
|
||||
# patchPhase
|
||||
# configurePhase
|
||||
# buildPhase
|
||||
# checkPhase
|
||||
# installPhase
|
||||
# fixupPhase
|
||||
# installCheckPhase
|
||||
# distPhase
|
||||
{
|
||||
stdenv,
|
||||
openssl,
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
name = "cni-conf";
|
||||
nativeBuildInputs = [ openssl ];
|
||||
buildInputs = [ ];
|
||||
|
||||
unpackPhase = "true";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out"
|
||||
cd "$out"
|
||||
install ${./files/10-bridge.conf} ${./files/99-loopback.conf} $out/
|
||||
'';
|
||||
})
|
||||
Reference in New Issue
Block a user