mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-08-05 20:00:15 +00:00
Add generated files for compositePodGroup APIs
Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>
This commit is contained in:
@@ -2585,6 +2585,46 @@ func Validate_Workload(
|
||||
return errs
|
||||
}
|
||||
|
||||
// Validate_WorkloadCompositePodGroupGangSchedulingPolicy validates an instance of WorkloadCompositePodGroupGangSchedulingPolicy according
|
||||
// to declarative validation rules in the API schema.
|
||||
func Validate_WorkloadCompositePodGroupGangSchedulingPolicy(
|
||||
ctx context.Context, op operation.Operation, fldPath *field.Path,
|
||||
obj, oldObj *schedulingv1alpha3.WorkloadCompositePodGroupGangSchedulingPolicy) (errs field.ErrorList) {
|
||||
|
||||
{ // field schedulingv1alpha3.WorkloadCompositePodGroupGangSchedulingPolicy.MinGroupCount
|
||||
fn := func(
|
||||
fldPath *field.Path,
|
||||
obj, oldObj *int32,
|
||||
oldValueCorrelated bool) (errs field.ErrorList) {
|
||||
// don't revalidate unchanged data
|
||||
if oldValueCorrelated && op.Type == operation.Update {
|
||||
if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
// call field-attached validations
|
||||
earlyReturn := false
|
||||
if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
|
||||
earlyReturn = true
|
||||
}
|
||||
if earlyReturn {
|
||||
return // do not proceed
|
||||
}
|
||||
if e := validate.Minimum(ctx, op, fldPath, obj, oldObj, 1); len(e) != 0 {
|
||||
errs = append(errs, e...)
|
||||
}
|
||||
return
|
||||
}
|
||||
oldVal := safe.Field(oldObj,
|
||||
func(oldObj *schedulingv1alpha3.WorkloadCompositePodGroupGangSchedulingPolicy) *int32 {
|
||||
return oldObj.MinGroupCount
|
||||
})
|
||||
errs = append(errs, fn(fldPath.Child("minGroupCount"), obj.MinGroupCount, oldVal, oldObj != nil)...)
|
||||
}
|
||||
|
||||
return errs
|
||||
}
|
||||
|
||||
var unionMembershipFor_k8s_io_api_scheduling_v1alpha3_WorkloadPodGroupDisruptionMode_ = validate.NewUnionMembership(validate.NewUnionMember("single"), validate.NewUnionMember("all"))
|
||||
|
||||
// Validate_WorkloadPodGroupDisruptionMode validates an instance of WorkloadPodGroupDisruptionMode according
|
||||
|
||||
171
pkg/generated/openapi/zz_generated.openapi.go
generated
171
pkg/generated/openapi/zz_generated.openapi.go
generated
@@ -1192,6 +1192,13 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
|
||||
schedulingv1alpha3.TopologyConstraint{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha3_TopologyConstraint(ref),
|
||||
schedulingv1alpha3.TypedLocalObjectReference{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha3_TypedLocalObjectReference(ref),
|
||||
schedulingv1alpha3.Workload{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha3_Workload(ref),
|
||||
schedulingv1alpha3.WorkloadCompositePodGroupAllDisruptionMode{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha3_WorkloadCompositePodGroupAllDisruptionMode(ref),
|
||||
schedulingv1alpha3.WorkloadCompositePodGroupBasicSchedulingPolicy{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha3_WorkloadCompositePodGroupBasicSchedulingPolicy(ref),
|
||||
schedulingv1alpha3.WorkloadCompositePodGroupDisruptionMode{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha3_WorkloadCompositePodGroupDisruptionMode(ref),
|
||||
schedulingv1alpha3.WorkloadCompositePodGroupGangSchedulingPolicy{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha3_WorkloadCompositePodGroupGangSchedulingPolicy(ref),
|
||||
schedulingv1alpha3.WorkloadCompositePodGroupSchedulingConstraints{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha3_WorkloadCompositePodGroupSchedulingConstraints(ref),
|
||||
schedulingv1alpha3.WorkloadCompositePodGroupSchedulingPolicy{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha3_WorkloadCompositePodGroupSchedulingPolicy(ref),
|
||||
schedulingv1alpha3.WorkloadCompositePodGroupSingleDisruptionMode{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha3_WorkloadCompositePodGroupSingleDisruptionMode(ref),
|
||||
schedulingv1alpha3.WorkloadList{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha3_WorkloadList(ref),
|
||||
schedulingv1alpha3.WorkloadPodGroupAllDisruptionMode{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha3_WorkloadPodGroupAllDisruptionMode(ref),
|
||||
schedulingv1alpha3.WorkloadPodGroupBasicSchedulingPolicy{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha3_WorkloadPodGroupBasicSchedulingPolicy(ref),
|
||||
@@ -56304,6 +56311,170 @@ func schema_k8sio_api_scheduling_v1alpha3_Workload(ref common.ReferenceCallback)
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_api_scheduling_v1alpha3_WorkloadCompositePodGroupAllDisruptionMode(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "WorkloadCompositePodGroupAllDisruptionMode indicates that all child groups must be disrupted together.",
|
||||
Type: []string{"object"},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_api_scheduling_v1alpha3_WorkloadCompositePodGroupBasicSchedulingPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "WorkloadCompositePodGroupBasicSchedulingPolicy indicates that the child groups of a composite group should be scheduled independently.",
|
||||
Type: []string{"object"},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_api_scheduling_v1alpha3_WorkloadCompositePodGroupDisruptionMode(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "WorkloadCompositePodGroupDisruptionMode defines how the child groups of a composite group can be disrupted. Exactly one mode must be set.",
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"single": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "single specifies that child groups can be disrupted independently from each other.",
|
||||
Ref: ref(schedulingv1alpha3.WorkloadCompositePodGroupSingleDisruptionMode{}.OpenAPIModelName()),
|
||||
},
|
||||
},
|
||||
"all": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "all specifies that all child groups must be disrupted together.",
|
||||
Ref: ref(schedulingv1alpha3.WorkloadCompositePodGroupAllDisruptionMode{}.OpenAPIModelName()),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
VendorExtensible: spec.VendorExtensible{
|
||||
Extensions: spec.Extensions{
|
||||
"x-kubernetes-unions": []interface{}{
|
||||
map[string]interface{}{
|
||||
"fields-to-discriminateBy": map[string]interface{}{
|
||||
"all": "All",
|
||||
"single": "Single",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
schedulingv1alpha3.WorkloadCompositePodGroupAllDisruptionMode{}.OpenAPIModelName(), schedulingv1alpha3.WorkloadCompositePodGroupSingleDisruptionMode{}.OpenAPIModelName()},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_api_scheduling_v1alpha3_WorkloadCompositePodGroupGangSchedulingPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "WorkloadCompositePodGroupGangSchedulingPolicy defines the parameters for gang scheduling of a composite group's child groups.",
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"minGroupCount": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "minGroupCount is the minimum number of child groups that must be schedulable at the same time for the scheduler to admit the entire composite group. This field is optional. If it is not specified, the controller should inject a context-specific sane default (e.g., the number of child groups). If set, it must be a positive integer.",
|
||||
Type: []string{"integer"},
|
||||
Format: "int32",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_api_scheduling_v1alpha3_WorkloadCompositePodGroupSchedulingConstraints(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "WorkloadCompositePodGroupSchedulingConstraints defines composite-level scheduling constraints, such as topology, for a CompositePodGroup (a group of groups) managed by a workload controller.",
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"topology": {
|
||||
VendorExtensible: spec.VendorExtensible{
|
||||
Extensions: spec.Extensions{
|
||||
"x-kubernetes-list-type": "atomic",
|
||||
},
|
||||
},
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "topology specifies desired topological placements for all child groups within the composite group. If unset, no topology placement is requested.",
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Ref: ref(schedulingv1alpha3.TopologyConstraint{}.OpenAPIModelName()),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
schedulingv1alpha3.TopologyConstraint{}.OpenAPIModelName()},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_api_scheduling_v1alpha3_WorkloadCompositePodGroupSchedulingPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "WorkloadCompositePodGroupSchedulingPolicy defines the scheduling policy for a CompositePodGroup (a group of groups) managed by a workload controller. Exactly one policy must be set.",
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"basic": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "basic specifies that the child groups of this composite group should be scheduled independently.",
|
||||
Ref: ref(schedulingv1alpha3.WorkloadCompositePodGroupBasicSchedulingPolicy{}.OpenAPIModelName()),
|
||||
},
|
||||
},
|
||||
"gang": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "gang specifies that the child groups of this composite group should be scheduled using all-or-nothing semantics.",
|
||||
Ref: ref(schedulingv1alpha3.WorkloadCompositePodGroupGangSchedulingPolicy{}.OpenAPIModelName()),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
VendorExtensible: spec.VendorExtensible{
|
||||
Extensions: spec.Extensions{
|
||||
"x-kubernetes-unions": []interface{}{
|
||||
map[string]interface{}{
|
||||
"fields-to-discriminateBy": map[string]interface{}{
|
||||
"basic": "Basic",
|
||||
"gang": "Gang",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
schedulingv1alpha3.WorkloadCompositePodGroupBasicSchedulingPolicy{}.OpenAPIModelName(), schedulingv1alpha3.WorkloadCompositePodGroupGangSchedulingPolicy{}.OpenAPIModelName()},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_api_scheduling_v1alpha3_WorkloadCompositePodGroupSingleDisruptionMode(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "WorkloadCompositePodGroupSingleDisruptionMode indicates that child groups can be disrupted independently.",
|
||||
Type: []string{"object"},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_api_scheduling_v1alpha3_WorkloadList(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
|
||||
@@ -91,6 +91,34 @@ func (m *TypedLocalObjectReference) Reset() { *m = TypedLocalObjectReference{} }
|
||||
|
||||
func (m *Workload) Reset() { *m = Workload{} }
|
||||
|
||||
func (m *WorkloadCompositePodGroupAllDisruptionMode) Reset() {
|
||||
*m = WorkloadCompositePodGroupAllDisruptionMode{}
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupBasicSchedulingPolicy) Reset() {
|
||||
*m = WorkloadCompositePodGroupBasicSchedulingPolicy{}
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupDisruptionMode) Reset() {
|
||||
*m = WorkloadCompositePodGroupDisruptionMode{}
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupGangSchedulingPolicy) Reset() {
|
||||
*m = WorkloadCompositePodGroupGangSchedulingPolicy{}
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupSchedulingConstraints) Reset() {
|
||||
*m = WorkloadCompositePodGroupSchedulingConstraints{}
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupSchedulingPolicy) Reset() {
|
||||
*m = WorkloadCompositePodGroupSchedulingPolicy{}
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupSingleDisruptionMode) Reset() {
|
||||
*m = WorkloadCompositePodGroupSingleDisruptionMode{}
|
||||
}
|
||||
|
||||
func (m *WorkloadList) Reset() { *m = WorkloadList{} }
|
||||
|
||||
func (m *WorkloadPodGroupAllDisruptionMode) Reset() { *m = WorkloadPodGroupAllDisruptionMode{} }
|
||||
@@ -1439,6 +1467,234 @@ func (m *Workload) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupAllDisruptionMode) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupAllDisruptionMode) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupAllDisruptionMode) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupBasicSchedulingPolicy) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupBasicSchedulingPolicy) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupBasicSchedulingPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupDisruptionMode) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupDisruptionMode) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupDisruptionMode) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.All != nil {
|
||||
{
|
||||
size, err := m.All.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if m.Single != nil {
|
||||
{
|
||||
size, err := m.Single.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupGangSchedulingPolicy) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupGangSchedulingPolicy) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupGangSchedulingPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.MinGroupCount != nil {
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(*m.MinGroupCount))
|
||||
i--
|
||||
dAtA[i] = 0x8
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupSchedulingConstraints) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupSchedulingConstraints) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupSchedulingConstraints) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Topology) > 0 {
|
||||
for iNdEx := len(m.Topology) - 1; iNdEx >= 0; iNdEx-- {
|
||||
{
|
||||
size, err := m.Topology[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupSchedulingPolicy) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupSchedulingPolicy) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupSchedulingPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Gang != nil {
|
||||
{
|
||||
size, err := m.Gang.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if m.Basic != nil {
|
||||
{
|
||||
size, err := m.Basic.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupSingleDisruptionMode) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupSingleDisruptionMode) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupSingleDisruptionMode) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *WorkloadList) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
@@ -2364,6 +2620,94 @@ func (m *Workload) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupAllDisruptionMode) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupBasicSchedulingPolicy) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupDisruptionMode) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.Single != nil {
|
||||
l = m.Single.Size()
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
}
|
||||
if m.All != nil {
|
||||
l = m.All.Size()
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupGangSchedulingPolicy) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.MinGroupCount != nil {
|
||||
n += 1 + sovGenerated(uint64(*m.MinGroupCount))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupSchedulingConstraints) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Topology) > 0 {
|
||||
for _, e := range m.Topology {
|
||||
l = e.Size()
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupSchedulingPolicy) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.Basic != nil {
|
||||
l = m.Basic.Size()
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
}
|
||||
if m.Gang != nil {
|
||||
l = m.Gang.Size()
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *WorkloadCompositePodGroupSingleDisruptionMode) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *WorkloadList) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@@ -2918,6 +3262,80 @@ func (this *Workload) String() string {
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *WorkloadCompositePodGroupAllDisruptionMode) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&WorkloadCompositePodGroupAllDisruptionMode{`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *WorkloadCompositePodGroupBasicSchedulingPolicy) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&WorkloadCompositePodGroupBasicSchedulingPolicy{`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *WorkloadCompositePodGroupDisruptionMode) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&WorkloadCompositePodGroupDisruptionMode{`,
|
||||
`Single:` + strings.Replace(this.Single.String(), "WorkloadCompositePodGroupSingleDisruptionMode", "WorkloadCompositePodGroupSingleDisruptionMode", 1) + `,`,
|
||||
`All:` + strings.Replace(this.All.String(), "WorkloadCompositePodGroupAllDisruptionMode", "WorkloadCompositePodGroupAllDisruptionMode", 1) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *WorkloadCompositePodGroupGangSchedulingPolicy) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&WorkloadCompositePodGroupGangSchedulingPolicy{`,
|
||||
`MinGroupCount:` + valueToStringGenerated(this.MinGroupCount) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *WorkloadCompositePodGroupSchedulingConstraints) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
repeatedStringForTopology := "[]TopologyConstraint{"
|
||||
for _, f := range this.Topology {
|
||||
repeatedStringForTopology += strings.Replace(strings.Replace(f.String(), "TopologyConstraint", "TopologyConstraint", 1), `&`, ``, 1) + ","
|
||||
}
|
||||
repeatedStringForTopology += "}"
|
||||
s := strings.Join([]string{`&WorkloadCompositePodGroupSchedulingConstraints{`,
|
||||
`Topology:` + repeatedStringForTopology + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *WorkloadCompositePodGroupSchedulingPolicy) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&WorkloadCompositePodGroupSchedulingPolicy{`,
|
||||
`Basic:` + strings.Replace(this.Basic.String(), "WorkloadCompositePodGroupBasicSchedulingPolicy", "WorkloadCompositePodGroupBasicSchedulingPolicy", 1) + `,`,
|
||||
`Gang:` + strings.Replace(this.Gang.String(), "WorkloadCompositePodGroupGangSchedulingPolicy", "WorkloadCompositePodGroupGangSchedulingPolicy", 1) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *WorkloadCompositePodGroupSingleDisruptionMode) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&WorkloadCompositePodGroupSingleDisruptionMode{`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *WorkloadList) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
@@ -6794,6 +7212,554 @@ func (m *Workload) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *WorkloadCompositePodGroupAllDisruptionMode) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: WorkloadCompositePodGroupAllDisruptionMode: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: WorkloadCompositePodGroupAllDisruptionMode: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGenerated(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *WorkloadCompositePodGroupBasicSchedulingPolicy) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: WorkloadCompositePodGroupBasicSchedulingPolicy: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: WorkloadCompositePodGroupBasicSchedulingPolicy: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGenerated(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *WorkloadCompositePodGroupDisruptionMode) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: WorkloadCompositePodGroupDisruptionMode: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: WorkloadCompositePodGroupDisruptionMode: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Single", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Single == nil {
|
||||
m.Single = &WorkloadCompositePodGroupSingleDisruptionMode{}
|
||||
}
|
||||
if err := m.Single.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field All", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.All == nil {
|
||||
m.All = &WorkloadCompositePodGroupAllDisruptionMode{}
|
||||
}
|
||||
if err := m.All.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGenerated(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *WorkloadCompositePodGroupGangSchedulingPolicy) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: WorkloadCompositePodGroupGangSchedulingPolicy: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: WorkloadCompositePodGroupGangSchedulingPolicy: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field MinGroupCount", wireType)
|
||||
}
|
||||
var v int32
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int32(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
m.MinGroupCount = &v
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGenerated(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *WorkloadCompositePodGroupSchedulingConstraints) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: WorkloadCompositePodGroupSchedulingConstraints: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: WorkloadCompositePodGroupSchedulingConstraints: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Topology", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Topology = append(m.Topology, TopologyConstraint{})
|
||||
if err := m.Topology[len(m.Topology)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGenerated(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *WorkloadCompositePodGroupSchedulingPolicy) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: WorkloadCompositePodGroupSchedulingPolicy: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: WorkloadCompositePodGroupSchedulingPolicy: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Basic", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Basic == nil {
|
||||
m.Basic = &WorkloadCompositePodGroupBasicSchedulingPolicy{}
|
||||
}
|
||||
if err := m.Basic.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Gang", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Gang == nil {
|
||||
m.Gang = &WorkloadCompositePodGroupGangSchedulingPolicy{}
|
||||
}
|
||||
if err := m.Gang.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGenerated(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *WorkloadCompositePodGroupSingleDisruptionMode) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: WorkloadCompositePodGroupSingleDisruptionMode: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: WorkloadCompositePodGroupSingleDisruptionMode: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGenerated(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *WorkloadList) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
||||
@@ -897,6 +897,160 @@ message Workload {
|
||||
optional WorkloadSpec spec = 2;
|
||||
}
|
||||
|
||||
// WorkloadCompositePodGroupAllDisruptionMode indicates that all child groups
|
||||
// must be disrupted together.
|
||||
message WorkloadCompositePodGroupAllDisruptionMode {
|
||||
}
|
||||
|
||||
// WorkloadCompositePodGroupBasicSchedulingPolicy indicates that the child groups
|
||||
// of a composite group should be scheduled independently.
|
||||
message WorkloadCompositePodGroupBasicSchedulingPolicy {
|
||||
}
|
||||
|
||||
// WorkloadCompositePodGroupDisruptionMode defines how the child groups of a
|
||||
// composite group can be disrupted. Exactly one mode must be set.
|
||||
//
|
||||
// ---
|
||||
//
|
||||
// This is a reusable building block meant to be embedded in a composite
|
||||
// controller's own API, next to its other scheduling fields. It is the
|
||||
// group-of-groups analogue of WorkloadPodGroupDisruptionMode. It's recommended
|
||||
// to freeze the field after creation (+k8s:immutable), since the selected mode
|
||||
// is immutable in the compiled Workload. For example,
|
||||
//
|
||||
// type JobSetSchedulingConfiguration struct {
|
||||
// // DisruptionMode defines the mode in which this JobSet's child groups
|
||||
// // can be disrupted.
|
||||
// // One of Single, All.
|
||||
// // This field is immutable after creation: it may not be added or removed,
|
||||
// // and the selected mode may not be changed.
|
||||
// // +optional
|
||||
// // +k8s:optional
|
||||
// // +k8s:immutable
|
||||
// DisruptionMode *schedulingv1alpha3.WorkloadCompositePodGroupDisruptionMode `json:"disruptionMode,omitempty" protobuf:"bytes,N,opt,name=disruptionMode"`
|
||||
//
|
||||
// // other scheduling fields
|
||||
// }
|
||||
//
|
||||
// +union
|
||||
message WorkloadCompositePodGroupDisruptionMode {
|
||||
// single specifies that child groups can be disrupted independently from
|
||||
// each other.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:unionMember
|
||||
optional WorkloadCompositePodGroupSingleDisruptionMode single = 1;
|
||||
|
||||
// all specifies that all child groups must be disrupted together.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:unionMember
|
||||
optional WorkloadCompositePodGroupAllDisruptionMode all = 2;
|
||||
}
|
||||
|
||||
// WorkloadCompositePodGroupGangSchedulingPolicy defines the parameters for gang
|
||||
// scheduling of a composite group's child groups.
|
||||
message WorkloadCompositePodGroupGangSchedulingPolicy {
|
||||
// minGroupCount is the minimum number of child groups that must be
|
||||
// schedulable at the same time for the scheduler to admit the entire
|
||||
// composite group.
|
||||
// This field is optional. If it is not specified, the controller
|
||||
// should inject a context-specific sane default (e.g., the number of
|
||||
// child groups).
|
||||
// If set, it must be a positive integer.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:minimum=1
|
||||
optional int32 minGroupCount = 1;
|
||||
}
|
||||
|
||||
// WorkloadCompositePodGroupSchedulingConstraints defines composite-level
|
||||
// scheduling constraints, such as topology, for a CompositePodGroup (a group of
|
||||
// groups) managed by a workload controller.
|
||||
//
|
||||
// ---
|
||||
//
|
||||
// This is a reusable building block meant to be embedded in a composite
|
||||
// controller's own API, next to its other scheduling fields. It is the
|
||||
// group-of-groups analogue of WorkloadPodGroupSchedulingConstraints. It's
|
||||
// recommended to freeze the field after creation (+k8s:immutable), since
|
||||
// constraints are immutable in the compiled Workload. For example,
|
||||
//
|
||||
// type JobSetSchedulingConfiguration struct {
|
||||
// // SchedulingConstraints defines scheduling constraints (e.g. topology)
|
||||
// // for this JobSet.
|
||||
// // This field is immutable after creation.
|
||||
// // +optional
|
||||
// // +k8s:optional
|
||||
// // +k8s:immutable
|
||||
// SchedulingConstraints *schedulingv1alpha3.WorkloadCompositePodGroupSchedulingConstraints `json:"schedulingConstraints,omitempty" protobuf:"bytes,N,opt,name=schedulingConstraints"`
|
||||
//
|
||||
// // other scheduling fields
|
||||
// }
|
||||
message WorkloadCompositePodGroupSchedulingConstraints {
|
||||
// topology specifies desired topological placements for all child groups
|
||||
// within the composite group.
|
||||
// If unset, no topology placement is requested.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:maxItems=1
|
||||
// +listType=atomic
|
||||
// +k8s:listType=atomic
|
||||
repeated TopologyConstraint topology = 1;
|
||||
}
|
||||
|
||||
// WorkloadCompositePodGroupSchedulingPolicy defines the scheduling policy for a
|
||||
// CompositePodGroup (a group of groups) managed by a workload controller.
|
||||
// Exactly one policy must be set.
|
||||
//
|
||||
// ---
|
||||
//
|
||||
// This is a reusable building block meant to be embedded in a composite
|
||||
// controller's own API, next to its other scheduling fields. It is the
|
||||
// group-of-groups analogue of WorkloadPodGroupSchedulingPolicy. The composite
|
||||
// scheduling policy is immutable, so it's recommended to freeze the whole
|
||||
// field after creation (+k8s:immutable). For example,
|
||||
//
|
||||
// type JobSetSchedulingConfiguration struct {
|
||||
// // SchedulingPolicy defines the scheduling policy for this JobSet.
|
||||
// // Exactly one of Basic or Gang must be set.
|
||||
// // This field is immutable after creation.
|
||||
// // +optional
|
||||
// // +k8s:optional
|
||||
// // +k8s:immutable
|
||||
// SchedulingPolicy *schedulingv1alpha3.WorkloadCompositePodGroupSchedulingPolicy `json:"schedulingPolicy,omitempty" protobuf:"bytes,N,opt,name=schedulingPolicy"`
|
||||
//
|
||||
// // other scheduling fields
|
||||
// }
|
||||
//
|
||||
// +union
|
||||
message WorkloadCompositePodGroupSchedulingPolicy {
|
||||
// basic specifies that the child groups of this composite group should be
|
||||
// scheduled independently.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:unionMember
|
||||
optional WorkloadCompositePodGroupBasicSchedulingPolicy basic = 1;
|
||||
|
||||
// gang specifies that the child groups of this composite group should be
|
||||
// scheduled using all-or-nothing semantics.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:unionMember
|
||||
optional WorkloadCompositePodGroupGangSchedulingPolicy gang = 2;
|
||||
}
|
||||
|
||||
// WorkloadCompositePodGroupSingleDisruptionMode indicates that child groups
|
||||
// can be disrupted independently.
|
||||
message WorkloadCompositePodGroupSingleDisruptionMode {
|
||||
}
|
||||
|
||||
// WorkloadList contains a list of Workload resources.
|
||||
message WorkloadList {
|
||||
// Standard list metadata.
|
||||
|
||||
@@ -329,6 +329,68 @@ func (Workload) SwaggerDoc() map[string]string {
|
||||
return map_Workload
|
||||
}
|
||||
|
||||
var map_WorkloadCompositePodGroupAllDisruptionMode = map[string]string{
|
||||
"": "WorkloadCompositePodGroupAllDisruptionMode indicates that all child groups must be disrupted together.",
|
||||
}
|
||||
|
||||
func (WorkloadCompositePodGroupAllDisruptionMode) SwaggerDoc() map[string]string {
|
||||
return map_WorkloadCompositePodGroupAllDisruptionMode
|
||||
}
|
||||
|
||||
var map_WorkloadCompositePodGroupBasicSchedulingPolicy = map[string]string{
|
||||
"": "WorkloadCompositePodGroupBasicSchedulingPolicy indicates that the child groups of a composite group should be scheduled independently.",
|
||||
}
|
||||
|
||||
func (WorkloadCompositePodGroupBasicSchedulingPolicy) SwaggerDoc() map[string]string {
|
||||
return map_WorkloadCompositePodGroupBasicSchedulingPolicy
|
||||
}
|
||||
|
||||
var map_WorkloadCompositePodGroupDisruptionMode = map[string]string{
|
||||
"": "WorkloadCompositePodGroupDisruptionMode defines how the child groups of a composite group can be disrupted. Exactly one mode must be set.",
|
||||
"single": "single specifies that child groups can be disrupted independently from each other.",
|
||||
"all": "all specifies that all child groups must be disrupted together.",
|
||||
}
|
||||
|
||||
func (WorkloadCompositePodGroupDisruptionMode) SwaggerDoc() map[string]string {
|
||||
return map_WorkloadCompositePodGroupDisruptionMode
|
||||
}
|
||||
|
||||
var map_WorkloadCompositePodGroupGangSchedulingPolicy = map[string]string{
|
||||
"": "WorkloadCompositePodGroupGangSchedulingPolicy defines the parameters for gang scheduling of a composite group's child groups.",
|
||||
"minGroupCount": "minGroupCount is the minimum number of child groups that must be schedulable at the same time for the scheduler to admit the entire composite group. This field is optional. If it is not specified, the controller should inject a context-specific sane default (e.g., the number of child groups). If set, it must be a positive integer.",
|
||||
}
|
||||
|
||||
func (WorkloadCompositePodGroupGangSchedulingPolicy) SwaggerDoc() map[string]string {
|
||||
return map_WorkloadCompositePodGroupGangSchedulingPolicy
|
||||
}
|
||||
|
||||
var map_WorkloadCompositePodGroupSchedulingConstraints = map[string]string{
|
||||
"": "WorkloadCompositePodGroupSchedulingConstraints defines composite-level scheduling constraints, such as topology, for a CompositePodGroup (a group of groups) managed by a workload controller.",
|
||||
"topology": "topology specifies desired topological placements for all child groups within the composite group. If unset, no topology placement is requested.",
|
||||
}
|
||||
|
||||
func (WorkloadCompositePodGroupSchedulingConstraints) SwaggerDoc() map[string]string {
|
||||
return map_WorkloadCompositePodGroupSchedulingConstraints
|
||||
}
|
||||
|
||||
var map_WorkloadCompositePodGroupSchedulingPolicy = map[string]string{
|
||||
"": "WorkloadCompositePodGroupSchedulingPolicy defines the scheduling policy for a CompositePodGroup (a group of groups) managed by a workload controller. Exactly one policy must be set.",
|
||||
"basic": "basic specifies that the child groups of this composite group should be scheduled independently.",
|
||||
"gang": "gang specifies that the child groups of this composite group should be scheduled using all-or-nothing semantics.",
|
||||
}
|
||||
|
||||
func (WorkloadCompositePodGroupSchedulingPolicy) SwaggerDoc() map[string]string {
|
||||
return map_WorkloadCompositePodGroupSchedulingPolicy
|
||||
}
|
||||
|
||||
var map_WorkloadCompositePodGroupSingleDisruptionMode = map[string]string{
|
||||
"": "WorkloadCompositePodGroupSingleDisruptionMode indicates that child groups can be disrupted independently.",
|
||||
}
|
||||
|
||||
func (WorkloadCompositePodGroupSingleDisruptionMode) SwaggerDoc() map[string]string {
|
||||
return map_WorkloadCompositePodGroupSingleDisruptionMode
|
||||
}
|
||||
|
||||
var map_WorkloadList = map[string]string{
|
||||
"": "WorkloadList contains a list of Workload resources.",
|
||||
"metadata": "Standard list metadata.",
|
||||
|
||||
@@ -777,6 +777,148 @@ func (in *Workload) DeepCopyObject() runtime.Object {
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkloadCompositePodGroupAllDisruptionMode) DeepCopyInto(out *WorkloadCompositePodGroupAllDisruptionMode) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadCompositePodGroupAllDisruptionMode.
|
||||
func (in *WorkloadCompositePodGroupAllDisruptionMode) DeepCopy() *WorkloadCompositePodGroupAllDisruptionMode {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkloadCompositePodGroupAllDisruptionMode)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkloadCompositePodGroupBasicSchedulingPolicy) DeepCopyInto(out *WorkloadCompositePodGroupBasicSchedulingPolicy) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadCompositePodGroupBasicSchedulingPolicy.
|
||||
func (in *WorkloadCompositePodGroupBasicSchedulingPolicy) DeepCopy() *WorkloadCompositePodGroupBasicSchedulingPolicy {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkloadCompositePodGroupBasicSchedulingPolicy)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkloadCompositePodGroupDisruptionMode) DeepCopyInto(out *WorkloadCompositePodGroupDisruptionMode) {
|
||||
*out = *in
|
||||
if in.Single != nil {
|
||||
in, out := &in.Single, &out.Single
|
||||
*out = new(WorkloadCompositePodGroupSingleDisruptionMode)
|
||||
**out = **in
|
||||
}
|
||||
if in.All != nil {
|
||||
in, out := &in.All, &out.All
|
||||
*out = new(WorkloadCompositePodGroupAllDisruptionMode)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadCompositePodGroupDisruptionMode.
|
||||
func (in *WorkloadCompositePodGroupDisruptionMode) DeepCopy() *WorkloadCompositePodGroupDisruptionMode {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkloadCompositePodGroupDisruptionMode)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkloadCompositePodGroupGangSchedulingPolicy) DeepCopyInto(out *WorkloadCompositePodGroupGangSchedulingPolicy) {
|
||||
*out = *in
|
||||
if in.MinGroupCount != nil {
|
||||
in, out := &in.MinGroupCount, &out.MinGroupCount
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadCompositePodGroupGangSchedulingPolicy.
|
||||
func (in *WorkloadCompositePodGroupGangSchedulingPolicy) DeepCopy() *WorkloadCompositePodGroupGangSchedulingPolicy {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkloadCompositePodGroupGangSchedulingPolicy)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkloadCompositePodGroupSchedulingConstraints) DeepCopyInto(out *WorkloadCompositePodGroupSchedulingConstraints) {
|
||||
*out = *in
|
||||
if in.Topology != nil {
|
||||
in, out := &in.Topology, &out.Topology
|
||||
*out = make([]TopologyConstraint, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadCompositePodGroupSchedulingConstraints.
|
||||
func (in *WorkloadCompositePodGroupSchedulingConstraints) DeepCopy() *WorkloadCompositePodGroupSchedulingConstraints {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkloadCompositePodGroupSchedulingConstraints)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkloadCompositePodGroupSchedulingPolicy) DeepCopyInto(out *WorkloadCompositePodGroupSchedulingPolicy) {
|
||||
*out = *in
|
||||
if in.Basic != nil {
|
||||
in, out := &in.Basic, &out.Basic
|
||||
*out = new(WorkloadCompositePodGroupBasicSchedulingPolicy)
|
||||
**out = **in
|
||||
}
|
||||
if in.Gang != nil {
|
||||
in, out := &in.Gang, &out.Gang
|
||||
*out = new(WorkloadCompositePodGroupGangSchedulingPolicy)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadCompositePodGroupSchedulingPolicy.
|
||||
func (in *WorkloadCompositePodGroupSchedulingPolicy) DeepCopy() *WorkloadCompositePodGroupSchedulingPolicy {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkloadCompositePodGroupSchedulingPolicy)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkloadCompositePodGroupSingleDisruptionMode) DeepCopyInto(out *WorkloadCompositePodGroupSingleDisruptionMode) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadCompositePodGroupSingleDisruptionMode.
|
||||
func (in *WorkloadCompositePodGroupSingleDisruptionMode) DeepCopy() *WorkloadCompositePodGroupSingleDisruptionMode {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkloadCompositePodGroupSingleDisruptionMode)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkloadList) DeepCopyInto(out *WorkloadList) {
|
||||
*out = *in
|
||||
|
||||
@@ -166,6 +166,41 @@ func (in Workload) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha3.Workload"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in WorkloadCompositePodGroupAllDisruptionMode) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha3.WorkloadCompositePodGroupAllDisruptionMode"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in WorkloadCompositePodGroupBasicSchedulingPolicy) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha3.WorkloadCompositePodGroupBasicSchedulingPolicy"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in WorkloadCompositePodGroupDisruptionMode) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha3.WorkloadCompositePodGroupDisruptionMode"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in WorkloadCompositePodGroupGangSchedulingPolicy) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha3.WorkloadCompositePodGroupGangSchedulingPolicy"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in WorkloadCompositePodGroupSchedulingConstraints) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha3.WorkloadCompositePodGroupSchedulingConstraints"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in WorkloadCompositePodGroupSchedulingPolicy) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha3.WorkloadCompositePodGroupSchedulingPolicy"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in WorkloadCompositePodGroupSingleDisruptionMode) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha3.WorkloadCompositePodGroupSingleDisruptionMode"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in WorkloadList) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha3.WorkloadList"
|
||||
|
||||
@@ -2505,6 +2505,259 @@ func Validate_Workload(
|
||||
return errs
|
||||
}
|
||||
|
||||
var unionMembershipFor_k8s_io_api_scheduling_v1alpha3_WorkloadCompositePodGroupDisruptionMode_ = validate.NewUnionMembership(validate.NewUnionMember("single"), validate.NewUnionMember("all"))
|
||||
|
||||
// Validate_WorkloadCompositePodGroupDisruptionMode validates an instance of WorkloadCompositePodGroupDisruptionMode according
|
||||
// to declarative validation rules in the API schema.
|
||||
func Validate_WorkloadCompositePodGroupDisruptionMode(
|
||||
ctx context.Context, op operation.Operation, fldPath *field.Path,
|
||||
obj, oldObj *WorkloadCompositePodGroupDisruptionMode) (errs field.ErrorList) {
|
||||
|
||||
if e := validate.Union(ctx, op, fldPath, obj, oldObj, unionMembershipFor_k8s_io_api_scheduling_v1alpha3_WorkloadCompositePodGroupDisruptionMode_,
|
||||
func(obj *WorkloadCompositePodGroupDisruptionMode) bool {
|
||||
if obj == nil {
|
||||
return false
|
||||
}
|
||||
return obj.Single != nil
|
||||
},
|
||||
func(obj *WorkloadCompositePodGroupDisruptionMode) bool {
|
||||
if obj == nil {
|
||||
return false
|
||||
}
|
||||
return obj.All != nil
|
||||
}); len(e) != 0 {
|
||||
errs = append(errs, e...)
|
||||
}
|
||||
|
||||
{ // field WorkloadCompositePodGroupDisruptionMode.Single
|
||||
fn := func(
|
||||
fldPath *field.Path,
|
||||
obj, oldObj *WorkloadCompositePodGroupSingleDisruptionMode,
|
||||
oldValueCorrelated bool) (errs field.ErrorList) {
|
||||
// don't revalidate unchanged data
|
||||
if oldValueCorrelated && op.Type == operation.Update {
|
||||
if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
// call field-attached validations
|
||||
earlyReturn := false
|
||||
if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
|
||||
earlyReturn = true
|
||||
}
|
||||
if earlyReturn {
|
||||
return // do not proceed
|
||||
}
|
||||
return
|
||||
}
|
||||
oldVal := safe.Field(oldObj,
|
||||
func(oldObj *WorkloadCompositePodGroupDisruptionMode) *WorkloadCompositePodGroupSingleDisruptionMode {
|
||||
return oldObj.Single
|
||||
})
|
||||
errs = append(errs, fn(fldPath.Child("single"), obj.Single, oldVal, oldObj != nil)...)
|
||||
}
|
||||
|
||||
{ // field WorkloadCompositePodGroupDisruptionMode.All
|
||||
fn := func(
|
||||
fldPath *field.Path,
|
||||
obj, oldObj *WorkloadCompositePodGroupAllDisruptionMode,
|
||||
oldValueCorrelated bool) (errs field.ErrorList) {
|
||||
// don't revalidate unchanged data
|
||||
if oldValueCorrelated && op.Type == operation.Update {
|
||||
if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
// call field-attached validations
|
||||
earlyReturn := false
|
||||
if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
|
||||
earlyReturn = true
|
||||
}
|
||||
if earlyReturn {
|
||||
return // do not proceed
|
||||
}
|
||||
return
|
||||
}
|
||||
oldVal := safe.Field(oldObj,
|
||||
func(oldObj *WorkloadCompositePodGroupDisruptionMode) *WorkloadCompositePodGroupAllDisruptionMode {
|
||||
return oldObj.All
|
||||
})
|
||||
errs = append(errs, fn(fldPath.Child("all"), obj.All, oldVal, oldObj != nil)...)
|
||||
}
|
||||
|
||||
return errs
|
||||
}
|
||||
|
||||
// Validate_WorkloadCompositePodGroupGangSchedulingPolicy validates an instance of WorkloadCompositePodGroupGangSchedulingPolicy according
|
||||
// to declarative validation rules in the API schema.
|
||||
func Validate_WorkloadCompositePodGroupGangSchedulingPolicy(
|
||||
ctx context.Context, op operation.Operation, fldPath *field.Path,
|
||||
obj, oldObj *WorkloadCompositePodGroupGangSchedulingPolicy) (errs field.ErrorList) {
|
||||
|
||||
{ // field WorkloadCompositePodGroupGangSchedulingPolicy.MinGroupCount
|
||||
fn := func(
|
||||
fldPath *field.Path,
|
||||
obj, oldObj *int32,
|
||||
oldValueCorrelated bool) (errs field.ErrorList) {
|
||||
// don't revalidate unchanged data
|
||||
if oldValueCorrelated && op.Type == operation.Update {
|
||||
if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
// call field-attached validations
|
||||
earlyReturn := false
|
||||
if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
|
||||
earlyReturn = true
|
||||
}
|
||||
if earlyReturn {
|
||||
return // do not proceed
|
||||
}
|
||||
if e := validate.Minimum(ctx, op, fldPath, obj, oldObj, 1); len(e) != 0 {
|
||||
errs = append(errs, e...)
|
||||
}
|
||||
return
|
||||
}
|
||||
oldVal := safe.Field(oldObj,
|
||||
func(oldObj *WorkloadCompositePodGroupGangSchedulingPolicy) *int32 {
|
||||
return oldObj.MinGroupCount
|
||||
})
|
||||
errs = append(errs, fn(fldPath.Child("minGroupCount"), obj.MinGroupCount, oldVal, oldObj != nil)...)
|
||||
}
|
||||
|
||||
return errs
|
||||
}
|
||||
|
||||
// Validate_WorkloadCompositePodGroupSchedulingConstraints validates an instance of WorkloadCompositePodGroupSchedulingConstraints according
|
||||
// to declarative validation rules in the API schema.
|
||||
func Validate_WorkloadCompositePodGroupSchedulingConstraints(
|
||||
ctx context.Context, op operation.Operation, fldPath *field.Path,
|
||||
obj, oldObj *WorkloadCompositePodGroupSchedulingConstraints) (errs field.ErrorList) {
|
||||
|
||||
{ // field WorkloadCompositePodGroupSchedulingConstraints.Topology
|
||||
fn := func(
|
||||
fldPath *field.Path,
|
||||
obj, oldObj []TopologyConstraint,
|
||||
oldValueCorrelated bool) (errs field.ErrorList) {
|
||||
// don't revalidate unchanged data
|
||||
if oldValueCorrelated && op.Type == operation.Update {
|
||||
if equality.Semantic.DeepEqual(obj, oldObj) {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
// call field-attached validations
|
||||
earlyReturn := false
|
||||
if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 1).MarkShortCircuit(); len(e) != 0 {
|
||||
errs = append(errs, e...)
|
||||
earlyReturn = true
|
||||
}
|
||||
if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
|
||||
earlyReturn = true
|
||||
}
|
||||
if earlyReturn {
|
||||
return // do not proceed
|
||||
}
|
||||
// iterate the list and call the type's validation function
|
||||
if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_TopologyConstraint); len(e) != 0 {
|
||||
errs = append(errs, e...)
|
||||
}
|
||||
return
|
||||
}
|
||||
oldVal := safe.Field(oldObj,
|
||||
func(oldObj *WorkloadCompositePodGroupSchedulingConstraints) []TopologyConstraint {
|
||||
return oldObj.Topology
|
||||
})
|
||||
errs = append(errs, fn(fldPath.Child("topology"), obj.Topology, oldVal, oldObj != nil)...)
|
||||
}
|
||||
|
||||
return errs
|
||||
}
|
||||
|
||||
var unionMembershipFor_k8s_io_api_scheduling_v1alpha3_WorkloadCompositePodGroupSchedulingPolicy_ = validate.NewUnionMembership(validate.NewUnionMember("basic"), validate.NewUnionMember("gang"))
|
||||
|
||||
// Validate_WorkloadCompositePodGroupSchedulingPolicy validates an instance of WorkloadCompositePodGroupSchedulingPolicy according
|
||||
// to declarative validation rules in the API schema.
|
||||
func Validate_WorkloadCompositePodGroupSchedulingPolicy(
|
||||
ctx context.Context, op operation.Operation, fldPath *field.Path,
|
||||
obj, oldObj *WorkloadCompositePodGroupSchedulingPolicy) (errs field.ErrorList) {
|
||||
|
||||
if e := validate.Union(ctx, op, fldPath, obj, oldObj, unionMembershipFor_k8s_io_api_scheduling_v1alpha3_WorkloadCompositePodGroupSchedulingPolicy_,
|
||||
func(obj *WorkloadCompositePodGroupSchedulingPolicy) bool {
|
||||
if obj == nil {
|
||||
return false
|
||||
}
|
||||
return obj.Basic != nil
|
||||
},
|
||||
func(obj *WorkloadCompositePodGroupSchedulingPolicy) bool {
|
||||
if obj == nil {
|
||||
return false
|
||||
}
|
||||
return obj.Gang != nil
|
||||
}); len(e) != 0 {
|
||||
errs = append(errs, e...)
|
||||
}
|
||||
|
||||
{ // field WorkloadCompositePodGroupSchedulingPolicy.Basic
|
||||
fn := func(
|
||||
fldPath *field.Path,
|
||||
obj, oldObj *WorkloadCompositePodGroupBasicSchedulingPolicy,
|
||||
oldValueCorrelated bool) (errs field.ErrorList) {
|
||||
// don't revalidate unchanged data
|
||||
if oldValueCorrelated && op.Type == operation.Update {
|
||||
if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
// call field-attached validations
|
||||
earlyReturn := false
|
||||
if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
|
||||
earlyReturn = true
|
||||
}
|
||||
if earlyReturn {
|
||||
return // do not proceed
|
||||
}
|
||||
return
|
||||
}
|
||||
oldVal := safe.Field(oldObj,
|
||||
func(oldObj *WorkloadCompositePodGroupSchedulingPolicy) *WorkloadCompositePodGroupBasicSchedulingPolicy {
|
||||
return oldObj.Basic
|
||||
})
|
||||
errs = append(errs, fn(fldPath.Child("basic"), obj.Basic, oldVal, oldObj != nil)...)
|
||||
}
|
||||
|
||||
{ // field WorkloadCompositePodGroupSchedulingPolicy.Gang
|
||||
fn := func(
|
||||
fldPath *field.Path,
|
||||
obj, oldObj *WorkloadCompositePodGroupGangSchedulingPolicy,
|
||||
oldValueCorrelated bool) (errs field.ErrorList) {
|
||||
// don't revalidate unchanged data
|
||||
if oldValueCorrelated && op.Type == operation.Update {
|
||||
if equality.Semantic.DeepEqual(obj, oldObj) {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
// call field-attached validations
|
||||
earlyReturn := false
|
||||
if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
|
||||
earlyReturn = true
|
||||
}
|
||||
if earlyReturn {
|
||||
return // do not proceed
|
||||
}
|
||||
// call the type's validation function
|
||||
errs = append(errs, Validate_WorkloadCompositePodGroupGangSchedulingPolicy(ctx, op, fldPath, obj, oldObj)...)
|
||||
return
|
||||
}
|
||||
oldVal := safe.Field(oldObj,
|
||||
func(oldObj *WorkloadCompositePodGroupSchedulingPolicy) *WorkloadCompositePodGroupGangSchedulingPolicy {
|
||||
return oldObj.Gang
|
||||
})
|
||||
errs = append(errs, fn(fldPath.Child("gang"), obj.Gang, oldVal, oldObj != nil)...)
|
||||
}
|
||||
|
||||
return errs
|
||||
}
|
||||
|
||||
var unionMembershipFor_k8s_io_api_scheduling_v1alpha3_WorkloadPodGroupDisruptionMode_ = validate.NewUnionMembership(validate.NewUnionMember("single"), validate.NewUnionMember("all"))
|
||||
|
||||
// Validate_WorkloadPodGroupDisruptionMode validates an instance of WorkloadPodGroupDisruptionMode according
|
||||
|
||||
Reference in New Issue
Block a user