Make things more configurable
This commit is contained in:
22
clusters/template/default.nix
Normal file
22
clusters/template/default.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
with import <nixpkgs> {};
|
||||
let
|
||||
settings = rec {
|
||||
master = "node1";
|
||||
workers = [ "node2" ];
|
||||
masterAddress = "10.10.10.1";
|
||||
apiserverAddress = "https://${masterAddress}:4443";
|
||||
clusterHosts = ''
|
||||
10.10.10.1 node1 kubernetes
|
||||
10.10.10.2 node2
|
||||
10.10.20.1 fs1
|
||||
'';
|
||||
adminAuthorizedKeys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKiAS30ZO+wgfAqDE9Y7VhRunn2QszPHA5voUwo+fGOf admin"
|
||||
];
|
||||
};
|
||||
cluster = callPackage ../../lib/k8s.nix { here = ./.; inherit settings; };
|
||||
in
|
||||
{
|
||||
node1 = cluster.apiserver "10.10.10.1" "node1";
|
||||
node2 = cluster.worker "10.10.10.2" "node2";
|
||||
}
|
||||
Reference in New Issue
Block a user