Omit optional field when empty

Annotates the optional field `StabilizationWindowSeconds` with
`omitempty` such that it will be omitted when creating resources where
the field is not set.

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
This commit is contained in:
Mikkel Oscar Lyderik Larsen 2020-08-31 17:49:30 +02:00
parent c631e78173
commit bcd601f132
No known key found for this signature in database
GPG Key ID: 50AD98B2A0D8D4EF

View File

@ -169,7 +169,7 @@ type HPAScalingRules struct {
// - For scale up: 0 (i.e. no stabilization is done).
// - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
// +optional
StabilizationWindowSeconds *int32 `json:"stabilizationWindowSeconds" protobuf:"varint,3,opt,name=stabilizationWindowSeconds"`
StabilizationWindowSeconds *int32 `json:"stabilizationWindowSeconds,omitempty" protobuf:"varint,3,opt,name=stabilizationWindowSeconds"`
// selectPolicy is used to specify which policy should be used.
// If not set, the default value MaxPolicySelect is used.
// +optional