Add MinDomains API to TopologySpreadConstraints field

Kubernetes-commit: 3b13e9445a3bf86c94781c898f224e6690399178
This commit is contained in:
sanposhiho 2022-02-23 21:11:59 +09:00 committed by Kubernetes Publisher
parent 2f52a105e6
commit b32b6a7d22
2 changed files with 12 additions and 0 deletions

View File

@ -30,6 +30,7 @@ type TopologySpreadConstraintApplyConfiguration struct {
TopologyKey *string `json:"topologyKey,omitempty"`
WhenUnsatisfiable *v1.UnsatisfiableConstraintAction `json:"whenUnsatisfiable,omitempty"`
LabelSelector *metav1.LabelSelectorApplyConfiguration `json:"labelSelector,omitempty"`
MinDomains *int32 `json:"minDomains,omitempty"`
}
// TopologySpreadConstraintApplyConfiguration constructs an declarative configuration of the TopologySpreadConstraint type for use with
@ -69,3 +70,11 @@ func (b *TopologySpreadConstraintApplyConfiguration) WithLabelSelector(value *me
b.LabelSelector = value
return b
}
// WithMinDomains sets the MinDomains field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the MinDomains field is set to the value of the last call.
func (b *TopologySpreadConstraintApplyConfiguration) WithMinDomains(value int32) *TopologySpreadConstraintApplyConfiguration {
b.MinDomains = &value
return b
}

View File

@ -6844,6 +6844,9 @@ var schemaYAML = typed.YAMLObject(`types:
type:
scalar: numeric
default: 0
- name: minDomains
type:
scalar: numeric
- name: topologyKey
type:
scalar: string