Generate blocky host mapping from Consul kv
This commit is contained in:
parent
5d2301c791
commit
6b14507ca6
@ -28,17 +28,29 @@ customDNS:
|
|||||||
{{ with service "traefik" -}}
|
{{ with service "traefik" -}}
|
||||||
{{- $last := len . | subtract 1 -}}
|
{{- $last := len . | subtract 1 -}}
|
||||||
{{- $services := . -}}
|
{{- $services := . -}}
|
||||||
${base_hostname}: {{ range $i := loop $last -}}
|
{{ keyOrDefault "global/base_hostname" "${base_hostname}" }}: {{ range $i := loop $last -}}
|
||||||
{{- with index $services $i }}{{ .Address }},{{ end -}}
|
{{- with index $services $i }}{{ .Address }},{{ end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with index . $last }}{{ .Address }}{{ end -}}
|
{{- with index . $last }}{{ .Address }}{{ end -}}
|
||||||
{{- 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:
|
prometheus:
|
||||||
enable: true
|
enable: true
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
address: {{ env "NOMAD_UPSTREAM_ADDR_redis" }}
|
address: {{ env "NOMAD_UPSTREAM_ADDR_redis" }}
|
||||||
|
# password: ""
|
||||||
|
# database: 0
|
||||||
connectionAttempts: 10
|
connectionAttempts: 10
|
||||||
connectionCooldown: 3s
|
connectionCooldown: 3s
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user