Make things more configurable

This commit is contained in:
Jonas Juselius
2019-10-17 16:05:47 +02:00
parent 53e25ffb22
commit 81717fe223
12 changed files with 154 additions and 43 deletions

View 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";
}