mirror of
https://github.com/kubernetes/client-go.git
synced 2026-07-18 02:43:18 +00:00
Signed-off-by: liyuerich <yue.li@daocloud.io> Kubernetes-commit: d61e923692317b6608e648f570d56b79f56e6287
101 lines
5.5 KiB
Go
101 lines
5.5 KiB
Go
/*
|
|
Copyright The Kubernetes Authors.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
|
|
package v1alpha3
|
|
|
|
// CompositePodGroupSpecApplyConfiguration represents a declarative configuration of the CompositePodGroupSpec type for use
|
|
// with apply.
|
|
//
|
|
// CompositePodGroupSpec defines the desired state of CompositePodGroup.
|
|
type CompositePodGroupSpecApplyConfiguration struct {
|
|
// parentCompositePodGroupName contains the name of the parent composite pod group
|
|
// within the same namespace as this composite pod group. It must be a DNS name.
|
|
// If it's nil, then this composite pod group is a root of a workload's hierarchy.
|
|
// This field is immutable.
|
|
ParentCompositePodGroupName *string `json:"parentCompositePodGroupName,omitempty"`
|
|
// workloadRef references an optional CompositePodGroup template within the
|
|
// Workload object that was used to create the CompositePodGroup.
|
|
// This field is required.
|
|
// This field is immutable.
|
|
WorkloadRef *WorkloadReferenceApplyConfiguration `json:"workloadRef,omitempty"`
|
|
// schedulingPolicy defines the scheduling policy for this instance of the CompositePodGroup.
|
|
// Controllers are expected to fill this field by copying it from a CompositePodGroupTemplate.
|
|
// This field is immutable.
|
|
SchedulingPolicy *CompositePodGroupSchedulingPolicyApplyConfiguration `json:"schedulingPolicy,omitempty"`
|
|
// priorityClassName defines the priority that should be considered when scheduling this CompositePodGroup.
|
|
// Controllers are expected to fill this field by copying it from a CompositePodGroupTemplate.
|
|
// If left unspecified, it is validated and resolved similarly to the PriorityClassName field in Pods
|
|
// (i.e. if no priority class is specified, admission control can set this to the global default
|
|
// priority class if it exists. Otherwise, the composite pod group's priority will be zero).
|
|
// This field is immutable.
|
|
PriorityClassName *string `json:"priorityClassName,omitempty"`
|
|
// priority is the value of priority of this composite pod group. Various system components
|
|
// use this field to find the priority of the composite pod group. When Priority Admission
|
|
// Controller is enabled, it prevents users from setting this field. The admission
|
|
// controller populates this field from PriorityClassName.
|
|
// The higher the value, the higher the priority.
|
|
// This field is immutable.
|
|
Priority *int32 `json:"priority,omitempty"`
|
|
}
|
|
|
|
// CompositePodGroupSpecApplyConfiguration constructs a declarative configuration of the CompositePodGroupSpec type for use with
|
|
// apply.
|
|
func CompositePodGroupSpec() *CompositePodGroupSpecApplyConfiguration {
|
|
return &CompositePodGroupSpecApplyConfiguration{}
|
|
}
|
|
|
|
// WithParentCompositePodGroupName sets the ParentCompositePodGroupName 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 ParentCompositePodGroupName field is set to the value of the last call.
|
|
func (b *CompositePodGroupSpecApplyConfiguration) WithParentCompositePodGroupName(value string) *CompositePodGroupSpecApplyConfiguration {
|
|
b.ParentCompositePodGroupName = &value
|
|
return b
|
|
}
|
|
|
|
// WithWorkloadRef sets the WorkloadRef 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 WorkloadRef field is set to the value of the last call.
|
|
func (b *CompositePodGroupSpecApplyConfiguration) WithWorkloadRef(value *WorkloadReferenceApplyConfiguration) *CompositePodGroupSpecApplyConfiguration {
|
|
b.WorkloadRef = value
|
|
return b
|
|
}
|
|
|
|
// WithSchedulingPolicy sets the SchedulingPolicy 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 SchedulingPolicy field is set to the value of the last call.
|
|
func (b *CompositePodGroupSpecApplyConfiguration) WithSchedulingPolicy(value *CompositePodGroupSchedulingPolicyApplyConfiguration) *CompositePodGroupSpecApplyConfiguration {
|
|
b.SchedulingPolicy = value
|
|
return b
|
|
}
|
|
|
|
// WithPriorityClassName sets the PriorityClassName 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 PriorityClassName field is set to the value of the last call.
|
|
func (b *CompositePodGroupSpecApplyConfiguration) WithPriorityClassName(value string) *CompositePodGroupSpecApplyConfiguration {
|
|
b.PriorityClassName = &value
|
|
return b
|
|
}
|
|
|
|
// WithPriority sets the Priority 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 Priority field is set to the value of the last call.
|
|
func (b *CompositePodGroupSpecApplyConfiguration) WithPriority(value int32) *CompositePodGroupSpecApplyConfiguration {
|
|
b.Priority = &value
|
|
return b
|
|
}
|