Improvements here and there.
This commit is contained in:
62
kube0.nix
62
kube0.nix
@@ -8,7 +8,9 @@ let
|
||||
"10.0.0.1",
|
||||
"127.0.0.1",
|
||||
"kubernetes",
|
||||
"kubernetes.default.svc",
|
||||
"etcd0",
|
||||
"fs0-2",
|
||||
"k0-0"
|
||||
'';
|
||||
kube-proxy = pki.kube-proxy;
|
||||
@@ -31,45 +33,55 @@ let
|
||||
};
|
||||
cluster = callPackage ./lib/k8s.nix {
|
||||
masterNode = "10.253.18.100";
|
||||
etcdNodes = [
|
||||
"10.253.18.100"
|
||||
"10.253.18.101"
|
||||
"10.253.18.102"
|
||||
];
|
||||
etcdNodes = [ "etcd0" "etcd1" "etcd2" ];
|
||||
clusterHosts = ''
|
||||
10.253.18.100 k0-0 etcd0 kubernetes
|
||||
10.253.18.100 k0-0 etcd0 kubernetes itp-registry
|
||||
10.253.18.101 k0-1 etcd1
|
||||
10.253.18.102 k0-2 etcd2
|
||||
10.253.18.103 k0-3
|
||||
10.253.18.107 k0-4
|
||||
10.253.18.108 k0-5
|
||||
10.253.18.106 fs0-0
|
||||
10.1.2.164 fs0-1
|
||||
10.253.18.106 fs0-0 fs0-0.local
|
||||
10.1.2.164 fs0-1 fs0-1.local
|
||||
10.253.18.100 fs0-2 fs0-2.local
|
||||
'';
|
||||
inherit certs;
|
||||
};
|
||||
in
|
||||
{
|
||||
# k0-0 = { ... }: {
|
||||
# require = [ (cluster.apiserver "10.253.18.100" "k0-0" "etcd0") ];
|
||||
# services.glusterfs = {
|
||||
# enable = true;
|
||||
# tlsSettings = {
|
||||
# caCert = certs.ca.cert;
|
||||
# tlsKeyPath = certs.fs0.key;
|
||||
# tlsPem = certs.fs0.cert;
|
||||
# };
|
||||
# };
|
||||
# networking.firewall.extraCommands = ''
|
||||
# iptables -I INPUT -p all -s 10.253.18.100 -j ACCEPT
|
||||
# iptables -I INPUT -p all -s 10.253.18.106 -j ACCEPT
|
||||
# iptables -I INPUT -p all -s 10.1.2.164 -j ACCEPT
|
||||
# '';
|
||||
# };
|
||||
k0-0 = cluster.apiserver "10.253.18.100" "k0-0" "etcd0";
|
||||
k0-0 = { ... }: {
|
||||
require = [ (cluster.apiserver "10.253.18.100" "k0-0" "etcd0") ];
|
||||
boot.kernelModules = [
|
||||
"dm_snapshot"
|
||||
"dm_mirror"
|
||||
"dm_thin_pool"
|
||||
];
|
||||
services.dnsmasq.enable = true;
|
||||
fileSystems."/data" = {
|
||||
device = "k0-0:gv0";
|
||||
fsType = "glusterfs";
|
||||
};
|
||||
environment.systemPackages = [ pkgs.lvm2 ];
|
||||
networking.extraHosts = ''
|
||||
10.253.18.100 itp-registry itp-registry.local
|
||||
10.253.18.100 nuget.local
|
||||
10.253.18.100 kibana.local
|
||||
10.253.18.100 dashboard.cluster.local
|
||||
10.253.18.100 gitlab.cluster.local
|
||||
10.253.18.100 baywash.cluster.local
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
k0-1 = cluster.server "10.253.18.101" "k0-1" "etcd1";
|
||||
k0-2 = cluster.server "10.253.18.102" "k0-2" "etcd2";
|
||||
k0-3 = cluster.worker "10.253.18.103" "k0-3";
|
||||
k0-4 = cluster.worker "10.253.18.107" "k0-4";
|
||||
k0-5 = cluster.worker "10.253.18.108" "k0-5";
|
||||
# k0-0 = cluster.plain "10.253.18.100" "k0-0";
|
||||
# k0-1 = cluster.plain "10.253.18.101" "k0-1";
|
||||
# k0-2 = cluster.plain "10.253.18.102" "k0-2";
|
||||
# k0-3 = cluster.plain "10.253.18.103" "k0-3";
|
||||
# k0-4 = cluster.plain "10.253.18.107" "k0-4";
|
||||
# k0-5 = cluster.plain "10.253.18.108" "k0-5";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user