config/cluster: bring back cephMonServers extraRecords

This commit is contained in:
Astro 2021-11-15 03:38:46 +01:00
parent 97c2b819a8
commit b9920ce76b
1 changed files with 15 additions and 17 deletions

View File

@ -1,23 +1,21 @@
{ lib, ... }:
let
cephMonServers = [ "server5" "server6" "server8" ];
in
{ {
site.net.cluster = { site.net.cluster = {
domainName = "cluster.zentralwerk.org"; domainName = "cluster.zentralwerk.org";
extraRecords = [ extraRecords = map (host: {
{ data = "1 1 6789 ${host}";
data = "1 1 6789 server6"; name = "_ceph-mon._tcp";
name = "_ceph-mon._tcp"; type = "SRV";
type = "SRV"; }) cephMonServers
} ++
{ lib.lists.imap0 (i: host: {
data = "1 1 6789 server7"; name = "mon${toString i}";
name = "_ceph-mon._tcp"; type = "CNAME";
type = "SRV"; data = "${host}";
} }) cephMonServers;
{
data = "1 1 6789 server8";
name = "_ceph-mon._tcp";
type = "SRV";
}
];
hosts4 = { hosts4 = {
cls-gw = "172.20.77.1"; cls-gw = "172.20.77.1";
server1 = "172.20.77.30"; server1 = "172.20.77.30";