Add worker nodes.
This commit is contained in:
46
nix/kubernetes/roles/containerd/default.nix
Normal file
46
nix/kubernetes/roles/containerd/default.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.me = {
|
||||
containerd.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether we want to install containerd.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.containerd.enable {
|
||||
virtualisation.containerd.enable = true;
|
||||
virtualisation.containerd.settings = {
|
||||
"plugins" = {
|
||||
"io.containerd.grpc.v1.cri" = {
|
||||
"cni" = {
|
||||
"bin_dir" = "/opt/cni/bin";
|
||||
"conf_dir" = "/etc/cni/net.d";
|
||||
};
|
||||
"containerd" = {
|
||||
"default_runtime_name" = "runc";
|
||||
"runtimes" = {
|
||||
"runc" = {
|
||||
"options" = {
|
||||
"SystemdCgroup" = true;
|
||||
};
|
||||
"runtime_type" = "io.containerd.runc.v2";
|
||||
};
|
||||
};
|
||||
"snapshotter" = "overlayfs";
|
||||
};
|
||||
};
|
||||
};
|
||||
"version" = 2;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user