cluster/services/patroni: auto-restart etcd

This commit is contained in:
Max Headroom 2022-10-18 23:06:34 +02:00
parent bdc623056b
commit a80381fac1

View file

@ -16,6 +16,12 @@ in
listenPeerUrls = lib.singleton vars.patroni.etcdNodes.${vars.hostName}.url;
listenClientUrls = lib.singleton vars.patroni.etcdNodesClient.${vars.hostName}.url;
};
# run on any architecture
systemd.services.etcd.environment.ETCD_UNSUPPORTED_ARCH = pkgs.go.GOARCH;
systemd.services.etcd = {
# run on any architecture
environment.ETCD_UNSUPPORTED_ARCH = pkgs.go.GOARCH;
serviceConfig = {
RestartSec = "5s";
Restart = "on-failure";
};
};
}