We’d like to use SRV records for CockroachDB. The desired format would be like the response example in this post [Feature Request]: Configurable private DNS SRV records - General - Fly.io
Currently we have a script that generates a large list of nodes to try and cover all scenarios, like this:
echo "Building list of join nodes ..."
JOIN_NEW_REGION_NODES=$(dig +short TXT regions.$FLY_APP_NAME.internal | tr -d '\n' | sed -E 's/(")//g;s/([a-z]*)/\1.'"$FLY_APP_NAME"'.internal:26357/g')
JOIN_OLD_REGION_NODES=$(dig +short TXT regions.$FLY_APP_NAME.internal | tr -d '\n' | sed -E 's/(")//g;s/([a-z]*)/\1.'"$FLY_APP_NAME"'.internal:26257/g')
JOIN_NODES=$JOIN_NEW_REGION_NODES,$JOIN_OLD_REGION_NODES,top5.nearest.of.$FLY_APP_NAME.internal:26357,top5.nearest.of.$FLY_APP_NAME.internal:26257
echo "Getting fly 6pn address ..."
FLY_6PN=$(grep fly-local-6pn /etc/hosts | cut -f 1)
echo "Getting fly.io zone ..."
FLY_ZONE=$(echo "$FLY_6PN" | sed -E 's/([a-f0-9]+:){4}([a-f0-9]+)(:[a-f0-9]+){3}/\2/g')