Add secret ability to specify zone

This commit is contained in:
Brian Picciano 2022-11-13 20:09:03 +01:00
parent da100c6170
commit 739e88d6c9
2 changed files with 10 additions and 1 deletions

View File

@ -265,9 +265,14 @@ func garageApplyLayout(
id := bootstrapGarageHostForAlloc(thisHost, alloc).ID
zone := hostName
if alloc.Zone != "" {
zone = alloc.Zone
}
clusterLayout[id] = peerLayout{
Capacity: alloc.Capacity / 100,
Zone: hostName,
Zone: zone,
Tags: []string{},
}
}

View File

@ -36,6 +36,10 @@ type ConfigStorageAllocation struct {
S3APIPort int `yaml:"s3_api_port"`
RPCPort int `yaml:"rpc_port"`
AdminPort int `yaml:"admin_port"`
// Zone is a secret option which makes it easier to test garage bugs, but
// which we don't want users to otherwise know about.
Zone string `yaml:"zone"`
}
// Config describes the structure of the daemon config file.