diff options
author | Alex Auvolat <alex@adnab.me> | 2023-12-13 17:33:56 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-12-13 17:33:56 +0100 |
commit | 47e982b29d41e8b271100b9961b6766e96e009b1 (patch) | |
tree | 45e1b5bf380677afc82edd9be5b31083a4518578 /cluster/prod/app/garage/config | |
parent | d694ddbe2c51192b69ee9803a6b4b0cdd5f4247f (diff) | |
download | nixcfg-47e982b29d41e8b271100b9961b6766e96e009b1.tar.gz nixcfg-47e982b29d41e8b271100b9961b6766e96e009b1.zip |
garage prod: use dynamically determined ipv6 addresses
Diffstat (limited to 'cluster/prod/app/garage/config')
-rw-r--r-- | cluster/prod/app/garage/config/garage.toml | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/cluster/prod/app/garage/config/garage.toml b/cluster/prod/app/garage/config/garage.toml index 36daa5d..0a25255 100644 --- a/cluster/prod/app/garage/config/garage.toml +++ b/cluster/prod/app/garage/config/garage.toml @@ -6,8 +6,17 @@ db_engine = "lmdb" replication_mode = "3" -rpc_bind_addr = "[{{ env "meta.public_ipv6" }}]:3901" -rpc_public_addr = "[{{ env "meta.public_ipv6" }}]:3901" +# IPv6 config using the ipv6 address statically defined in Nomad's node metadata +# make sure to put back double { and } if re-enabling this +#rpc_bind_addr = "[{ env "meta.public_ipv6" }]:3901" +#rpc_public_addr = "[{ env "meta.public_ipv6" }]:3901" + +# IPv6 config using the ipv6 address dynamically detected from diplonat +{{ 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] |