Use [[ .vault.database.instance ]]
This commit is contained in:
@@ -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 }}
|
||||
|
||||
@@ -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 . ]]
|
||||
|
||||
Reference in New Issue
Block a user