Generate blocky host mapping from Consul kv
This commit is contained in:
parent
ca6e766a40
commit
dfa95ee454
@ -28,17 +28,29 @@ customDNS:
|
||||
{{ with service "traefik" -}}
|
||||
{{- $last := len . | subtract 1 -}}
|
||||
{{- $services := . -}}
|
||||
${base_hostname}: {{ range $i := loop $last -}}
|
||||
{{ keyOrDefault "global/base_hostname" "${base_hostname}" }}: {{ range $i := loop $last -}}
|
||||
{{- with index $services $i }}{{ .Address }},{{ end -}}
|
||||
{{- end -}}
|
||||
{{- with index . $last }}{{ .Address }}{{ end -}}
|
||||
{{- end }}
|
||||
{{ with service "whoami" -}}
|
||||
{{- $last := len . | subtract 1 -}}
|
||||
{{- $services := . -}}
|
||||
whoami: {{ range $i := loop $last -}}
|
||||
{{- with index $services $i }}{{ .Address }},{{ end -}}
|
||||
{{- end -}}
|
||||
{{- with index . $last }}{{ .Address }}{{ end -}}
|
||||
{{- end }}
|
||||
# Other mappings
|
||||
{{ keyOrDefault "blocky/mappings" "# None" | indent 4 }}
|
||||
|
||||
prometheus:
|
||||
enable: true
|
||||
|
||||
redis:
|
||||
address: {{ env "NOMAD_UPSTREAM_ADDR_redis" }}
|
||||
# password: ""
|
||||
# database: 0
|
||||
connectionAttempts: 10
|
||||
connectionCooldown: 3s
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user