Burrow icon indicating copy to clipboard operation
Burrow copied to clipboard

Specify server list in environment variable

Open shoan opened this issue 5 years ago • 1 comments

I am attempting to override the server list by the environment variable. I have attempted to set the environment value as ['host1:port','host2:port','host3:port']. I have also tried variations of this by replacing comma with space, single quotes with double etc. Every time I get panic: Cluster 'kf_server' has one or more improperly formatted servers (must be host:port).

What is the right way to specify a server list in the environment for burrow?

shoan avatar Jul 28 '20 07:07 shoan

In case you haven't cracked this, Burrow uses Viper which in turn uses string.Fields to bind an ENVVAR to golang slice field. This means that you need to set your ENV vars in this way: VARIABLE='server1:port server2:port. Just put a space between your servers, no quotes except before and after server list.

nightmareartist avatar Oct 21 '20 15:10 nightmareartist