Compare commits
7 commits
e6d0269262
...
c7508baf70
Author | SHA1 | Date | |
---|---|---|---|
c7508baf70 | |||
6ad3e7704c | |||
f72100ce21 | |||
d3f79b6667 | |||
f3dfc737e8 | |||
8323d5bec3 | |||
c10fc396e1 |
1 changed files with 12 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
{ cluster, config, depot, ... }:
|
||||
{ cluster, config, depot, lib, ... }:
|
||||
|
||||
let
|
||||
apiLink = cluster.config.hostLinks.${config.networking.hostName}.frangiclave-server;
|
||||
|
@ -18,6 +18,17 @@ in
|
|||
storageBackend = "raft";
|
||||
storageConfig = /*hcl*/ ''
|
||||
node_id = "x${builtins.hashString "sha256" "frangiclave-node-${config.networking.hostName}"}"
|
||||
${
|
||||
lib.pipe (cluster.config.services.frangiclave.otherNodes.server config.networking.hostName) [
|
||||
(map (node: cluster.config.hostLinks.${node}.frangiclave-server))
|
||||
(map (link: /*hcl*/ ''
|
||||
retry_join {
|
||||
leader_api_addr = "${link.url}"
|
||||
}
|
||||
''))
|
||||
(lib.concatStringsSep "\n")
|
||||
]
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue