Use [[ .vault.database.instance ]]

This commit is contained in:
2025-11-20 15:19:12 +01:00
parent 0e99750794
commit ac81f5b71b
2 changed files with 4 additions and 3 deletions

View File

@@ -91,7 +91,7 @@ job "miniflux" {
type = "http"
path = "/healthcheck"
expose = true
interval = "30s"
interval = "20s"
timeout = "5s"
check_restart {
@@ -351,10 +351,11 @@ _EOT
set -euo pipefail
PAUSE=yes
# Following service postgres status
{{- range $index, $instance := service "postgres|passing,warning" }}
# Instance {{ $index }}: {{ $instance.Address }}:{{ $instance.Port }} has tags {{ $instance.Tags | join "," }}
{{- if $instance.Tags | contains "primary" }}
# Disable pause mode as instance {{ $instance.Address }} is primary
# Disable pause mode as instance {{ $instance.Address }}:{{ $instance.Port }} is primary
PAUSE=no
{{- end }}
{{- end }}

View File

@@ -1,7 +1,7 @@
path "[[ .vault.root ]]kv/data/service/[[ .instance ]]" {
capabilities = ["read"]
}
path "[[ .vault.root ]]database/creds/postgres-[[ .vault.database.role ]]" {
path "[[ .vault.root ]]database/creds/[[ .vault.database.instance ]]-[[ .vault.database.role ]]" {
capabilities = ["read"]
}
[[ template "common/vault.kv_proxy_policy" merge .miniflux . ]]