Fix back compat issues with UDS config (#11318)

SocketPath needs to be omitted when empty to avoid confusing older versions of Consul

Signed-off-by: Mark Anderson <manderson@hashicorp.com>
This commit is contained in:
Mark Anderson 2021-10-28 13:31:10 -07:00 committed by GitHub
parent c3a1895f2e
commit a749a41d07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

3
.changelog/11318.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
api: fixed backwards compatibility issue with AgentService SocketPath field.
```

View File

@ -84,7 +84,7 @@ type AgentService struct {
Meta map[string]string Meta map[string]string
Port int Port int
Address string Address string
SocketPath string SocketPath string `json:",omitempty"`
TaggedAddresses map[string]ServiceAddress `json:",omitempty"` TaggedAddresses map[string]ServiceAddress `json:",omitempty"`
Weights AgentWeights Weights AgentWeights
EnableTagOverride bool EnableTagOverride bool