cluster/services/patroni: auto-restart etcd
This commit is contained in:
parent
bdc623056b
commit
a80381fac1
1 changed files with 8 additions and 2 deletions
|
@ -16,6 +16,12 @@ in
|
||||||
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;
|
||||||
};
|
};
|
||||||
|
systemd.services.etcd = {
|
||||||
# run on any architecture
|
# run on any architecture
|
||||||
systemd.services.etcd.environment.ETCD_UNSUPPORTED_ARCH = pkgs.go.GOARCH;
|
environment.ETCD_UNSUPPORTED_ARCH = pkgs.go.GOARCH;
|
||||||
|
serviceConfig = {
|
||||||
|
RestartSec = "5s";
|
||||||
|
Restart = "on-failure";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue