From cbd4f79a4593bbc411c35d60cfe56d0f23d7333b Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 1 Mar 2023 02:01:57 +0100 Subject: [PATCH] cluster/services/patroni: add checkmate to etcd nodes --- cluster/services/patroni/default.nix | 3 +-- cluster/services/patroni/etcd.nix | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cluster/services/patroni/default.nix b/cluster/services/patroni/default.nix index 367c2cc..a490000 100644 --- a/cluster/services/patroni/default.nix +++ b/cluster/services/patroni/default.nix @@ -18,7 +18,6 @@ in vars.patroni = { etcdNodes = lib.genAttrs cfg.nodes.etcd (name: config.links."patroni-etcd-node-peer-${name}"); etcdNodesClient = lib.genAttrs cfg.nodes.etcd (name: config.links."patroni-etcd-node-client-${name}"); - etcdExtraNodes = [ "fly=http://10.1.1.151:2380" ]; passwords = { PATRONI_REPLICATION_PASSWORD = ./passwords/replication.age; PATRONI_SUPERUSER_PASSWORD = ./passwords/superuser.age; @@ -35,7 +34,7 @@ in services.patroni = { nodes = { worker = [ "VEGAS" "prophet" ]; - etcd = [ "VEGAS" "prophet" ]; + etcd = [ "checkmate" "VEGAS" "prophet" ]; haproxy = [ "VEGAS" "prophet" ]; }; nixos = { diff --git a/cluster/services/patroni/etcd.nix b/cluster/services/patroni/etcd.nix index e26bc18..94dc9fb 100644 --- a/cluster/services/patroni/etcd.nix +++ b/cluster/services/patroni/etcd.nix @@ -12,7 +12,7 @@ in services.etcd = { enable = true; dataDir = "/srv/storage/private/etcd"; - initialCluster = (map mkMember cluster.config.services.patroni.nodes.etcd) ++ vars.patroni.etcdExtraNodes; + initialCluster = map mkMember cluster.config.services.patroni.nodes.etcd; listenPeerUrls = lib.singleton vars.patroni.etcdNodes.${vars.hostName}.url; listenClientUrls = lib.singleton vars.patroni.etcdNodesClient.${vars.hostName}.url; };