package v1alpha2

import "k8s.io/client-go/applyconfigurations/scheduling/v1alpha2"

Index

Types

type GangSchedulingPolicyApplyConfiguration

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 represents a declarative configuration of the GangSchedulingPolicy type for use with apply.

GangSchedulingPolicy defines the parameters for gang scheduling.

func GangSchedulingPolicy

func GangSchedulingPolicy() *GangSchedulingPolicyApplyConfiguration

GangSchedulingPolicyApplyConfiguration constructs a declarative configuration of the GangSchedulingPolicy type for use with apply.

func (*GangSchedulingPolicyApplyConfiguration) WithMinCount

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.

type PodGroupApplyConfiguration

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"`
}

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.

func ExtractPodGroup

func ExtractPodGroup(podGroup *schedulingv1alpha2.PodGroup, fieldManager string) (*PodGroupApplyConfiguration, error)

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 ExtractPodGroupFrom

func ExtractPodGroupFrom(podGroup *schedulingv1alpha2.PodGroup, fieldManager string, subresource string) (*PodGroupApplyConfiguration, error)

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 ExtractPodGroupStatus

func ExtractPodGroupStatus(podGroup *schedulingv1alpha2.PodGroup, fieldManager string) (*PodGroupApplyConfiguration, error)

ExtractPodGroupStatus extracts the applied configuration owned by fieldManager from podGroup for the status subresource.

func PodGroup

func PodGroup(name, namespace string) *PodGroupApplyConfiguration

PodGroup constructs a declarative configuration of the PodGroup type for use with apply.

func (*PodGroupApplyConfiguration) GetAPIVersion

func (b *PodGroupApplyConfiguration) GetAPIVersion() *string

GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.

func (*PodGroupApplyConfiguration) GetKind

func (b *PodGroupApplyConfiguration) GetKind() *string

GetKind retrieves the value of the Kind field in the declarative configuration.

func (*PodGroupApplyConfiguration) GetName

func (b *PodGroupApplyConfiguration) GetName() *string

GetName retrieves the value of the Name field in the declarative configuration.

func (*PodGroupApplyConfiguration) GetNamespace

func (b *PodGroupApplyConfiguration) GetNamespace() *string

GetNamespace retrieves the value of the Namespace field in the declarative configuration.

func (PodGroupApplyConfiguration) IsApplyConfiguration

func (b PodGroupApplyConfiguration) IsApplyConfiguration()

func (*PodGroupApplyConfiguration) WithAPIVersion

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 (*PodGroupApplyConfiguration) WithAnnotations

func (b *PodGroupApplyConfiguration) WithAnnotations(entries map[string]string) *PodGroupApplyConfiguration

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 (*PodGroupApplyConfiguration) WithCreationTimestamp

func (b *PodGroupApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PodGroupApplyConfiguration

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 (*PodGroupApplyConfiguration) WithDeletionGracePeriodSeconds

func (b *PodGroupApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PodGroupApplyConfiguration

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 (*PodGroupApplyConfiguration) WithDeletionTimestamp

func (b *PodGroupApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PodGroupApplyConfiguration

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 (*PodGroupApplyConfiguration) WithFinalizers

func (b *PodGroupApplyConfiguration) WithFinalizers(values ...string) *PodGroupApplyConfiguration

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 (*PodGroupApplyConfiguration) WithGenerateName

func (b *PodGroupApplyConfiguration) WithGenerateName(value string) *PodGroupApplyConfiguration

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 (*PodGroupApplyConfiguration) WithGeneration

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 (*PodGroupApplyConfiguration) WithKind

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 (*PodGroupApplyConfiguration) WithLabels

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 (*PodGroupApplyConfiguration) WithName

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 (*PodGroupApplyConfiguration) WithNamespace

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 (*PodGroupApplyConfiguration) WithOwnerReferences

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 (*PodGroupApplyConfiguration) WithResourceVersion

func (b *PodGroupApplyConfiguration) WithResourceVersion(value string) *PodGroupApplyConfiguration

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 (*PodGroupApplyConfiguration) WithSpec

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 (*PodGroupApplyConfiguration) WithStatus

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 (*PodGroupApplyConfiguration) WithUID

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.

type PodGroupSchedulingConstraintsApplyConfiguration

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 represents a declarative configuration of the PodGroupSchedulingConstraints type for use with apply.

PodGroupSchedulingConstraints defines scheduling constraints (e.g. topology) for a PodGroup.

func PodGroupSchedulingConstraints

func PodGroupSchedulingConstraints() *PodGroupSchedulingConstraintsApplyConfiguration

PodGroupSchedulingConstraintsApplyConfiguration constructs a declarative configuration of the PodGroupSchedulingConstraints type for use with apply.

func (*PodGroupSchedulingConstraintsApplyConfiguration) WithTopology

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.

type PodGroupSchedulingPolicyApplyConfiguration

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 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.

func PodGroupSchedulingPolicy

func PodGroupSchedulingPolicy() *PodGroupSchedulingPolicyApplyConfiguration

PodGroupSchedulingPolicyApplyConfiguration constructs a declarative configuration of the PodGroupSchedulingPolicy type for use with apply.

func (*PodGroupSchedulingPolicyApplyConfiguration) WithBasic

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 (*PodGroupSchedulingPolicyApplyConfiguration) WithGang

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.

type PodGroupSpecApplyConfiguration

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"`
}

PodGroupSpecApplyConfiguration represents a declarative configuration of the PodGroupSpec type for use with apply.

PodGroupSpec defines the desired state of a PodGroup.

func PodGroupSpec

func PodGroupSpec() *PodGroupSpecApplyConfiguration

PodGroupSpecApplyConfiguration constructs a declarative configuration of the PodGroupSpec type for use with apply.

func (*PodGroupSpecApplyConfiguration) WithPodGroupTemplateRef

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 (*PodGroupSpecApplyConfiguration) WithSchedulingConstraints

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 (*PodGroupSpecApplyConfiguration) WithSchedulingPolicy

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.

type PodGroupStatusApplyConfiguration

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"`
}

PodGroupStatusApplyConfiguration represents a declarative configuration of the PodGroupStatus type for use with apply.

PodGroupStatus represents information about the status of a pod group.

func PodGroupStatus

func PodGroupStatus() *PodGroupStatusApplyConfiguration

PodGroupStatusApplyConfiguration constructs a declarative configuration of the PodGroupStatus type for use with apply.

func (*PodGroupStatusApplyConfiguration) WithConditions

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.

type PodGroupTemplateApplyConfiguration

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"`
}

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.

func PodGroupTemplate

func PodGroupTemplate() *PodGroupTemplateApplyConfiguration

PodGroupTemplateApplyConfiguration constructs a declarative configuration of the PodGroupTemplate type for use with apply.

func (*PodGroupTemplateApplyConfiguration) WithName

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 (*PodGroupTemplateApplyConfiguration) WithSchedulingConstraints

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 (*PodGroupTemplateApplyConfiguration) WithSchedulingPolicy

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.

type PodGroupTemplateReferenceApplyConfiguration

type PodGroupTemplateReferenceApplyConfiguration struct {
	// Workload references the PodGroupTemplate within the Workload object that was used to create
	// the PodGroup.
	Workload *WorkloadPodGroupTemplateReferenceApplyConfiguration `json:"workload,omitempty"`
}

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.

func PodGroupTemplateReference

func PodGroupTemplateReference() *PodGroupTemplateReferenceApplyConfiguration

PodGroupTemplateReferenceApplyConfiguration constructs a declarative configuration of the PodGroupTemplateReference type for use with apply.

func (*PodGroupTemplateReferenceApplyConfiguration) WithWorkload

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.

type TopologyConstraintApplyConfiguration

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 represents a declarative configuration of the TopologyConstraint type for use with apply.

TopologyConstraint defines a topology constraint for a PodGroup.

func TopologyConstraint

func TopologyConstraint() *TopologyConstraintApplyConfiguration

TopologyConstraintApplyConfiguration constructs a declarative configuration of the TopologyConstraint type for use with apply.

func (*TopologyConstraintApplyConfiguration) WithKey

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.

type TypedLocalObjectReferenceApplyConfiguration

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 represents a declarative configuration of the TypedLocalObjectReference type for use with apply.

TypedLocalObjectReference allows to reference typed object inside the same namespace.

func TypedLocalObjectReference

func TypedLocalObjectReference() *TypedLocalObjectReferenceApplyConfiguration

TypedLocalObjectReferenceApplyConfiguration constructs a declarative configuration of the TypedLocalObjectReference type for use with apply.

func (*TypedLocalObjectReferenceApplyConfiguration) WithAPIGroup

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 (*TypedLocalObjectReferenceApplyConfiguration) WithKind

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 (*TypedLocalObjectReferenceApplyConfiguration) WithName

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.

type WorkloadApplyConfiguration

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"`
}

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.

func ExtractWorkload

func ExtractWorkload(workload *schedulingv1alpha2.Workload, fieldManager string) (*WorkloadApplyConfiguration, error)

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 ExtractWorkloadFrom

func ExtractWorkloadFrom(workload *schedulingv1alpha2.Workload, fieldManager string, subresource string) (*WorkloadApplyConfiguration, error)

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 Workload

func Workload(name, namespace string) *WorkloadApplyConfiguration

Workload constructs a declarative configuration of the Workload type for use with apply.

func (*WorkloadApplyConfiguration) GetAPIVersion

func (b *WorkloadApplyConfiguration) GetAPIVersion() *string

GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.

func (*WorkloadApplyConfiguration) GetKind

func (b *WorkloadApplyConfiguration) GetKind() *string

GetKind retrieves the value of the Kind field in the declarative configuration.

func (*WorkloadApplyConfiguration) GetName

func (b *WorkloadApplyConfiguration) GetName() *string

GetName retrieves the value of the Name field in the declarative configuration.

func (*WorkloadApplyConfiguration) GetNamespace

func (b *WorkloadApplyConfiguration) GetNamespace() *string

GetNamespace retrieves the value of the Namespace field in the declarative configuration.

func (WorkloadApplyConfiguration) IsApplyConfiguration

func (b WorkloadApplyConfiguration) IsApplyConfiguration()

func (*WorkloadApplyConfiguration) WithAPIVersion

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 (*WorkloadApplyConfiguration) WithAnnotations

func (b *WorkloadApplyConfiguration) WithAnnotations(entries map[string]string) *WorkloadApplyConfiguration

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 (*WorkloadApplyConfiguration) WithCreationTimestamp

func (b *WorkloadApplyConfiguration) WithCreationTimestamp(value metav1.Time) *WorkloadApplyConfiguration

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 (*WorkloadApplyConfiguration) WithDeletionGracePeriodSeconds

func (b *WorkloadApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *WorkloadApplyConfiguration

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 (*WorkloadApplyConfiguration) WithDeletionTimestamp

func (b *WorkloadApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *WorkloadApplyConfiguration

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 (*WorkloadApplyConfiguration) WithFinalizers

func (b *WorkloadApplyConfiguration) WithFinalizers(values ...string) *WorkloadApplyConfiguration

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 (*WorkloadApplyConfiguration) WithGenerateName

func (b *WorkloadApplyConfiguration) WithGenerateName(value string) *WorkloadApplyConfiguration

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 (*WorkloadApplyConfiguration) WithGeneration

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 (*WorkloadApplyConfiguration) WithKind

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 (*WorkloadApplyConfiguration) WithLabels

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 (*WorkloadApplyConfiguration) WithName

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 (*WorkloadApplyConfiguration) WithNamespace

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 (*WorkloadApplyConfiguration) WithOwnerReferences

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 (*WorkloadApplyConfiguration) WithResourceVersion

func (b *WorkloadApplyConfiguration) WithResourceVersion(value string) *WorkloadApplyConfiguration

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 (*WorkloadApplyConfiguration) WithSpec

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 (*WorkloadApplyConfiguration) WithUID

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.

type WorkloadPodGroupTemplateReferenceApplyConfiguration

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 represents a declarative configuration of the WorkloadPodGroupTemplateReference type for use with apply.

WorkloadPodGroupTemplateReference references the PodGroupTemplate within the Workload object.

func WorkloadPodGroupTemplateReference

func WorkloadPodGroupTemplateReference() *WorkloadPodGroupTemplateReferenceApplyConfiguration

WorkloadPodGroupTemplateReferenceApplyConfiguration constructs a declarative configuration of the WorkloadPodGroupTemplateReference type for use with apply.

func (*WorkloadPodGroupTemplateReferenceApplyConfiguration) WithPodGroupTemplateName

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 (*WorkloadPodGroupTemplateReferenceApplyConfiguration) WithWorkloadName

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.

type WorkloadSpecApplyConfiguration

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 represents a declarative configuration of the WorkloadSpec type for use with apply.

WorkloadSpec defines the desired state of a Workload.

func WorkloadSpec

func WorkloadSpec() *WorkloadSpecApplyConfiguration

WorkloadSpecApplyConfiguration constructs a declarative configuration of the WorkloadSpec type for use with apply.

func (*WorkloadSpecApplyConfiguration) WithControllerRef

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 (*WorkloadSpecApplyConfiguration) WithPodGroupTemplates

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.

Source Files

gangschedulingpolicy.go podgroup.go podgroupschedulingconstraints.go podgroupschedulingpolicy.go podgroupspec.go podgroupstatus.go podgrouptemplate.go podgrouptemplatereference.go topologyconstraint.go typedlocalobjectreference.go workload.go workloadpodgrouptemplatereference.go workloadspec.go

Version
v0.36.0-beta.0
Published
Mar 20, 2026
Platform
windows/amd64
Imports
6 packages
Last checked
3 minutes ago

Tools for package owners.