aboutsummaryrefslogtreecommitdiff
path: root/cluster/prod/app/garage/config
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-04-21 14:36:10 +0200
committerAlex Auvolat <alex@adnab.me>2023-04-21 14:36:10 +0200
commit607add3161f9a465fc061cfd3a5434aa4dbd4796 (patch)
tree516a0406ec8aa76ba8ebbdaac4ea245003bc402e /cluster/prod/app/garage/config
parentc4598bd84fa000ea1631bab8d67a0c8f1929141c (diff)
downloadnixcfg-607add3161f9a465fc061cfd3a5434aa4dbd4796.tar.gz
nixcfg-607add3161f9a465fc061cfd3a5434aa4dbd4796.zip
make specifying an ipv6 fully optionnal
Diffstat (limited to 'cluster/prod/app/garage/config')
-rw-r--r--cluster/prod/app/garage/config/garage.toml6
1 files changed, 4 insertions, 2 deletions
diff --git a/cluster/prod/app/garage/config/garage.toml b/cluster/prod/app/garage/config/garage.toml
index 36daa5d..5b10707 100644
--- a/cluster/prod/app/garage/config/garage.toml
+++ b/cluster/prod/app/garage/config/garage.toml
@@ -6,8 +6,10 @@ db_engine = "lmdb"
replication_mode = "3"
-rpc_bind_addr = "[{{ env "meta.public_ipv6" }}]:3901"
-rpc_public_addr = "[{{ env "meta.public_ipv6" }}]:3901"
+{{ with $a := env "attr.unique.hostname" | printf "diplonat/autodiscovery/ipv6/%s" | key | parseJSON }}
+rpc_bind_addr = "[{{ $a.address }}]:3901"
+rpc_public_addr = "[{{ $a.address }}]:3901"
+{{ end }}
rpc_secret = "{{ key "secrets/garage/rpc_secret" | trimSpace }}"
[consul_discovery]