cluster/services/patroni: add checkmate to etcd nodes
This commit is contained in:
parent
f6311ec7c4
commit
cbd4f79a45
2 changed files with 2 additions and 3 deletions
|
@ -18,7 +18,6 @@ in
|
||||||
vars.patroni = {
|
vars.patroni = {
|
||||||
etcdNodes = lib.genAttrs cfg.nodes.etcd (name: config.links."patroni-etcd-node-peer-${name}");
|
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}");
|
etcdNodesClient = lib.genAttrs cfg.nodes.etcd (name: config.links."patroni-etcd-node-client-${name}");
|
||||||
etcdExtraNodes = [ "fly=http://10.1.1.151:2380" ];
|
|
||||||
passwords = {
|
passwords = {
|
||||||
PATRONI_REPLICATION_PASSWORD = ./passwords/replication.age;
|
PATRONI_REPLICATION_PASSWORD = ./passwords/replication.age;
|
||||||
PATRONI_SUPERUSER_PASSWORD = ./passwords/superuser.age;
|
PATRONI_SUPERUSER_PASSWORD = ./passwords/superuser.age;
|
||||||
|
@ -35,7 +34,7 @@ in
|
||||||
services.patroni = {
|
services.patroni = {
|
||||||
nodes = {
|
nodes = {
|
||||||
worker = [ "VEGAS" "prophet" ];
|
worker = [ "VEGAS" "prophet" ];
|
||||||
etcd = [ "VEGAS" "prophet" ];
|
etcd = [ "checkmate" "VEGAS" "prophet" ];
|
||||||
haproxy = [ "VEGAS" "prophet" ];
|
haproxy = [ "VEGAS" "prophet" ];
|
||||||
};
|
};
|
||||||
nixos = {
|
nixos = {
|
||||||
|
|
|
@ -12,7 +12,7 @@ in
|
||||||
services.etcd = {
|
services.etcd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dataDir = "/srv/storage/private/etcd";
|
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;
|
listenPeerUrls = lib.singleton vars.patroni.etcdNodes.${vars.hostName}.url;
|
||||||
listenClientUrls = lib.singleton vars.patroni.etcdNodesClient.${vars.hostName}.url;
|
listenClientUrls = lib.singleton vars.patroni.etcdNodesClient.${vars.hostName}.url;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue