mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
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:
parent
c631e78173
commit
bcd601f132
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user