api: ensure new partition fields are omit empty for back compat (#11585)

This commit is contained in:
R.B. Boyer 2021-11-16 12:28:34 -06:00 committed by GitHub
parent 9db6645352
commit e6956893fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

3
.changelog/11585.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
api: ensure new partition fields are omit empty for compatibility with older versions of consul
```

View File

@ -32,8 +32,8 @@ type Intention struct {
// SourcePartition and DestinationPartition cannot be wildcards "*" and
// are not compatible with legacy intentions.
SourcePartition string
DestinationPartition string
SourcePartition string `json:",omitempty"`
DestinationPartition string `json:",omitempty"`
// SourceType is the type of the value for the source.
SourceType IntentionSourceType