aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-12-05 16:25:46 +0100
committerAlex Auvolat <alex@adnab.me>2022-12-05 16:25:46 +0100
commitb260b01915a23e8337d6df1e42b73a4745c77ec4 (patch)
tree63dbd2820c431d0e10d07c3b4c588136b5e91275
parent1e32bebd3869b0e544dca905bb23b67dd4b54037 (diff)
downloadnixcfg-b260b01915a23e8337d6df1e42b73a4745c77ec4.tar.gz
nixcfg-b260b01915a23e8337d6df1e42b73a4745c77ec4.zip
staging garage: use new health check endpoint
-rw-r--r--cluster/staging/app/garage/deploy/garage-nix2.hcl42
1 files changed, 24 insertions, 18 deletions
diff --git a/cluster/staging/app/garage/deploy/garage-nix2.hcl b/cluster/staging/app/garage/deploy/garage-nix2.hcl
index a137881..7ef4346 100644
--- a/cluster/staging/app/garage/deploy/garage-nix2.hcl
+++ b/cluster/staging/app/garage/deploy/garage-nix2.hcl
@@ -25,7 +25,7 @@ job "garage-staging" {
config {
packages = [
"#bash", # so that we can enter a shell inside container
- "git+https://git.deuxfleurs.fr/Deuxfleurs/garage.git?ref=main&rev=19bdd1c7992f907c9bd518462054f56e28a2e45b",
+ "git+https://git.deuxfleurs.fr/Deuxfleurs/garage.git?ref=admin-health-api&rev=d7868c48a4d8d5831051a0be088fe7bbec259bca",
]
command = "garage"
args = [ "server" ]
@@ -75,8 +75,6 @@ job "garage-staging" {
name = "garage-staging-rpc"
tags = ["garage-staging-rpc"]
port = "rpc"
- # No check on RPC, it wouldn't try connecting to the correct address
- # (Garage listens only on IPv6 for RPC, see config file)
}
service {
@@ -88,13 +86,11 @@ job "garage-staging" {
]
port = "s3"
check {
- type = "tcp"
+ port = "admin"
+ type = "http"
+ path = "/health"
interval = "60s"
timeout = "5s"
- check_restart {
- limit = 3
- grace = "90s"
- }
}
}
@@ -107,13 +103,11 @@ job "garage-staging" {
]
port = "k2v"
check {
- type = "tcp"
+ port = "admin"
+ type = "http"
+ path = "/health"
interval = "60s"
timeout = "5s"
- check_restart {
- limit = 3
- grace = "90s"
- }
}
}
@@ -128,13 +122,11 @@ job "garage-staging" {
]
port = "web"
check {
- type = "tcp"
+ port = "admin"
+ type = "http"
+ path = "/health"
interval = "60s"
timeout = "5s"
- check_restart {
- limit = 3
- grace = "90s"
- }
}
}
@@ -145,12 +137,26 @@ job "garage-staging" {
]
port = "admin"
check {
+ name = "garage-admin-health-check"
+ type = "http"
+ path = "/health"
+ interval = "60s"
+ timeout = "5s"
+ check_restart {
+ limit = 10
+ grace = "90s"
+ ignore_warnings = true
+ }
+ }
+ check {
+ name = "garage-tcp-liveness-check"
type = "tcp"
interval = "60s"
timeout = "5s"
check_restart {
limit = 3
grace = "90s"
+ ignore_warnings = true
}
}
}