Skip to content

Commit

Permalink
Fix deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Shay Bergmann committed Jun 25, 2021
1 parent d609a64 commit a2783aa
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
3 changes: 3 additions & 0 deletions modules/ingress-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ in {
TimeoutStopSec = "30s";
RestartSec = "10s";
Restart = "on-failure";
};

unitConfig = {
StartLimitInterval = "20s";
StartLimitBurst = 10;
};
Expand Down
8 changes: 6 additions & 2 deletions modules/ingress.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
description = "HAProxy (ingress)";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];

unitConfig = {
StartLimitInterval = "20s";
StartLimitBurst = 10;
};

serviceConfig = let
preScript = pkgs.writeShellScript "ingress-start-pre" ''
export PATH="${lib.makeBinPath [ pkgs.coreutils ]}"
Expand Down Expand Up @@ -50,8 +56,6 @@
KillMode = "mixed";
SuccessExitStatus = "143";
Restart = "always";
StartLimitInterval = "20s";
StartLimitBurst = 10;
TimeoutStopSec = "30s";
RestartSec = "5s";
# upstream hardening options
Expand Down
7 changes: 5 additions & 2 deletions modules/nomad-autoscaler.nix
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,11 @@ in {
restartIfChanged = false;
reloadIfChanged = true;

unitConfig = {
StartLimitInterval = "20s";
StartLimitBurst = 10;
};

serviceConfig = {
StateDirectory = "nomad-autoscaler";
RuntimeDirectory = "nomad-autoscaler";
Expand Down Expand Up @@ -627,8 +632,6 @@ in {
# support reloading: HUP tells autoscaler to reload config files
ExecReload = [ "${pkgs.coreutils}/bin/kill -HUP $MAINPID" ];
Restart = "on-failure";
StartLimitInterval = "20s";
StartLimitBurst = 10;
TimeoutStopSec = "30s";
RestartSec = "5s";
# upstream hardening options
Expand Down
8 changes: 5 additions & 3 deletions modules/vault.nix
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,11 @@ in {
(filterAttrs (n: _: hasPrefix "${cfg.configDir}" n)
config.environment.etc);

unitConfig.RequiresMountsFor = [ cfg.storagePath ];
unitConfig = {
RequiresMountsFor = [ cfg.storagePath ];
StartLimitInterval = "60s";
StartLimitBurst = 3;
};

serviceConfig = let
preScript = pkgs.writeShellScriptBin "vault-start-pre" ''
Expand Down Expand Up @@ -369,8 +373,6 @@ in {
TimeoutStopSec = "30s";
RestartSec = "10s";
Restart = "on-failure";
StartLimitInterval = "60s";
StartLimitBurst = 3;
};
};

Expand Down

0 comments on commit a2783aa

Please sign in to comment.