Use check_settings

This commit is contained in:
Daniel Berteaud 2024-05-12 21:45:49 +02:00
parent 20f2b98567
commit d92d2f09a2
3 changed files with 14 additions and 4 deletions

View File

@ -35,6 +35,11 @@ job "postgres-manage" {
}
}
sidecar_task {
logs {
disabled = false
}
config {
args = [
"-c",

View File

@ -57,6 +57,11 @@ job "postgres-server" {
sidecar_service {
}
sidecar_task {
logs {
disabled = false
}
config {
args = [
"-c",
@ -93,10 +98,11 @@ job "postgres-server" {
port = "patroni"
path = "/health"
protocol = "https"
interval = "30s"
timeout = "5s"
# Patroni REST API is using a cert from a private CA
tls_skip_verify = true
interval = "30s"
timeout = "5s"
}
# This check will ensure the current role is published in Consul tags (if the callback during a role change failed for example)

View File

@ -53,10 +53,9 @@ job "[[ .instance ]]-server" {
port = "patroni"
path = "/health"
protocol = "https"
interval = "[[ $c.consul.check.interval ]]"
timeout = "[[ $c.consul.check.timeout ]]"
# Patroni REST API is using a cert from a private CA
tls_skip_verify = true
[[ template "common/check_settings" $c ]]
}
# This check will ensure the current role is published in Consul tags (if the callback during a role change failed for example)