updated vendor
This commit is contained in:
Generated
Vendored
+44
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// GangSchedulingPolicyApplyConfiguration represents a declarative configuration of the GangSchedulingPolicy type for use
|
||||
// with apply.
|
||||
//
|
||||
// GangSchedulingPolicy defines the parameters for gang scheduling.
|
||||
type GangSchedulingPolicyApplyConfiguration struct {
|
||||
// MinCount is the minimum number of pods that must be schedulable or scheduled
|
||||
// at the same time for the scheduler to admit the entire group.
|
||||
// It must be a positive integer.
|
||||
MinCount *int32 `json:"minCount,omitempty"`
|
||||
}
|
||||
|
||||
// GangSchedulingPolicyApplyConfiguration constructs a declarative configuration of the GangSchedulingPolicy type for use with
|
||||
// apply.
|
||||
func GangSchedulingPolicy() *GangSchedulingPolicyApplyConfiguration {
|
||||
return &GangSchedulingPolicyApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithMinCount sets the MinCount 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 MinCount field is set to the value of the last call.
|
||||
func (b *GangSchedulingPolicyApplyConfiguration) WithMinCount(value int32) *GangSchedulingPolicyApplyConfiguration {
|
||||
b.MinCount = &value
|
||||
return b
|
||||
}
|
||||
+296
@@ -0,0 +1,296 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
import (
|
||||
schedulingv1alpha2 "k8s.io/api/scheduling/v1alpha2"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// PodGroupApplyConfiguration represents a declarative configuration of the PodGroup type for use
|
||||
// with apply.
|
||||
//
|
||||
// PodGroup represents a runtime instance of pods grouped together.
|
||||
// PodGroups are created by workload controllers (Job, LWS, JobSet, etc...) from
|
||||
// Workload.podGroupTemplates.
|
||||
// PodGroup API enablement is toggled by the GenericWorkload feature gate.
|
||||
type PodGroupApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Spec defines the desired state of the PodGroup.
|
||||
Spec *PodGroupSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
// Status represents the current observed state of the PodGroup.
|
||||
Status *PodGroupStatusApplyConfiguration `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// PodGroup constructs a declarative configuration of the PodGroup type for use with
|
||||
// apply.
|
||||
func PodGroup(name, namespace string) *PodGroupApplyConfiguration {
|
||||
b := &PodGroupApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("PodGroup")
|
||||
b.WithAPIVersion("scheduling.k8s.io/v1alpha2")
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractPodGroupFrom extracts the applied configuration owned by fieldManager from
|
||||
// podGroup for the specified subresource. Pass an empty string for subresource to extract
|
||||
// the main resource. Common subresources include "status", "scale", etc.
|
||||
// podGroup must be a unmodified PodGroup API object that was retrieved from the Kubernetes API.
|
||||
// ExtractPodGroupFrom provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
func ExtractPodGroupFrom(podGroup *schedulingv1alpha2.PodGroup, fieldManager string, subresource string) (*PodGroupApplyConfiguration, error) {
|
||||
b := &PodGroupApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(podGroup, internal.Parser().Type("io.k8s.api.scheduling.v1alpha2.PodGroup"), fieldManager, b, subresource)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(podGroup.Name)
|
||||
b.WithNamespace(podGroup.Namespace)
|
||||
|
||||
b.WithKind("PodGroup")
|
||||
b.WithAPIVersion("scheduling.k8s.io/v1alpha2")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// ExtractPodGroup extracts the applied configuration owned by fieldManager from
|
||||
// podGroup. If no managedFields are found in podGroup for fieldManager, a
|
||||
// PodGroupApplyConfiguration is returned with only the Name, Namespace (if applicable),
|
||||
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// podGroup must be a unmodified PodGroup API object that was retrieved from the Kubernetes API.
|
||||
// ExtractPodGroup provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
func ExtractPodGroup(podGroup *schedulingv1alpha2.PodGroup, fieldManager string) (*PodGroupApplyConfiguration, error) {
|
||||
return ExtractPodGroupFrom(podGroup, fieldManager, "")
|
||||
}
|
||||
|
||||
// ExtractPodGroupStatus extracts the applied configuration owned by fieldManager from
|
||||
// podGroup for the status subresource.
|
||||
func ExtractPodGroupStatus(podGroup *schedulingv1alpha2.PodGroup, fieldManager string) (*PodGroupApplyConfiguration, error) {
|
||||
return ExtractPodGroupFrom(podGroup, fieldManager, "status")
|
||||
}
|
||||
|
||||
func (b PodGroupApplyConfiguration) IsApplyConfiguration() {}
|
||||
|
||||
// WithKind sets the Kind 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 Kind field is set to the value of the last call.
|
||||
func (b *PodGroupApplyConfiguration) WithKind(value string) *PodGroupApplyConfiguration {
|
||||
b.TypeMetaApplyConfiguration.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call.
|
||||
func (b *PodGroupApplyConfiguration) WithAPIVersion(value string) *PodGroupApplyConfiguration {
|
||||
b.TypeMetaApplyConfiguration.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name 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 Name field is set to the value of the last call.
|
||||
func (b *PodGroupApplyConfiguration) WithName(value string) *PodGroupApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call.
|
||||
func (b *PodGroupApplyConfiguration) WithGenerateName(value string) *PodGroupApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
|
||||
func (b *PodGroupApplyConfiguration) WithNamespace(value string) *PodGroupApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID 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 UID field is set to the value of the last call.
|
||||
func (b *PodGroupApplyConfiguration) WithUID(value types.UID) *PodGroupApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call.
|
||||
func (b *PodGroupApplyConfiguration) WithResourceVersion(value string) *PodGroupApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation 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 Generation field is set to the value of the last call.
|
||||
func (b *PodGroupApplyConfiguration) WithGeneration(value int64) *PodGroupApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call.
|
||||
func (b *PodGroupApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PodGroupApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *PodGroupApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PodGroupApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *PodGroupApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PodGroupApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *PodGroupApplyConfiguration) WithLabels(entries map[string]string) *PodGroupApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
|
||||
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.ObjectMetaApplyConfiguration.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *PodGroupApplyConfiguration) WithAnnotations(entries map[string]string) *PodGroupApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
|
||||
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.ObjectMetaApplyConfiguration.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *PodGroupApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PodGroupApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *PodGroupApplyConfiguration) WithFinalizers(values ...string) *PodGroupApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *PodGroupApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec 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 Spec field is set to the value of the last call.
|
||||
func (b *PodGroupApplyConfiguration) WithSpec(value *PodGroupSpecApplyConfiguration) *PodGroupApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStatus sets the Status 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 Status field is set to the value of the last call.
|
||||
func (b *PodGroupApplyConfiguration) WithStatus(value *PodGroupStatusApplyConfiguration) *PodGroupApplyConfiguration {
|
||||
b.Status = value
|
||||
return b
|
||||
}
|
||||
|
||||
// GetKind retrieves the value of the Kind field in the declarative configuration.
|
||||
func (b *PodGroupApplyConfiguration) GetKind() *string {
|
||||
return b.TypeMetaApplyConfiguration.Kind
|
||||
}
|
||||
|
||||
// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.
|
||||
func (b *PodGroupApplyConfiguration) GetAPIVersion() *string {
|
||||
return b.TypeMetaApplyConfiguration.APIVersion
|
||||
}
|
||||
|
||||
// GetName retrieves the value of the Name field in the declarative configuration.
|
||||
func (b *PodGroupApplyConfiguration) GetName() *string {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
return b.ObjectMetaApplyConfiguration.Name
|
||||
}
|
||||
|
||||
// GetNamespace retrieves the value of the Namespace field in the declarative configuration.
|
||||
func (b *PodGroupApplyConfiguration) GetNamespace() *string {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
return b.ObjectMetaApplyConfiguration.Namespace
|
||||
}
|
||||
Generated
Vendored
+89
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// PodGroupResourceClaimApplyConfiguration represents a declarative configuration of the PodGroupResourceClaim type for use
|
||||
// with apply.
|
||||
//
|
||||
// PodGroupResourceClaim references exactly one ResourceClaim, either directly
|
||||
// or by naming a ResourceClaimTemplate which is then turned into a ResourceClaim
|
||||
// for the PodGroup.
|
||||
//
|
||||
// It adds a name to it that uniquely identifies the ResourceClaim inside the PodGroup.
|
||||
// Pods that need access to the ResourceClaim define a matching reference in its
|
||||
// own Spec.ResourceClaims. The Pod's claim must match all fields of the
|
||||
// PodGroup's claim exactly.
|
||||
type PodGroupResourceClaimApplyConfiguration struct {
|
||||
// Name uniquely identifies this resource claim inside the PodGroup.
|
||||
// This must be a DNS_LABEL.
|
||||
Name *string `json:"name,omitempty"`
|
||||
// ResourceClaimName is the name of a ResourceClaim object in the same
|
||||
// namespace as this PodGroup. The ResourceClaim will be reserved for the
|
||||
// PodGroup instead of its individual pods.
|
||||
//
|
||||
// Exactly one of ResourceClaimName and ResourceClaimTemplateName must
|
||||
// be set.
|
||||
ResourceClaimName *string `json:"resourceClaimName,omitempty"`
|
||||
// ResourceClaimTemplateName is the name of a ResourceClaimTemplate
|
||||
// object in the same namespace as this PodGroup.
|
||||
//
|
||||
// The template will be used to create a new ResourceClaim, which will
|
||||
// be bound to this PodGroup. When this PodGroup is deleted, the ResourceClaim
|
||||
// will also be deleted. The PodGroup name and resource name, along with a
|
||||
// generated component, will be used to form a unique name for the
|
||||
// ResourceClaim, which will be recorded in podgroup.status.resourceClaimStatuses.
|
||||
//
|
||||
// This field is immutable and no changes will be made to the
|
||||
// corresponding ResourceClaim by the control plane after creating the
|
||||
// ResourceClaim.
|
||||
//
|
||||
// Exactly one of ResourceClaimName and ResourceClaimTemplateName must
|
||||
// be set.
|
||||
ResourceClaimTemplateName *string `json:"resourceClaimTemplateName,omitempty"`
|
||||
}
|
||||
|
||||
// PodGroupResourceClaimApplyConfiguration constructs a declarative configuration of the PodGroupResourceClaim type for use with
|
||||
// apply.
|
||||
func PodGroupResourceClaim() *PodGroupResourceClaimApplyConfiguration {
|
||||
return &PodGroupResourceClaimApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithName sets the Name 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 Name field is set to the value of the last call.
|
||||
func (b *PodGroupResourceClaimApplyConfiguration) WithName(value string) *PodGroupResourceClaimApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceClaimName sets the ResourceClaimName 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 ResourceClaimName field is set to the value of the last call.
|
||||
func (b *PodGroupResourceClaimApplyConfiguration) WithResourceClaimName(value string) *PodGroupResourceClaimApplyConfiguration {
|
||||
b.ResourceClaimName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceClaimTemplateName sets the ResourceClaimTemplateName 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 ResourceClaimTemplateName field is set to the value of the last call.
|
||||
func (b *PodGroupResourceClaimApplyConfiguration) WithResourceClaimTemplateName(value string) *PodGroupResourceClaimApplyConfiguration {
|
||||
b.ResourceClaimTemplateName = &value
|
||||
return b
|
||||
}
|
||||
Generated
Vendored
+59
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// PodGroupResourceClaimStatusApplyConfiguration represents a declarative configuration of the PodGroupResourceClaimStatus type for use
|
||||
// with apply.
|
||||
//
|
||||
// PodGroupResourceClaimStatus is stored in the PodGroupStatus for each
|
||||
// PodGroupResourceClaim which references a ResourceClaimTemplate. It stores the
|
||||
// generated name for the corresponding ResourceClaim.
|
||||
type PodGroupResourceClaimStatusApplyConfiguration struct {
|
||||
// Name uniquely identifies this resource claim inside the PodGroup. This
|
||||
// must match the name of an entry in podgroup.spec.resourceClaims, which
|
||||
// implies that the string must be a DNS_LABEL.
|
||||
Name *string `json:"name,omitempty"`
|
||||
// ResourceClaimName is the name of the ResourceClaim that was generated for
|
||||
// the PodGroup in the namespace of the PodGroup. If this is unset, then
|
||||
// generating a ResourceClaim was not necessary. The
|
||||
// podgroup.spec.resourceClaims entry can be ignored in this case.
|
||||
ResourceClaimName *string `json:"resourceClaimName,omitempty"`
|
||||
}
|
||||
|
||||
// PodGroupResourceClaimStatusApplyConfiguration constructs a declarative configuration of the PodGroupResourceClaimStatus type for use with
|
||||
// apply.
|
||||
func PodGroupResourceClaimStatus() *PodGroupResourceClaimStatusApplyConfiguration {
|
||||
return &PodGroupResourceClaimStatusApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithName sets the Name 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 Name field is set to the value of the last call.
|
||||
func (b *PodGroupResourceClaimStatusApplyConfiguration) WithName(value string) *PodGroupResourceClaimStatusApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceClaimName sets the ResourceClaimName 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 ResourceClaimName field is set to the value of the last call.
|
||||
func (b *PodGroupResourceClaimStatusApplyConfiguration) WithResourceClaimName(value string) *PodGroupResourceClaimStatusApplyConfiguration {
|
||||
b.ResourceClaimName = &value
|
||||
return b
|
||||
}
|
||||
Generated
Vendored
+48
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// PodGroupSchedulingConstraintsApplyConfiguration represents a declarative configuration of the PodGroupSchedulingConstraints type for use
|
||||
// with apply.
|
||||
//
|
||||
// PodGroupSchedulingConstraints defines scheduling constraints (e.g. topology) for a PodGroup.
|
||||
type PodGroupSchedulingConstraintsApplyConfiguration struct {
|
||||
// Topology defines the topology constraints for the pod group.
|
||||
// Currently only a single topology constraint can be specified. This may change in the future.
|
||||
Topology []TopologyConstraintApplyConfiguration `json:"topology,omitempty"`
|
||||
}
|
||||
|
||||
// PodGroupSchedulingConstraintsApplyConfiguration constructs a declarative configuration of the PodGroupSchedulingConstraints type for use with
|
||||
// apply.
|
||||
func PodGroupSchedulingConstraints() *PodGroupSchedulingConstraintsApplyConfiguration {
|
||||
return &PodGroupSchedulingConstraintsApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithTopology adds the given value to the Topology field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Topology field.
|
||||
func (b *PodGroupSchedulingConstraintsApplyConfiguration) WithTopology(values ...*TopologyConstraintApplyConfiguration) *PodGroupSchedulingConstraintsApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTopology")
|
||||
}
|
||||
b.Topology = append(b.Topology, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
Generated
Vendored
+59
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
import (
|
||||
schedulingv1alpha2 "k8s.io/api/scheduling/v1alpha2"
|
||||
)
|
||||
|
||||
// PodGroupSchedulingPolicyApplyConfiguration represents a declarative configuration of the PodGroupSchedulingPolicy type for use
|
||||
// with apply.
|
||||
//
|
||||
// PodGroupSchedulingPolicy defines the scheduling configuration for a PodGroup.
|
||||
// Exactly one policy must be set.
|
||||
type PodGroupSchedulingPolicyApplyConfiguration struct {
|
||||
// Basic specifies that the pods in this group should be scheduled using
|
||||
// standard Kubernetes scheduling behavior.
|
||||
Basic *schedulingv1alpha2.BasicSchedulingPolicy `json:"basic,omitempty"`
|
||||
// Gang specifies that the pods in this group should be scheduled using
|
||||
// all-or-nothing semantics.
|
||||
Gang *GangSchedulingPolicyApplyConfiguration `json:"gang,omitempty"`
|
||||
}
|
||||
|
||||
// PodGroupSchedulingPolicyApplyConfiguration constructs a declarative configuration of the PodGroupSchedulingPolicy type for use with
|
||||
// apply.
|
||||
func PodGroupSchedulingPolicy() *PodGroupSchedulingPolicyApplyConfiguration {
|
||||
return &PodGroupSchedulingPolicyApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithBasic sets the Basic 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 Basic field is set to the value of the last call.
|
||||
func (b *PodGroupSchedulingPolicyApplyConfiguration) WithBasic(value schedulingv1alpha2.BasicSchedulingPolicy) *PodGroupSchedulingPolicyApplyConfiguration {
|
||||
b.Basic = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGang sets the Gang 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 Gang field is set to the value of the last call.
|
||||
func (b *PodGroupSchedulingPolicyApplyConfiguration) WithGang(value *GangSchedulingPolicyApplyConfiguration) *PodGroupSchedulingPolicyApplyConfiguration {
|
||||
b.Gang = value
|
||||
return b
|
||||
}
|
||||
+145
@@ -0,0 +1,145 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
import (
|
||||
schedulingv1alpha2 "k8s.io/api/scheduling/v1alpha2"
|
||||
)
|
||||
|
||||
// PodGroupSpecApplyConfiguration represents a declarative configuration of the PodGroupSpec type for use
|
||||
// with apply.
|
||||
//
|
||||
// PodGroupSpec defines the desired state of a PodGroup.
|
||||
type PodGroupSpecApplyConfiguration struct {
|
||||
// PodGroupTemplateRef references an optional PodGroup template within other object
|
||||
// (e.g. Workload) that was used to create the PodGroup. This field is immutable.
|
||||
PodGroupTemplateRef *PodGroupTemplateReferenceApplyConfiguration `json:"podGroupTemplateRef,omitempty"`
|
||||
// SchedulingPolicy defines the scheduling policy for this instance of the PodGroup.
|
||||
// Controllers are expected to fill this field by copying it from a PodGroupTemplate.
|
||||
// This field is immutable.
|
||||
SchedulingPolicy *PodGroupSchedulingPolicyApplyConfiguration `json:"schedulingPolicy,omitempty"`
|
||||
// SchedulingConstraints defines optional scheduling constraints (e.g. topology) for this PodGroup.
|
||||
// Controllers are expected to fill this field by copying it from a PodGroupTemplate.
|
||||
// This field is immutable.
|
||||
// This field is only available when the TopologyAwareWorkloadScheduling feature gate is enabled.
|
||||
SchedulingConstraints *PodGroupSchedulingConstraintsApplyConfiguration `json:"schedulingConstraints,omitempty"`
|
||||
// ResourceClaims defines which ResourceClaims may be shared among Pods in
|
||||
// the group. Pods consume the devices allocated to a PodGroup's claim by
|
||||
// defining a claim in its own Spec.ResourceClaims that matches the
|
||||
// PodGroup's claim exactly. The claim must have the same name and refer to
|
||||
// the same ResourceClaim or ResourceClaimTemplate.
|
||||
//
|
||||
// This is an alpha-level field and requires that the
|
||||
// DRAWorkloadResourceClaims feature gate is enabled.
|
||||
//
|
||||
// This field is immutable.
|
||||
ResourceClaims []PodGroupResourceClaimApplyConfiguration `json:"resourceClaims,omitempty"`
|
||||
// DisruptionMode defines the mode in which a given PodGroup can be disrupted.
|
||||
// Controllers are expected to fill this field by copying it from a PodGroupTemplate.
|
||||
// One of Pod, PodGroup. Defaults to Pod if unset.
|
||||
// This field is immutable.
|
||||
// This field is available only when the WorkloadAwarePreemption feature gate
|
||||
// is enabled.
|
||||
DisruptionMode *schedulingv1alpha2.DisruptionMode `json:"disruptionMode,omitempty"`
|
||||
// PriorityClassName defines the priority that should be considered when scheduling this pod group.
|
||||
// Controllers are expected to fill this field by copying it from a PodGroupTemplate.
|
||||
// Otherwise, it is validated and resolved similarly to the PriorityClassName on PodGroupTemplate
|
||||
// (i.e. if no priority class is specified, admission control can set this to the global default
|
||||
// priority class if it exists. Otherwise, the pod group's priority will be zero).
|
||||
// This field is immutable.
|
||||
// This field is available only when the WorkloadAwarePreemption feature gate
|
||||
// is enabled.
|
||||
PriorityClassName *string `json:"priorityClassName,omitempty"`
|
||||
// Priority is the value of priority of this pod group. Various system components
|
||||
// use this field to find the priority of the 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.
|
||||
// This field is available only when the WorkloadAwarePreemption feature gate
|
||||
// is enabled.
|
||||
Priority *int32 `json:"priority,omitempty"`
|
||||
}
|
||||
|
||||
// PodGroupSpecApplyConfiguration constructs a declarative configuration of the PodGroupSpec type for use with
|
||||
// apply.
|
||||
func PodGroupSpec() *PodGroupSpecApplyConfiguration {
|
||||
return &PodGroupSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithPodGroupTemplateRef sets the PodGroupTemplateRef 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 PodGroupTemplateRef field is set to the value of the last call.
|
||||
func (b *PodGroupSpecApplyConfiguration) WithPodGroupTemplateRef(value *PodGroupTemplateReferenceApplyConfiguration) *PodGroupSpecApplyConfiguration {
|
||||
b.PodGroupTemplateRef = 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 *PodGroupSpecApplyConfiguration) WithSchedulingPolicy(value *PodGroupSchedulingPolicyApplyConfiguration) *PodGroupSpecApplyConfiguration {
|
||||
b.SchedulingPolicy = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSchedulingConstraints sets the SchedulingConstraints 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 SchedulingConstraints field is set to the value of the last call.
|
||||
func (b *PodGroupSpecApplyConfiguration) WithSchedulingConstraints(value *PodGroupSchedulingConstraintsApplyConfiguration) *PodGroupSpecApplyConfiguration {
|
||||
b.SchedulingConstraints = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceClaims adds the given value to the ResourceClaims field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the ResourceClaims field.
|
||||
func (b *PodGroupSpecApplyConfiguration) WithResourceClaims(values ...*PodGroupResourceClaimApplyConfiguration) *PodGroupSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithResourceClaims")
|
||||
}
|
||||
b.ResourceClaims = append(b.ResourceClaims, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDisruptionMode sets the DisruptionMode 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 DisruptionMode field is set to the value of the last call.
|
||||
func (b *PodGroupSpecApplyConfiguration) WithDisruptionMode(value schedulingv1alpha2.DisruptionMode) *PodGroupSpecApplyConfiguration {
|
||||
b.DisruptionMode = &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 *PodGroupSpecApplyConfiguration) WithPriorityClassName(value string) *PodGroupSpecApplyConfiguration {
|
||||
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 *PodGroupSpecApplyConfiguration) WithPriority(value int32) *PodGroupSpecApplyConfiguration {
|
||||
b.Priority = &value
|
||||
return b
|
||||
}
|
||||
Generated
Vendored
+81
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
import (
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// PodGroupStatusApplyConfiguration represents a declarative configuration of the PodGroupStatus type for use
|
||||
// with apply.
|
||||
//
|
||||
// PodGroupStatus represents information about the status of a pod group.
|
||||
type PodGroupStatusApplyConfiguration struct {
|
||||
// Conditions represent the latest observations of the PodGroup's state.
|
||||
//
|
||||
// Known condition types:
|
||||
// - "PodGroupScheduled": Indicates whether the scheduling requirement has been satisfied.
|
||||
// - "DisruptionTarget": Indicates whether the PodGroup is about to be terminated
|
||||
// due to disruption such as preemption.
|
||||
//
|
||||
// Known reasons for the PodGroupScheduled condition:
|
||||
// - "Unschedulable": The PodGroup cannot be scheduled due to resource constraints,
|
||||
// affinity/anti-affinity rules, or insufficient capacity for the gang.
|
||||
// - "SchedulerError": The PodGroup cannot be scheduled due to some internal error
|
||||
// that happened during scheduling, for example due to nodeAffinity parsing errors.
|
||||
//
|
||||
// Known reasons for the DisruptionTarget condition:
|
||||
// - "PreemptionByScheduler": The PodGroup was preempted by the scheduler to make room for
|
||||
// higher-priority PodGroups or Pods.
|
||||
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
// Status of resource claims.
|
||||
ResourceClaimStatuses []PodGroupResourceClaimStatusApplyConfiguration `json:"resourceClaimStatuses,omitempty"`
|
||||
}
|
||||
|
||||
// PodGroupStatusApplyConfiguration constructs a declarative configuration of the PodGroupStatus type for use with
|
||||
// apply.
|
||||
func PodGroupStatus() *PodGroupStatusApplyConfiguration {
|
||||
return &PodGroupStatusApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithConditions adds the given value to the Conditions field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Conditions field.
|
||||
func (b *PodGroupStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *PodGroupStatusApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithConditions")
|
||||
}
|
||||
b.Conditions = append(b.Conditions, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceClaimStatuses adds the given value to the ResourceClaimStatuses field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the ResourceClaimStatuses field.
|
||||
func (b *PodGroupStatusApplyConfiguration) WithResourceClaimStatuses(values ...*PodGroupResourceClaimStatusApplyConfiguration) *PodGroupStatusApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithResourceClaimStatuses")
|
||||
}
|
||||
b.ResourceClaimStatuses = append(b.ResourceClaimStatuses, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
Generated
Vendored
+136
@@ -0,0 +1,136 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
import (
|
||||
schedulingv1alpha2 "k8s.io/api/scheduling/v1alpha2"
|
||||
)
|
||||
|
||||
// PodGroupTemplateApplyConfiguration represents a declarative configuration of the PodGroupTemplate type for use
|
||||
// with apply.
|
||||
//
|
||||
// PodGroupTemplate represents a template for a set of pods with a scheduling policy.
|
||||
type PodGroupTemplateApplyConfiguration struct {
|
||||
// Name is a unique identifier for the PodGroupTemplate within the Workload.
|
||||
// It must be a DNS label. This field is immutable.
|
||||
Name *string `json:"name,omitempty"`
|
||||
// SchedulingPolicy defines the scheduling policy for this PodGroupTemplate.
|
||||
SchedulingPolicy *PodGroupSchedulingPolicyApplyConfiguration `json:"schedulingPolicy,omitempty"`
|
||||
// SchedulingConstraints defines optional scheduling constraints (e.g. topology) for this PodGroupTemplate.
|
||||
// This field is only available when the TopologyAwareWorkloadScheduling feature gate is enabled.
|
||||
SchedulingConstraints *PodGroupSchedulingConstraintsApplyConfiguration `json:"schedulingConstraints,omitempty"`
|
||||
// ResourceClaims defines which ResourceClaims may be shared among Pods in
|
||||
// the group. Pods consume the devices allocated to a PodGroup's claim by
|
||||
// defining a claim in its own Spec.ResourceClaims that matches the
|
||||
// PodGroup's claim exactly. The claim must have the same name and refer to
|
||||
// the same ResourceClaim or ResourceClaimTemplate.
|
||||
//
|
||||
// This is an alpha-level field and requires that the
|
||||
// DRAWorkloadResourceClaims feature gate is enabled.
|
||||
//
|
||||
// This field is immutable.
|
||||
ResourceClaims []PodGroupResourceClaimApplyConfiguration `json:"resourceClaims,omitempty"`
|
||||
// DisruptionMode defines the mode in which a given PodGroup can be disrupted.
|
||||
// One of Pod, PodGroup.
|
||||
// This field is available only when the WorkloadAwarePreemption feature gate
|
||||
// is enabled.
|
||||
DisruptionMode *schedulingv1alpha2.DisruptionMode `json:"disruptionMode,omitempty"`
|
||||
// PriorityClassName indicates the priority that should be considered when scheduling
|
||||
// a pod group created from this template. If no priority class is specified, admission
|
||||
// control can set this to the global default priority class if it exists. Otherwise,
|
||||
// pod groups created from this template will have the priority set to zero.
|
||||
// This field is available only when the WorkloadAwarePreemption feature gate
|
||||
// is enabled.
|
||||
PriorityClassName *string `json:"priorityClassName,omitempty"`
|
||||
// Priority is the value of priority of pod groups created from this template. Various
|
||||
// system components use this field to find the priority of the 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 available only when the WorkloadAwarePreemption feature gate
|
||||
// is enabled.
|
||||
Priority *int32 `json:"priority,omitempty"`
|
||||
}
|
||||
|
||||
// PodGroupTemplateApplyConfiguration constructs a declarative configuration of the PodGroupTemplate type for use with
|
||||
// apply.
|
||||
func PodGroupTemplate() *PodGroupTemplateApplyConfiguration {
|
||||
return &PodGroupTemplateApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithName sets the Name 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 Name field is set to the value of the last call.
|
||||
func (b *PodGroupTemplateApplyConfiguration) WithName(value string) *PodGroupTemplateApplyConfiguration {
|
||||
b.Name = &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 *PodGroupTemplateApplyConfiguration) WithSchedulingPolicy(value *PodGroupSchedulingPolicyApplyConfiguration) *PodGroupTemplateApplyConfiguration {
|
||||
b.SchedulingPolicy = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSchedulingConstraints sets the SchedulingConstraints 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 SchedulingConstraints field is set to the value of the last call.
|
||||
func (b *PodGroupTemplateApplyConfiguration) WithSchedulingConstraints(value *PodGroupSchedulingConstraintsApplyConfiguration) *PodGroupTemplateApplyConfiguration {
|
||||
b.SchedulingConstraints = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceClaims adds the given value to the ResourceClaims field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the ResourceClaims field.
|
||||
func (b *PodGroupTemplateApplyConfiguration) WithResourceClaims(values ...*PodGroupResourceClaimApplyConfiguration) *PodGroupTemplateApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithResourceClaims")
|
||||
}
|
||||
b.ResourceClaims = append(b.ResourceClaims, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDisruptionMode sets the DisruptionMode 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 DisruptionMode field is set to the value of the last call.
|
||||
func (b *PodGroupTemplateApplyConfiguration) WithDisruptionMode(value schedulingv1alpha2.DisruptionMode) *PodGroupTemplateApplyConfiguration {
|
||||
b.DisruptionMode = &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 *PodGroupTemplateApplyConfiguration) WithPriorityClassName(value string) *PodGroupTemplateApplyConfiguration {
|
||||
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 *PodGroupTemplateApplyConfiguration) WithPriority(value int32) *PodGroupTemplateApplyConfiguration {
|
||||
b.Priority = &value
|
||||
return b
|
||||
}
|
||||
Generated
Vendored
+44
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// PodGroupTemplateReferenceApplyConfiguration represents a declarative configuration of the PodGroupTemplateReference type for use
|
||||
// with apply.
|
||||
//
|
||||
// PodGroupTemplateReference references a PodGroup template defined in some object (e.g. Workload).
|
||||
// Exactly one reference must be set.
|
||||
type PodGroupTemplateReferenceApplyConfiguration struct {
|
||||
// Workload references the PodGroupTemplate within the Workload object that was used to create
|
||||
// the PodGroup.
|
||||
Workload *WorkloadPodGroupTemplateReferenceApplyConfiguration `json:"workload,omitempty"`
|
||||
}
|
||||
|
||||
// PodGroupTemplateReferenceApplyConfiguration constructs a declarative configuration of the PodGroupTemplateReference type for use with
|
||||
// apply.
|
||||
func PodGroupTemplateReference() *PodGroupTemplateReferenceApplyConfiguration {
|
||||
return &PodGroupTemplateReferenceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithWorkload sets the Workload 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 Workload field is set to the value of the last call.
|
||||
func (b *PodGroupTemplateReferenceApplyConfiguration) WithWorkload(value *WorkloadPodGroupTemplateReferenceApplyConfiguration) *PodGroupTemplateReferenceApplyConfiguration {
|
||||
b.Workload = value
|
||||
return b
|
||||
}
|
||||
Generated
Vendored
+45
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// TopologyConstraintApplyConfiguration represents a declarative configuration of the TopologyConstraint type for use
|
||||
// with apply.
|
||||
//
|
||||
// TopologyConstraint defines a topology constraint for a PodGroup.
|
||||
type TopologyConstraintApplyConfiguration struct {
|
||||
// Key specifies the key of the node label representing the topology domain.
|
||||
// All pods within the PodGroup must be colocated within the same domain instance.
|
||||
// Different PodGroups can land on different domain instances even if they derive from the same PodGroupTemplate.
|
||||
// Examples: "topology.kubernetes.io/rack"
|
||||
Key *string `json:"key,omitempty"`
|
||||
}
|
||||
|
||||
// TopologyConstraintApplyConfiguration constructs a declarative configuration of the TopologyConstraint type for use with
|
||||
// apply.
|
||||
func TopologyConstraint() *TopologyConstraintApplyConfiguration {
|
||||
return &TopologyConstraintApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithKey sets the Key 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 Key field is set to the value of the last call.
|
||||
func (b *TopologyConstraintApplyConfiguration) WithKey(value string) *TopologyConstraintApplyConfiguration {
|
||||
b.Key = &value
|
||||
return b
|
||||
}
|
||||
Generated
Vendored
+67
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// TypedLocalObjectReferenceApplyConfiguration represents a declarative configuration of the TypedLocalObjectReference type for use
|
||||
// with apply.
|
||||
//
|
||||
// TypedLocalObjectReference allows to reference typed object inside the same namespace.
|
||||
type TypedLocalObjectReferenceApplyConfiguration struct {
|
||||
// APIGroup is the group for the resource being referenced.
|
||||
// If APIGroup is empty, the specified Kind must be in the core API group.
|
||||
// For any other third-party types, setting APIGroup is required.
|
||||
// It must be a DNS subdomain.
|
||||
APIGroup *string `json:"apiGroup,omitempty"`
|
||||
// Kind is the type of resource being referenced.
|
||||
// It must be a path segment name.
|
||||
Kind *string `json:"kind,omitempty"`
|
||||
// Name is the name of resource being referenced.
|
||||
// It must be a path segment name.
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// TypedLocalObjectReferenceApplyConfiguration constructs a declarative configuration of the TypedLocalObjectReference type for use with
|
||||
// apply.
|
||||
func TypedLocalObjectReference() *TypedLocalObjectReferenceApplyConfiguration {
|
||||
return &TypedLocalObjectReferenceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithAPIGroup sets the APIGroup 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 APIGroup field is set to the value of the last call.
|
||||
func (b *TypedLocalObjectReferenceApplyConfiguration) WithAPIGroup(value string) *TypedLocalObjectReferenceApplyConfiguration {
|
||||
b.APIGroup = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKind sets the Kind 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 Kind field is set to the value of the last call.
|
||||
func (b *TypedLocalObjectReferenceApplyConfiguration) WithKind(value string) *TypedLocalObjectReferenceApplyConfiguration {
|
||||
b.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name 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 Name field is set to the value of the last call.
|
||||
func (b *TypedLocalObjectReferenceApplyConfiguration) WithName(value string) *TypedLocalObjectReferenceApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
+280
@@ -0,0 +1,280 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
import (
|
||||
schedulingv1alpha2 "k8s.io/api/scheduling/v1alpha2"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// WorkloadApplyConfiguration represents a declarative configuration of the Workload type for use
|
||||
// with apply.
|
||||
//
|
||||
// Workload allows for expressing scheduling constraints that should be used
|
||||
// when managing the lifecycle of workloads from the scheduling perspective,
|
||||
// including scheduling, preemption, eviction and other phases.
|
||||
// Workload API enablement is toggled by the GenericWorkload feature gate.
|
||||
type WorkloadApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Spec defines the desired behavior of a Workload.
|
||||
Spec *WorkloadSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// Workload constructs a declarative configuration of the Workload type for use with
|
||||
// apply.
|
||||
func Workload(name, namespace string) *WorkloadApplyConfiguration {
|
||||
b := &WorkloadApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("Workload")
|
||||
b.WithAPIVersion("scheduling.k8s.io/v1alpha2")
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractWorkloadFrom extracts the applied configuration owned by fieldManager from
|
||||
// workload for the specified subresource. Pass an empty string for subresource to extract
|
||||
// the main resource. Common subresources include "status", "scale", etc.
|
||||
// workload must be a unmodified Workload API object that was retrieved from the Kubernetes API.
|
||||
// ExtractWorkloadFrom provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
func ExtractWorkloadFrom(workload *schedulingv1alpha2.Workload, fieldManager string, subresource string) (*WorkloadApplyConfiguration, error) {
|
||||
b := &WorkloadApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(workload, internal.Parser().Type("io.k8s.api.scheduling.v1alpha2.Workload"), fieldManager, b, subresource)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(workload.Name)
|
||||
b.WithNamespace(workload.Namespace)
|
||||
|
||||
b.WithKind("Workload")
|
||||
b.WithAPIVersion("scheduling.k8s.io/v1alpha2")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// ExtractWorkload extracts the applied configuration owned by fieldManager from
|
||||
// workload. If no managedFields are found in workload for fieldManager, a
|
||||
// WorkloadApplyConfiguration is returned with only the Name, Namespace (if applicable),
|
||||
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// workload must be a unmodified Workload API object that was retrieved from the Kubernetes API.
|
||||
// ExtractWorkload provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
func ExtractWorkload(workload *schedulingv1alpha2.Workload, fieldManager string) (*WorkloadApplyConfiguration, error) {
|
||||
return ExtractWorkloadFrom(workload, fieldManager, "")
|
||||
}
|
||||
|
||||
func (b WorkloadApplyConfiguration) IsApplyConfiguration() {}
|
||||
|
||||
// WithKind sets the Kind 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 Kind field is set to the value of the last call.
|
||||
func (b *WorkloadApplyConfiguration) WithKind(value string) *WorkloadApplyConfiguration {
|
||||
b.TypeMetaApplyConfiguration.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call.
|
||||
func (b *WorkloadApplyConfiguration) WithAPIVersion(value string) *WorkloadApplyConfiguration {
|
||||
b.TypeMetaApplyConfiguration.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name 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 Name field is set to the value of the last call.
|
||||
func (b *WorkloadApplyConfiguration) WithName(value string) *WorkloadApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call.
|
||||
func (b *WorkloadApplyConfiguration) WithGenerateName(value string) *WorkloadApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
|
||||
func (b *WorkloadApplyConfiguration) WithNamespace(value string) *WorkloadApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID 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 UID field is set to the value of the last call.
|
||||
func (b *WorkloadApplyConfiguration) WithUID(value types.UID) *WorkloadApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call.
|
||||
func (b *WorkloadApplyConfiguration) WithResourceVersion(value string) *WorkloadApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation 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 Generation field is set to the value of the last call.
|
||||
func (b *WorkloadApplyConfiguration) WithGeneration(value int64) *WorkloadApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call.
|
||||
func (b *WorkloadApplyConfiguration) WithCreationTimestamp(value metav1.Time) *WorkloadApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *WorkloadApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *WorkloadApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *WorkloadApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *WorkloadApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *WorkloadApplyConfiguration) WithLabels(entries map[string]string) *WorkloadApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
|
||||
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.ObjectMetaApplyConfiguration.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *WorkloadApplyConfiguration) WithAnnotations(entries map[string]string) *WorkloadApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
|
||||
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.ObjectMetaApplyConfiguration.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *WorkloadApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *WorkloadApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *WorkloadApplyConfiguration) WithFinalizers(values ...string) *WorkloadApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *WorkloadApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec 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 Spec field is set to the value of the last call.
|
||||
func (b *WorkloadApplyConfiguration) WithSpec(value *WorkloadSpecApplyConfiguration) *WorkloadApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
||||
|
||||
// GetKind retrieves the value of the Kind field in the declarative configuration.
|
||||
func (b *WorkloadApplyConfiguration) GetKind() *string {
|
||||
return b.TypeMetaApplyConfiguration.Kind
|
||||
}
|
||||
|
||||
// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.
|
||||
func (b *WorkloadApplyConfiguration) GetAPIVersion() *string {
|
||||
return b.TypeMetaApplyConfiguration.APIVersion
|
||||
}
|
||||
|
||||
// GetName retrieves the value of the Name field in the declarative configuration.
|
||||
func (b *WorkloadApplyConfiguration) GetName() *string {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
return b.ObjectMetaApplyConfiguration.Name
|
||||
}
|
||||
|
||||
// GetNamespace retrieves the value of the Namespace field in the declarative configuration.
|
||||
func (b *WorkloadApplyConfiguration) GetNamespace() *string {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
return b.ObjectMetaApplyConfiguration.Namespace
|
||||
}
|
||||
vendor/k8s.io/client-go/applyconfigurations/scheduling/v1alpha2/workloadpodgrouptemplatereference.go
Generated
Vendored
+52
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// WorkloadPodGroupTemplateReferenceApplyConfiguration represents a declarative configuration of the WorkloadPodGroupTemplateReference type for use
|
||||
// with apply.
|
||||
//
|
||||
// WorkloadPodGroupTemplateReference references the PodGroupTemplate within the Workload object.
|
||||
type WorkloadPodGroupTemplateReferenceApplyConfiguration struct {
|
||||
// WorkloadName defines the name of the Workload object.
|
||||
WorkloadName *string `json:"workloadName,omitempty"`
|
||||
// PodGroupTemplateName defines the PodGroupTemplate name within the Workload object.
|
||||
PodGroupTemplateName *string `json:"podGroupTemplateName,omitempty"`
|
||||
}
|
||||
|
||||
// WorkloadPodGroupTemplateReferenceApplyConfiguration constructs a declarative configuration of the WorkloadPodGroupTemplateReference type for use with
|
||||
// apply.
|
||||
func WorkloadPodGroupTemplateReference() *WorkloadPodGroupTemplateReferenceApplyConfiguration {
|
||||
return &WorkloadPodGroupTemplateReferenceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithWorkloadName sets the WorkloadName 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 WorkloadName field is set to the value of the last call.
|
||||
func (b *WorkloadPodGroupTemplateReferenceApplyConfiguration) WithWorkloadName(value string) *WorkloadPodGroupTemplateReferenceApplyConfiguration {
|
||||
b.WorkloadName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPodGroupTemplateName sets the PodGroupTemplateName 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 PodGroupTemplateName field is set to the value of the last call.
|
||||
func (b *WorkloadPodGroupTemplateReferenceApplyConfiguration) WithPodGroupTemplateName(value string) *WorkloadPodGroupTemplateReferenceApplyConfiguration {
|
||||
b.PodGroupTemplateName = &value
|
||||
return b
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// WorkloadSpecApplyConfiguration represents a declarative configuration of the WorkloadSpec type for use
|
||||
// with apply.
|
||||
//
|
||||
// WorkloadSpec defines the desired state of a Workload.
|
||||
type WorkloadSpecApplyConfiguration struct {
|
||||
// ControllerRef is an optional reference to the controlling object, such as a
|
||||
// Deployment or Job. This field is intended for use by tools like CLIs
|
||||
// to provide a link back to the original workload definition.
|
||||
// This field is immutable.
|
||||
ControllerRef *TypedLocalObjectReferenceApplyConfiguration `json:"controllerRef,omitempty"`
|
||||
// PodGroupTemplates is the list of templates that make up the Workload.
|
||||
// The maximum number of templates is 8. This field is immutable.
|
||||
PodGroupTemplates []PodGroupTemplateApplyConfiguration `json:"podGroupTemplates,omitempty"`
|
||||
}
|
||||
|
||||
// WorkloadSpecApplyConfiguration constructs a declarative configuration of the WorkloadSpec type for use with
|
||||
// apply.
|
||||
func WorkloadSpec() *WorkloadSpecApplyConfiguration {
|
||||
return &WorkloadSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithControllerRef sets the ControllerRef 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 ControllerRef field is set to the value of the last call.
|
||||
func (b *WorkloadSpecApplyConfiguration) WithControllerRef(value *TypedLocalObjectReferenceApplyConfiguration) *WorkloadSpecApplyConfiguration {
|
||||
b.ControllerRef = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPodGroupTemplates adds the given value to the PodGroupTemplates field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the PodGroupTemplates field.
|
||||
func (b *WorkloadSpecApplyConfiguration) WithPodGroupTemplates(values ...*PodGroupTemplateApplyConfiguration) *WorkloadSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithPodGroupTemplates")
|
||||
}
|
||||
b.PodGroupTemplates = append(b.PodGroupTemplates, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
Reference in New Issue
Block a user