cluster/services/dns: use patroni incandescence

This commit is contained in:
Max Headroom 2024-08-10 13:06:59 +02:00
parent 6d78b69601
commit 5d9ff62afe
2 changed files with 15 additions and 4 deletions

View file

@ -43,9 +43,6 @@ in {
links.localAuthoritativeDNS = {}; links.localAuthoritativeDNS = {};
age.secrets = { age.secrets = {
acmeDnsDbCredentials = {
file = ./acme-dns-db-credentials.age;
};
acmeDnsDirectKey = { acmeDnsDirectKey = {
file = ./acme-dns-direct-key.age; file = ./acme-dns-direct-key.age;
}; };
@ -78,8 +75,12 @@ in {
}; };
}; };
services.locksmith.waitForSecrets.acme-dns = [
"patroni-acmedns"
];
systemd.services.acme-dns.serviceConfig.EnvironmentFile = with config.age.secrets; [ systemd.services.acme-dns.serviceConfig.EnvironmentFile = with config.age.secrets; [
acmeDnsDbCredentials.path "/run/locksmith/patroni-acmedns"
acmeDnsDirectKey.path acmeDnsDirectKey.path
]; ];

View file

@ -58,6 +58,16 @@ in
}; };
}; };
patroni = {
databases.acmedns = {};
users.acmedns = {
locksmith = {
nodes = config.services.dns.nodes.authoritative;
format = "envFile";
};
};
};
dns.records = { dns.records = {
securedns.consulService = "securedns"; securedns.consulService = "securedns";
"acme-dns-challenge.internal".consulService = "acme-dns"; "acme-dns-challenge.internal".consulService = "acme-dns";