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 = {
domainName = "cluster.zentralwerk.org";
extraRecords = [
{
data = "1 1 6789 server6";
name = "_ceph-mon._tcp";
type = "SRV";
}
{
data = "1 1 6789 server7";
name = "_ceph-mon._tcp";
type = "SRV";
}
{
data = "1 1 6789 server8";
name = "_ceph-mon._tcp";
type = "SRV";
}
];
extraRecords = map (host: {
data = "1 1 6789 ${host}";
name = "_ceph-mon._tcp";
type = "SRV";
}) cephMonServers
++
lib.lists.imap0 (i: host: {
name = "mon${toString i}";
type = "CNAME";
data = "${host}";
}) cephMonServers;
hosts4 = {
cls-gw = "172.20.77.1";
server1 = "172.20.77.30";