updated vendor
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
// +k8s:openapi-model-package=io.k8s.api.scheduling.v1alpha2
|
||||
|
||||
// +groupName=scheduling.k8s.io
|
||||
|
||||
package v1alpha2
|
||||
+3828
File diff suppressed because it is too large
Load Diff
+550
@@ -0,0 +1,550 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
|
||||
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
package k8s.io.api.scheduling.v1alpha2;
|
||||
|
||||
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
|
||||
|
||||
// Package-wide variables from generator "generated".
|
||||
option go_package = "k8s.io/api/scheduling/v1alpha2";
|
||||
|
||||
// BasicSchedulingPolicy indicates that standard Kubernetes
|
||||
// scheduling behavior should be used.
|
||||
message BasicSchedulingPolicy {
|
||||
}
|
||||
|
||||
// GangSchedulingPolicy defines the parameters for gang scheduling.
|
||||
message GangSchedulingPolicy {
|
||||
// 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.
|
||||
//
|
||||
// +required
|
||||
// +k8s:required
|
||||
// +k8s:minimum=1
|
||||
optional int32 minCount = 1;
|
||||
}
|
||||
|
||||
// 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.
|
||||
message PodGroup {
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
//
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec defines the desired state of the PodGroup.
|
||||
//
|
||||
// +required
|
||||
optional PodGroupSpec spec = 2;
|
||||
|
||||
// Status represents the current observed state of the PodGroup.
|
||||
//
|
||||
// +optional
|
||||
optional PodGroupStatus status = 3;
|
||||
}
|
||||
|
||||
// PodGroupList contains a list of PodGroup resources.
|
||||
message PodGroupList {
|
||||
// Standard list metadata.
|
||||
//
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is the list of PodGroups.
|
||||
repeated PodGroup items = 2;
|
||||
}
|
||||
|
||||
// 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.
|
||||
message PodGroupResourceClaim {
|
||||
// Name uniquely identifies this resource claim inside the PodGroup.
|
||||
// This must be a DNS_LABEL.
|
||||
//
|
||||
// +required
|
||||
// +k8s:required
|
||||
// +k8s:format=k8s-short-name
|
||||
optional string name = 1;
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:unionMember
|
||||
// +k8s:format=k8s-long-name
|
||||
optional string resourceClaimName = 2;
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:unionMember
|
||||
// +k8s:format=k8s-long-name
|
||||
optional string resourceClaimTemplateName = 3;
|
||||
}
|
||||
|
||||
// PodGroupResourceClaimStatus is stored in the PodGroupStatus for each
|
||||
// PodGroupResourceClaim which references a ResourceClaimTemplate. It stores the
|
||||
// generated name for the corresponding ResourceClaim.
|
||||
message PodGroupResourceClaimStatus {
|
||||
// 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.
|
||||
//
|
||||
// +required
|
||||
optional string name = 1;
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:format=k8s-long-name
|
||||
optional string resourceClaimName = 2;
|
||||
}
|
||||
|
||||
// PodGroupSchedulingConstraints defines scheduling constraints (e.g. topology) for a PodGroup.
|
||||
message PodGroupSchedulingConstraints {
|
||||
// Topology defines the topology constraints for the pod group.
|
||||
// Currently only a single topology constraint can be specified. This may change in the future.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:maxItems=1
|
||||
// +listType=atomic
|
||||
// +k8s:listType=atomic
|
||||
repeated TopologyConstraint topology = 1;
|
||||
}
|
||||
|
||||
// PodGroupSchedulingPolicy defines the scheduling configuration for a PodGroup.
|
||||
// Exactly one policy must be set.
|
||||
// +union
|
||||
message PodGroupSchedulingPolicy {
|
||||
// Basic specifies that the pods in this group should be scheduled using
|
||||
// standard Kubernetes scheduling behavior.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:unionMember
|
||||
optional BasicSchedulingPolicy basic = 1;
|
||||
|
||||
// Gang specifies that the pods in this group should be scheduled using
|
||||
// all-or-nothing semantics.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:unionMember
|
||||
optional GangSchedulingPolicy gang = 2;
|
||||
}
|
||||
|
||||
// PodGroupSpec defines the desired state of a PodGroup.
|
||||
message PodGroupSpec {
|
||||
// PodGroupTemplateRef references an optional PodGroup template within other object
|
||||
// (e.g. Workload) that was used to create the PodGroup. This field is immutable.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:immutable
|
||||
optional PodGroupTemplateReference podGroupTemplateRef = 1;
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +required
|
||||
// +k8s:immutable
|
||||
optional PodGroupSchedulingPolicy schedulingPolicy = 2;
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +featureGate=TopologyAwareWorkloadScheduling
|
||||
// +optional
|
||||
// +k8s:ifDisabled(TopologyAwareWorkloadScheduling)=+k8s:forbidden
|
||||
// +k8s:ifEnabled(TopologyAwareWorkloadScheduling)=+k8s:optional
|
||||
// +k8s:ifEnabled(TopologyAwareWorkloadScheduling)=+k8s:immutable
|
||||
optional PodGroupSchedulingConstraints schedulingConstraints = 3;
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +optional
|
||||
// +patchMergeKey=name
|
||||
// +patchStrategy=merge,retainKeys
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
// +k8s:optional
|
||||
// +k8s:listType=map
|
||||
// +k8s:listMapKey=name
|
||||
// +k8s:maxItems=4
|
||||
// +k8s:immutable
|
||||
// +featureGate=DRAWorkloadResourceClaims
|
||||
repeated PodGroupResourceClaim resourceClaims = 4;
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +featureGate=WorkloadAwarePreemption
|
||||
// +optional
|
||||
// +k8s:ifDisabled("WorkloadAwarePreemption")=+k8s:forbidden
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:optional
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:immutable
|
||||
// +default="Pod"
|
||||
optional string disruptionMode = 5;
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +featureGate=WorkloadAwarePreemption
|
||||
// +optional
|
||||
// +k8s:ifDisabled("WorkloadAwarePreemption")=+k8s:forbidden
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:optional
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:format=k8s-long-name
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:immutable
|
||||
optional string priorityClassName = 6;
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +featureGate=WorkloadAwarePreemption
|
||||
// +optional
|
||||
// +k8s:ifDisabled("WorkloadAwarePreemption")=+k8s:forbidden
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:optional
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:immutable
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:maximum=1000000000 # HighestUserDefinablePriority
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:minimum=-2147483648
|
||||
optional int32 priority = 7;
|
||||
}
|
||||
|
||||
// PodGroupStatus represents information about the status of a pod group.
|
||||
message PodGroupStatus {
|
||||
// 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.
|
||||
//
|
||||
// +optional
|
||||
// +patchMergeKey=type
|
||||
// +patchStrategy=merge
|
||||
// +listType=map
|
||||
// +listMapKey=type
|
||||
repeated .k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 1;
|
||||
|
||||
// Status of resource claims.
|
||||
// +optional
|
||||
// +patchMergeKey=name
|
||||
// +patchStrategy=merge,retainKeys
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
// +k8s:optional
|
||||
// +k8s:listType=map
|
||||
// +k8s:listMapKey=name
|
||||
// +k8s:maxItems=4
|
||||
// +featureGate=DRAWorkloadResourceClaims
|
||||
repeated PodGroupResourceClaimStatus resourceClaimStatuses = 2;
|
||||
}
|
||||
|
||||
// PodGroupTemplate represents a template for a set of pods with a scheduling policy.
|
||||
message PodGroupTemplate {
|
||||
// Name is a unique identifier for the PodGroupTemplate within the Workload.
|
||||
// It must be a DNS label. This field is immutable.
|
||||
//
|
||||
// +required
|
||||
// +k8s:required
|
||||
// +k8s:format=k8s-short-name
|
||||
optional string name = 1;
|
||||
|
||||
// SchedulingPolicy defines the scheduling policy for this PodGroupTemplate.
|
||||
//
|
||||
// +required
|
||||
optional PodGroupSchedulingPolicy schedulingPolicy = 2;
|
||||
|
||||
// SchedulingConstraints defines optional scheduling constraints (e.g. topology) for this PodGroupTemplate.
|
||||
// This field is only available when the TopologyAwareWorkloadScheduling feature gate is enabled.
|
||||
//
|
||||
// +featureGate=TopologyAwareWorkloadScheduling
|
||||
// +optional
|
||||
// +k8s:ifDisabled(TopologyAwareWorkloadScheduling)=+k8s:forbidden
|
||||
// +k8s:ifEnabled(TopologyAwareWorkloadScheduling)=+k8s:optional
|
||||
optional PodGroupSchedulingConstraints schedulingConstraints = 3;
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +optional
|
||||
// +patchMergeKey=name
|
||||
// +patchStrategy=merge,retainKeys
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
// +k8s:optional
|
||||
// +k8s:listType=map
|
||||
// +k8s:listMapKey=name
|
||||
// +k8s:maxItems=4
|
||||
// +k8s:immutable
|
||||
// +featureGate=DRAWorkloadResourceClaims
|
||||
repeated PodGroupResourceClaim resourceClaims = 4;
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +featureGate=WorkloadAwarePreemption
|
||||
// +optional
|
||||
// +k8s:ifDisabled("WorkloadAwarePreemption")=+k8s:forbidden
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:optional
|
||||
optional string disruptionMode = 5;
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +featureGate=WorkloadAwarePreemption
|
||||
// +optional
|
||||
// +k8s:ifDisabled("WorkloadAwarePreemption")=+k8s:forbidden
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:optional
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:format=k8s-long-name
|
||||
optional string priorityClassName = 6;
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +featureGate=WorkloadAwarePreemption
|
||||
// +optional
|
||||
// +k8s:ifDisabled("WorkloadAwarePreemption")=+k8s:forbidden
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:optional
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:maximum=1000000000 # HighestUserDefinablePriority
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:minimum=-2147483648
|
||||
optional int32 priority = 7;
|
||||
}
|
||||
|
||||
// PodGroupTemplateReference references a PodGroup template defined in some object (e.g. Workload).
|
||||
// Exactly one reference must be set.
|
||||
// +union
|
||||
message PodGroupTemplateReference {
|
||||
// Workload references the PodGroupTemplate within the Workload object that was used to create
|
||||
// the PodGroup.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:unionMember
|
||||
optional WorkloadPodGroupTemplateReference workload = 1;
|
||||
}
|
||||
|
||||
// TopologyConstraint defines a topology constraint for a PodGroup.
|
||||
message TopologyConstraint {
|
||||
// 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"
|
||||
//
|
||||
// +required
|
||||
// +k8s:required
|
||||
// +k8s:format=k8s-label-key
|
||||
optional string key = 1;
|
||||
}
|
||||
|
||||
// TypedLocalObjectReference allows to reference typed object inside the same namespace.
|
||||
message TypedLocalObjectReference {
|
||||
// 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.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:format=k8s-long-name
|
||||
optional string apiGroup = 1;
|
||||
|
||||
// Kind is the type of resource being referenced.
|
||||
// It must be a path segment name.
|
||||
//
|
||||
// +required
|
||||
// +k8s:required
|
||||
// +k8s:format=k8s-path-segment-name
|
||||
optional string kind = 2;
|
||||
|
||||
// Name is the name of resource being referenced.
|
||||
// It must be a path segment name.
|
||||
//
|
||||
// +required
|
||||
// +k8s:required
|
||||
// +k8s:format=k8s-path-segment-name
|
||||
optional string name = 3;
|
||||
}
|
||||
|
||||
// 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.
|
||||
message Workload {
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
//
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec defines the desired behavior of a Workload.
|
||||
//
|
||||
// +required
|
||||
optional WorkloadSpec spec = 2;
|
||||
}
|
||||
|
||||
// WorkloadList contains a list of Workload resources.
|
||||
message WorkloadList {
|
||||
// Standard list metadata.
|
||||
//
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is the list of Workloads.
|
||||
repeated Workload items = 2;
|
||||
}
|
||||
|
||||
// WorkloadPodGroupTemplateReference references the PodGroupTemplate within the Workload object.
|
||||
message WorkloadPodGroupTemplateReference {
|
||||
// WorkloadName defines the name of the Workload object.
|
||||
//
|
||||
// +required
|
||||
// +k8s:required
|
||||
// +k8s:format=k8s-long-name
|
||||
optional string workloadName = 1;
|
||||
|
||||
// PodGroupTemplateName defines the PodGroupTemplate name within the Workload object.
|
||||
//
|
||||
// +required
|
||||
// +k8s:required
|
||||
// +k8s:format=k8s-short-name
|
||||
optional string podGroupTemplateName = 2;
|
||||
}
|
||||
|
||||
// WorkloadSpec defines the desired state of a Workload.
|
||||
message WorkloadSpec {
|
||||
// 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.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:immutable
|
||||
optional TypedLocalObjectReference controllerRef = 1;
|
||||
|
||||
// PodGroupTemplates is the list of templates that make up the Workload.
|
||||
// The maximum number of templates is 8. This field is immutable.
|
||||
//
|
||||
// +required
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
// +k8s:required
|
||||
// +k8s:listType=map
|
||||
// +k8s:listMapKey=name
|
||||
// +k8s:maxItems=8
|
||||
// +k8s:immutable
|
||||
repeated PodGroupTemplate podGroupTemplates = 2;
|
||||
}
|
||||
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
const GroupName = "scheduling.k8s.io"
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"}
|
||||
|
||||
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||
func Resource(resource string) schema.GroupResource {
|
||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||
}
|
||||
|
||||
var (
|
||||
// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
|
||||
// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
|
||||
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
||||
localSchemeBuilder = &SchemeBuilder
|
||||
AddToScheme = localSchemeBuilder.AddToScheme
|
||||
)
|
||||
|
||||
// Adds the list of known types to the given scheme.
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(
|
||||
SchemeGroupVersion,
|
||||
&Workload{},
|
||||
&WorkloadList{},
|
||||
&PodGroup{},
|
||||
&PodGroupList{},
|
||||
)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
+601
@@ -0,0 +1,601 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// 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 Workload struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
//
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Spec defines the desired behavior of a Workload.
|
||||
//
|
||||
// +required
|
||||
Spec WorkloadSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// WorkloadList contains a list of Workload resources.
|
||||
type WorkloadList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard list metadata.
|
||||
//
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is the list of Workloads.
|
||||
Items []Workload `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// WorkloadMaxPodGroupTemplates is the maximum number of pod group templates per Workload.
|
||||
const WorkloadMaxPodGroupTemplates = 8
|
||||
|
||||
// WorkloadSpec defines the desired state of a Workload.
|
||||
type WorkloadSpec 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.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:immutable
|
||||
ControllerRef *TypedLocalObjectReference `json:"controllerRef,omitempty" protobuf:"bytes,1,opt,name=controllerRef"`
|
||||
|
||||
// PodGroupTemplates is the list of templates that make up the Workload.
|
||||
// The maximum number of templates is 8. This field is immutable.
|
||||
//
|
||||
// +required
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
// +k8s:required
|
||||
// +k8s:listType=map
|
||||
// +k8s:listMapKey=name
|
||||
// +k8s:maxItems=8
|
||||
// +k8s:immutable
|
||||
PodGroupTemplates []PodGroupTemplate `json:"podGroupTemplates" protobuf:"bytes,2,rep,name=podGroupTemplates"`
|
||||
}
|
||||
|
||||
// TypedLocalObjectReference allows to reference typed object inside the same namespace.
|
||||
type TypedLocalObjectReference 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.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:format=k8s-long-name
|
||||
APIGroup string `json:"apiGroup,omitempty" protobuf:"bytes,1,opt,name=apiGroup"`
|
||||
// Kind is the type of resource being referenced.
|
||||
// It must be a path segment name.
|
||||
//
|
||||
// +required
|
||||
// +k8s:required
|
||||
// +k8s:format=k8s-path-segment-name
|
||||
Kind string `json:"kind" protobuf:"bytes,2,opt,name=kind"`
|
||||
// Name is the name of resource being referenced.
|
||||
// It must be a path segment name.
|
||||
//
|
||||
// +required
|
||||
// +k8s:required
|
||||
// +k8s:format=k8s-path-segment-name
|
||||
Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
|
||||
}
|
||||
|
||||
// MaxPodGroupResourceClaims is the maximum number of resource claims for a
|
||||
// PodGroup or a Workload's PodGroupTemplate.
|
||||
const MaxPodGroupResourceClaims = 4
|
||||
|
||||
// PodGroupTemplate represents a template for a set of pods with a scheduling policy.
|
||||
type PodGroupTemplate struct {
|
||||
// Name is a unique identifier for the PodGroupTemplate within the Workload.
|
||||
// It must be a DNS label. This field is immutable.
|
||||
//
|
||||
// +required
|
||||
// +k8s:required
|
||||
// +k8s:format=k8s-short-name
|
||||
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
|
||||
|
||||
// SchedulingPolicy defines the scheduling policy for this PodGroupTemplate.
|
||||
//
|
||||
// +required
|
||||
SchedulingPolicy PodGroupSchedulingPolicy `json:"schedulingPolicy" protobuf:"bytes,2,opt,name=schedulingPolicy"`
|
||||
|
||||
// SchedulingConstraints defines optional scheduling constraints (e.g. topology) for this PodGroupTemplate.
|
||||
// This field is only available when the TopologyAwareWorkloadScheduling feature gate is enabled.
|
||||
//
|
||||
// +featureGate=TopologyAwareWorkloadScheduling
|
||||
// +optional
|
||||
// +k8s:ifDisabled(TopologyAwareWorkloadScheduling)=+k8s:forbidden
|
||||
// +k8s:ifEnabled(TopologyAwareWorkloadScheduling)=+k8s:optional
|
||||
SchedulingConstraints *PodGroupSchedulingConstraints `json:"schedulingConstraints" protobuf:"bytes,3,opt,name=schedulingConstraints"`
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +optional
|
||||
// +patchMergeKey=name
|
||||
// +patchStrategy=merge,retainKeys
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
// +k8s:optional
|
||||
// +k8s:listType=map
|
||||
// +k8s:listMapKey=name
|
||||
// +k8s:maxItems=4
|
||||
// +k8s:immutable
|
||||
// +featureGate=DRAWorkloadResourceClaims
|
||||
ResourceClaims []PodGroupResourceClaim `json:"resourceClaims,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,4,rep,name=resourceClaims"`
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +featureGate=WorkloadAwarePreemption
|
||||
// +optional
|
||||
// +k8s:ifDisabled("WorkloadAwarePreemption")=+k8s:forbidden
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:optional
|
||||
DisruptionMode *DisruptionMode `json:"disruptionMode,omitempty" protobuf:"bytes,5,opt,name=disruptionMode,casttype=DisruptionMode"`
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +featureGate=WorkloadAwarePreemption
|
||||
// +optional
|
||||
// +k8s:ifDisabled("WorkloadAwarePreemption")=+k8s:forbidden
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:optional
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:format=k8s-long-name
|
||||
PriorityClassName string `json:"priorityClassName,omitempty" protobuf:"bytes,6,opt,name=priorityClassName"`
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +featureGate=WorkloadAwarePreemption
|
||||
// +optional
|
||||
// +k8s:ifDisabled("WorkloadAwarePreemption")=+k8s:forbidden
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:optional
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:maximum=1000000000 # HighestUserDefinablePriority
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:minimum=-2147483648
|
||||
Priority *int32 `json:"priority,omitempty" protobuf:"varint,7,opt,name=priority"`
|
||||
}
|
||||
|
||||
// PodGroupSchedulingPolicy defines the scheduling configuration for a PodGroup.
|
||||
// Exactly one policy must be set.
|
||||
// +union
|
||||
type PodGroupSchedulingPolicy struct {
|
||||
// Basic specifies that the pods in this group should be scheduled using
|
||||
// standard Kubernetes scheduling behavior.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:unionMember
|
||||
Basic *BasicSchedulingPolicy `json:"basic,omitempty" protobuf:"bytes,1,opt,name=basic"`
|
||||
|
||||
// Gang specifies that the pods in this group should be scheduled using
|
||||
// all-or-nothing semantics.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:unionMember
|
||||
Gang *GangSchedulingPolicy `json:"gang,omitempty" protobuf:"bytes,2,opt,name=gang"`
|
||||
}
|
||||
|
||||
// BasicSchedulingPolicy indicates that standard Kubernetes
|
||||
// scheduling behavior should be used.
|
||||
type BasicSchedulingPolicy struct {
|
||||
// This is intentionally empty. Its presence indicates that the basic
|
||||
// scheduling policy should be applied. In the future, new fields may appear,
|
||||
// describing such constraints on a pod group level without "all or nothing"
|
||||
// (gang) scheduling.
|
||||
}
|
||||
|
||||
// GangSchedulingPolicy defines the parameters for gang scheduling.
|
||||
type GangSchedulingPolicy 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.
|
||||
//
|
||||
// +required
|
||||
// +k8s:required
|
||||
// +k8s:minimum=1
|
||||
MinCount int32 `json:"minCount" protobuf:"varint,1,opt,name=minCount"`
|
||||
}
|
||||
|
||||
// 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 PodGroupResourceClaim struct {
|
||||
// Name uniquely identifies this resource claim inside the PodGroup.
|
||||
// This must be a DNS_LABEL.
|
||||
//
|
||||
// +required
|
||||
// +k8s:required
|
||||
// +k8s:format=k8s-short-name
|
||||
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:unionMember
|
||||
// +k8s:format=k8s-long-name
|
||||
ResourceClaimName *string `json:"resourceClaimName,omitempty" protobuf:"bytes,2,opt,name=resourceClaimName"`
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:unionMember
|
||||
// +k8s:format=k8s-long-name
|
||||
ResourceClaimTemplateName *string `json:"resourceClaimTemplateName,omitempty" protobuf:"bytes,3,opt,name=resourceClaimTemplateName"`
|
||||
}
|
||||
|
||||
// DisruptionMode describes the mode in which a PodGroup can be disrupted (e.g. preempted).
|
||||
// +enum
|
||||
// +k8s:enum
|
||||
type DisruptionMode string
|
||||
|
||||
const (
|
||||
// DisruptionModePod means that individual pods can be disrupted or preempted independently.
|
||||
// It doesn't depend on exact set of pods currently running in this PodGroup.
|
||||
DisruptionModePod DisruptionMode = "Pod"
|
||||
// DisruptionModePodGroup means that the whole PodGroup needs to be disrupted
|
||||
// or preempted together.
|
||||
DisruptionModePodGroup DisruptionMode = "PodGroup"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:supportsSubresource="/status"
|
||||
|
||||
// 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 PodGroup struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
//
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Spec defines the desired state of the PodGroup.
|
||||
//
|
||||
// +required
|
||||
Spec PodGroupSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
|
||||
|
||||
// Status represents the current observed state of the PodGroup.
|
||||
//
|
||||
// +optional
|
||||
Status PodGroupStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// PodGroupList contains a list of PodGroup resources.
|
||||
type PodGroupList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard list metadata.
|
||||
//
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is the list of PodGroups.
|
||||
Items []PodGroup `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// PodGroupSpec defines the desired state of a PodGroup.
|
||||
type PodGroupSpec struct {
|
||||
// PodGroupTemplateRef references an optional PodGroup template within other object
|
||||
// (e.g. Workload) that was used to create the PodGroup. This field is immutable.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:immutable
|
||||
PodGroupTemplateRef *PodGroupTemplateReference `json:"podGroupTemplateRef" protobuf:"bytes,1,opt,name=podGroupTemplateRef"`
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +required
|
||||
// +k8s:immutable
|
||||
SchedulingPolicy PodGroupSchedulingPolicy `json:"schedulingPolicy" protobuf:"bytes,2,opt,name=schedulingPolicy"`
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +featureGate=TopologyAwareWorkloadScheduling
|
||||
// +optional
|
||||
// +k8s:ifDisabled(TopologyAwareWorkloadScheduling)=+k8s:forbidden
|
||||
// +k8s:ifEnabled(TopologyAwareWorkloadScheduling)=+k8s:optional
|
||||
// +k8s:ifEnabled(TopologyAwareWorkloadScheduling)=+k8s:immutable
|
||||
SchedulingConstraints *PodGroupSchedulingConstraints `json:"schedulingConstraints,omitempty" protobuf:"bytes,3,opt,name=schedulingConstraints"`
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +optional
|
||||
// +patchMergeKey=name
|
||||
// +patchStrategy=merge,retainKeys
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
// +k8s:optional
|
||||
// +k8s:listType=map
|
||||
// +k8s:listMapKey=name
|
||||
// +k8s:maxItems=4
|
||||
// +k8s:immutable
|
||||
// +featureGate=DRAWorkloadResourceClaims
|
||||
ResourceClaims []PodGroupResourceClaim `json:"resourceClaims,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,4,rep,name=resourceClaims"`
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +featureGate=WorkloadAwarePreemption
|
||||
// +optional
|
||||
// +k8s:ifDisabled("WorkloadAwarePreemption")=+k8s:forbidden
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:optional
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:immutable
|
||||
// +default="Pod"
|
||||
DisruptionMode *DisruptionMode `json:"disruptionMode,omitempty" protobuf:"bytes,5,opt,name=disruptionMode,casttype=DisruptionMode"`
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +featureGate=WorkloadAwarePreemption
|
||||
// +optional
|
||||
// +k8s:ifDisabled("WorkloadAwarePreemption")=+k8s:forbidden
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:optional
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:format=k8s-long-name
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:immutable
|
||||
PriorityClassName string `json:"priorityClassName,omitempty" protobuf:"bytes,6,opt,name=priorityClassName"`
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +featureGate=WorkloadAwarePreemption
|
||||
// +optional
|
||||
// +k8s:ifDisabled("WorkloadAwarePreemption")=+k8s:forbidden
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:optional
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:immutable
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:maximum=1000000000 # HighestUserDefinablePriority
|
||||
// +k8s:ifEnabled("WorkloadAwarePreemption")=+k8s:minimum=-2147483648
|
||||
Priority *int32 `json:"priority,omitempty" protobuf:"varint,7,opt,name=priority"`
|
||||
}
|
||||
|
||||
// PodGroupStatus represents information about the status of a pod group.
|
||||
type PodGroupStatus 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.
|
||||
//
|
||||
// +optional
|
||||
// +patchMergeKey=type
|
||||
// +patchStrategy=merge
|
||||
// +listType=map
|
||||
// +listMapKey=type
|
||||
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
|
||||
|
||||
// Status of resource claims.
|
||||
// +optional
|
||||
// +patchMergeKey=name
|
||||
// +patchStrategy=merge,retainKeys
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
// +k8s:optional
|
||||
// +k8s:listType=map
|
||||
// +k8s:listMapKey=name
|
||||
// +k8s:maxItems=4
|
||||
// +featureGate=DRAWorkloadResourceClaims
|
||||
ResourceClaimStatuses []PodGroupResourceClaimStatus `json:"resourceClaimStatuses,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,2,rep,name=resourceClaimStatuses"`
|
||||
}
|
||||
|
||||
// Well-known condition types for PodGroups.
|
||||
const (
|
||||
// PodGroupScheduled represents status of the scheduling process for this PodGroup.
|
||||
PodGroupScheduled string = "PodGroupScheduled"
|
||||
// DisruptionTarget indicates the PodGroup is about to be terminated due to disruption
|
||||
// such as preemption.
|
||||
DisruptionTarget string = "DisruptionTarget"
|
||||
)
|
||||
|
||||
// Well-known condition reasons for PodGroups.
|
||||
const (
|
||||
// Unschedulable reason in the PodGroupScheduled condition indicates that the PodGroup cannot be scheduled
|
||||
// due to resource constraints, affinity/anti-affinity rules, or insufficient capacity for the PodGroup.
|
||||
PodGroupReasonUnschedulable string = "Unschedulable"
|
||||
// SchedulerError reason in the PodGroupScheduled condition means that some internal error happens
|
||||
// during scheduling, for example due to nodeAffinity parsing errors.
|
||||
PodGroupReasonSchedulerError string = "SchedulerError"
|
||||
// PreemptionByScheduler reason in the DisruptionTarget condition indicates the PodGroup was preempted
|
||||
// to make room for higher-priority PodGroups or Pods.
|
||||
PodGroupReasonPreemptionByScheduler string = "PreemptionByScheduler"
|
||||
)
|
||||
|
||||
// PodGroupResourceClaimStatus is stored in the PodGroupStatus for each
|
||||
// PodGroupResourceClaim which references a ResourceClaimTemplate. It stores the
|
||||
// generated name for the corresponding ResourceClaim.
|
||||
type PodGroupResourceClaimStatus 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.
|
||||
//
|
||||
// +required
|
||||
Name string `json:"name" protobuf:"bytes,1,name=name"`
|
||||
|
||||
// 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.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:format=k8s-long-name
|
||||
ResourceClaimName *string `json:"resourceClaimName,omitempty" protobuf:"bytes,2,opt,name=resourceClaimName"`
|
||||
}
|
||||
|
||||
// PodGroupTemplateReference references a PodGroup template defined in some object (e.g. Workload).
|
||||
// Exactly one reference must be set.
|
||||
// +union
|
||||
type PodGroupTemplateReference struct {
|
||||
// Workload references the PodGroupTemplate within the Workload object that was used to create
|
||||
// the PodGroup.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:unionMember
|
||||
Workload *WorkloadPodGroupTemplateReference `json:"workload" protobuf:"bytes,1,opt,name=workload"`
|
||||
}
|
||||
|
||||
// WorkloadPodGroupTemplateReference references the PodGroupTemplate within the Workload object.
|
||||
type WorkloadPodGroupTemplateReference struct {
|
||||
// WorkloadName defines the name of the Workload object.
|
||||
//
|
||||
// +required
|
||||
// +k8s:required
|
||||
// +k8s:format=k8s-long-name
|
||||
WorkloadName string `json:"workloadName" protobuf:"bytes,1,opt,name=workloadName"`
|
||||
|
||||
// PodGroupTemplateName defines the PodGroupTemplate name within the Workload object.
|
||||
//
|
||||
// +required
|
||||
// +k8s:required
|
||||
// +k8s:format=k8s-short-name
|
||||
PodGroupTemplateName string `json:"podGroupTemplateName" protobuf:"bytes,2,opt,name=podGroupTemplateName"`
|
||||
}
|
||||
|
||||
// PodGroupSchedulingConstraints defines scheduling constraints (e.g. topology) for a PodGroup.
|
||||
type PodGroupSchedulingConstraints 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.
|
||||
//
|
||||
// +optional
|
||||
// +k8s:optional
|
||||
// +k8s:maxItems=1
|
||||
// +listType=atomic
|
||||
// +k8s:listType=atomic
|
||||
Topology []TopologyConstraint `json:"topology,omitempty" protobuf:"bytes,1,rep,name=topology"`
|
||||
}
|
||||
|
||||
// TopologyConstraint defines a topology constraint for a PodGroup.
|
||||
type TopologyConstraint 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"
|
||||
//
|
||||
// +required
|
||||
// +k8s:required
|
||||
// +k8s:format=k8s-label-key
|
||||
Key string `json:"key" protobuf:"bytes,1,opt,name=key"`
|
||||
}
|
||||
+217
@@ -0,0 +1,217 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
package v1alpha2
|
||||
|
||||
// This file contains a collection of methods that can be used from go-restful to
|
||||
// generate Swagger API documentation for its models. Please read this PR for more
|
||||
// information on the implementation: https://github.com/emicklei/go-restful/pull/215
|
||||
//
|
||||
// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
|
||||
// they are on one line! For multiple line or blocks that you want to ignore use ---.
|
||||
// Any context after a --- is ignored.
|
||||
//
|
||||
// Those methods can be generated by using hack/update-codegen.sh
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
|
||||
var map_BasicSchedulingPolicy = map[string]string{
|
||||
"": "BasicSchedulingPolicy indicates that standard Kubernetes scheduling behavior should be used.",
|
||||
}
|
||||
|
||||
func (BasicSchedulingPolicy) SwaggerDoc() map[string]string {
|
||||
return map_BasicSchedulingPolicy
|
||||
}
|
||||
|
||||
var map_GangSchedulingPolicy = map[string]string{
|
||||
"": "GangSchedulingPolicy defines the parameters for gang scheduling.",
|
||||
"minCount": "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.",
|
||||
}
|
||||
|
||||
func (GangSchedulingPolicy) SwaggerDoc() map[string]string {
|
||||
return map_GangSchedulingPolicy
|
||||
}
|
||||
|
||||
var map_PodGroup = map[string]string{
|
||||
"": "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.",
|
||||
"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
|
||||
"spec": "Spec defines the desired state of the PodGroup.",
|
||||
"status": "Status represents the current observed state of the PodGroup.",
|
||||
}
|
||||
|
||||
func (PodGroup) SwaggerDoc() map[string]string {
|
||||
return map_PodGroup
|
||||
}
|
||||
|
||||
var map_PodGroupList = map[string]string{
|
||||
"": "PodGroupList contains a list of PodGroup resources.",
|
||||
"metadata": "Standard list metadata.",
|
||||
"items": "Items is the list of PodGroups.",
|
||||
}
|
||||
|
||||
func (PodGroupList) SwaggerDoc() map[string]string {
|
||||
return map_PodGroupList
|
||||
}
|
||||
|
||||
var map_PodGroupResourceClaim = map[string]string{
|
||||
"": "PodGroupResourceClaim references exactly one ResourceClaim, either directly or by naming a ResourceClaimTemplate which is then turned into a ResourceClaim for the PodGroup.\n\nIt 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.",
|
||||
"name": "Name uniquely identifies this resource claim inside the PodGroup. This must be a DNS_LABEL.",
|
||||
"resourceClaimName": "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.\n\nExactly one of ResourceClaimName and ResourceClaimTemplateName must be set.",
|
||||
"resourceClaimTemplateName": "ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this PodGroup.\n\nThe 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.\n\nThis field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim.\n\nExactly one of ResourceClaimName and ResourceClaimTemplateName must be set.",
|
||||
}
|
||||
|
||||
func (PodGroupResourceClaim) SwaggerDoc() map[string]string {
|
||||
return map_PodGroupResourceClaim
|
||||
}
|
||||
|
||||
var map_PodGroupResourceClaimStatus = map[string]string{
|
||||
"": "PodGroupResourceClaimStatus is stored in the PodGroupStatus for each PodGroupResourceClaim which references a ResourceClaimTemplate. It stores the generated name for the corresponding ResourceClaim.",
|
||||
"name": "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.",
|
||||
"resourceClaimName": "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.",
|
||||
}
|
||||
|
||||
func (PodGroupResourceClaimStatus) SwaggerDoc() map[string]string {
|
||||
return map_PodGroupResourceClaimStatus
|
||||
}
|
||||
|
||||
var map_PodGroupSchedulingConstraints = map[string]string{
|
||||
"": "PodGroupSchedulingConstraints defines scheduling constraints (e.g. topology) for a PodGroup.",
|
||||
"topology": "Topology defines the topology constraints for the pod group. Currently only a single topology constraint can be specified. This may change in the future.",
|
||||
}
|
||||
|
||||
func (PodGroupSchedulingConstraints) SwaggerDoc() map[string]string {
|
||||
return map_PodGroupSchedulingConstraints
|
||||
}
|
||||
|
||||
var map_PodGroupSchedulingPolicy = map[string]string{
|
||||
"": "PodGroupSchedulingPolicy defines the scheduling configuration for a PodGroup. Exactly one policy must be set.",
|
||||
"basic": "Basic specifies that the pods in this group should be scheduled using standard Kubernetes scheduling behavior.",
|
||||
"gang": "Gang specifies that the pods in this group should be scheduled using all-or-nothing semantics.",
|
||||
}
|
||||
|
||||
func (PodGroupSchedulingPolicy) SwaggerDoc() map[string]string {
|
||||
return map_PodGroupSchedulingPolicy
|
||||
}
|
||||
|
||||
var map_PodGroupSpec = map[string]string{
|
||||
"": "PodGroupSpec defines the desired state of a PodGroup.",
|
||||
"podGroupTemplateRef": "PodGroupTemplateRef references an optional PodGroup template within other object (e.g. Workload) that was used to create the PodGroup. This field is immutable.",
|
||||
"schedulingPolicy": "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.",
|
||||
"schedulingConstraints": "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.",
|
||||
"resourceClaims": "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.\n\nThis is an alpha-level field and requires that the DRAWorkloadResourceClaims feature gate is enabled.\n\nThis field is immutable.",
|
||||
"disruptionMode": "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.",
|
||||
"priorityClassName": "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.",
|
||||
"priority": "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.",
|
||||
}
|
||||
|
||||
func (PodGroupSpec) SwaggerDoc() map[string]string {
|
||||
return map_PodGroupSpec
|
||||
}
|
||||
|
||||
var map_PodGroupStatus = map[string]string{
|
||||
"": "PodGroupStatus represents information about the status of a pod group.",
|
||||
"conditions": "Conditions represent the latest observations of the PodGroup's state.\n\nKnown condition types: - \"PodGroupScheduled\": Indicates whether the scheduling requirement has been satisfied. - \"DisruptionTarget\": Indicates whether the PodGroup is about to be terminated\n due to disruption such as preemption.\n\nKnown reasons for the PodGroupScheduled condition: - \"Unschedulable\": The PodGroup cannot be scheduled due to resource constraints,\n affinity/anti-affinity rules, or insufficient capacity for the gang.\n- \"SchedulerError\": The PodGroup cannot be scheduled due to some internal error\n that happened during scheduling, for example due to nodeAffinity parsing errors.\n\nKnown reasons for the DisruptionTarget condition: - \"PreemptionByScheduler\": The PodGroup was preempted by the scheduler to make room for\n higher-priority PodGroups or Pods.",
|
||||
"resourceClaimStatuses": "Status of resource claims.",
|
||||
}
|
||||
|
||||
func (PodGroupStatus) SwaggerDoc() map[string]string {
|
||||
return map_PodGroupStatus
|
||||
}
|
||||
|
||||
var map_PodGroupTemplate = map[string]string{
|
||||
"": "PodGroupTemplate represents a template for a set of pods with a scheduling policy.",
|
||||
"name": "Name is a unique identifier for the PodGroupTemplate within the Workload. It must be a DNS label. This field is immutable.",
|
||||
"schedulingPolicy": "SchedulingPolicy defines the scheduling policy for this PodGroupTemplate.",
|
||||
"schedulingConstraints": "SchedulingConstraints defines optional scheduling constraints (e.g. topology) for this PodGroupTemplate. This field is only available when the TopologyAwareWorkloadScheduling feature gate is enabled.",
|
||||
"resourceClaims": "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.\n\nThis is an alpha-level field and requires that the DRAWorkloadResourceClaims feature gate is enabled.\n\nThis field is immutable.",
|
||||
"disruptionMode": "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.",
|
||||
"priorityClassName": "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.",
|
||||
"priority": "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.",
|
||||
}
|
||||
|
||||
func (PodGroupTemplate) SwaggerDoc() map[string]string {
|
||||
return map_PodGroupTemplate
|
||||
}
|
||||
|
||||
var map_PodGroupTemplateReference = map[string]string{
|
||||
"": "PodGroupTemplateReference references a PodGroup template defined in some object (e.g. Workload). Exactly one reference must be set.",
|
||||
"workload": "Workload references the PodGroupTemplate within the Workload object that was used to create the PodGroup.",
|
||||
}
|
||||
|
||||
func (PodGroupTemplateReference) SwaggerDoc() map[string]string {
|
||||
return map_PodGroupTemplateReference
|
||||
}
|
||||
|
||||
var map_TopologyConstraint = map[string]string{
|
||||
"": "TopologyConstraint defines a topology constraint for a PodGroup.",
|
||||
"key": "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\"",
|
||||
}
|
||||
|
||||
func (TopologyConstraint) SwaggerDoc() map[string]string {
|
||||
return map_TopologyConstraint
|
||||
}
|
||||
|
||||
var map_TypedLocalObjectReference = map[string]string{
|
||||
"": "TypedLocalObjectReference allows to reference typed object inside the same namespace.",
|
||||
"apiGroup": "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.",
|
||||
"kind": "Kind is the type of resource being referenced. It must be a path segment name.",
|
||||
"name": "Name is the name of resource being referenced. It must be a path segment name.",
|
||||
}
|
||||
|
||||
func (TypedLocalObjectReference) SwaggerDoc() map[string]string {
|
||||
return map_TypedLocalObjectReference
|
||||
}
|
||||
|
||||
var map_Workload = map[string]string{
|
||||
"": "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.",
|
||||
"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
|
||||
"spec": "Spec defines the desired behavior of a Workload.",
|
||||
}
|
||||
|
||||
func (Workload) SwaggerDoc() map[string]string {
|
||||
return map_Workload
|
||||
}
|
||||
|
||||
var map_WorkloadList = map[string]string{
|
||||
"": "WorkloadList contains a list of Workload resources.",
|
||||
"metadata": "Standard list metadata.",
|
||||
"items": "Items is the list of Workloads.",
|
||||
}
|
||||
|
||||
func (WorkloadList) SwaggerDoc() map[string]string {
|
||||
return map_WorkloadList
|
||||
}
|
||||
|
||||
var map_WorkloadPodGroupTemplateReference = map[string]string{
|
||||
"": "WorkloadPodGroupTemplateReference references the PodGroupTemplate within the Workload object.",
|
||||
"workloadName": "WorkloadName defines the name of the Workload object.",
|
||||
"podGroupTemplateName": "PodGroupTemplateName defines the PodGroupTemplate name within the Workload object.",
|
||||
}
|
||||
|
||||
func (WorkloadPodGroupTemplateReference) SwaggerDoc() map[string]string {
|
||||
return map_WorkloadPodGroupTemplateReference
|
||||
}
|
||||
|
||||
var map_WorkloadSpec = map[string]string{
|
||||
"": "WorkloadSpec defines the desired state of a Workload.",
|
||||
"controllerRef": "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.",
|
||||
"podGroupTemplates": "PodGroupTemplates is the list of templates that make up the Workload. The maximum number of templates is 8. This field is immutable.",
|
||||
}
|
||||
|
||||
func (WorkloadSpec) SwaggerDoc() map[string]string {
|
||||
return map_WorkloadSpec
|
||||
}
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS END HERE
|
||||
+484
@@ -0,0 +1,484 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
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 deepcopy-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *BasicSchedulingPolicy) DeepCopyInto(out *BasicSchedulingPolicy) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicSchedulingPolicy.
|
||||
func (in *BasicSchedulingPolicy) DeepCopy() *BasicSchedulingPolicy {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(BasicSchedulingPolicy)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *GangSchedulingPolicy) DeepCopyInto(out *GangSchedulingPolicy) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GangSchedulingPolicy.
|
||||
func (in *GangSchedulingPolicy) DeepCopy() *GangSchedulingPolicy {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(GangSchedulingPolicy)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodGroup) DeepCopyInto(out *PodGroup) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroup.
|
||||
func (in *PodGroup) DeepCopy() *PodGroup {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodGroup)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *PodGroup) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodGroupList) DeepCopyInto(out *PodGroupList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]PodGroup, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroupList.
|
||||
func (in *PodGroupList) DeepCopy() *PodGroupList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodGroupList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *PodGroupList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodGroupResourceClaim) DeepCopyInto(out *PodGroupResourceClaim) {
|
||||
*out = *in
|
||||
if in.ResourceClaimName != nil {
|
||||
in, out := &in.ResourceClaimName, &out.ResourceClaimName
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.ResourceClaimTemplateName != nil {
|
||||
in, out := &in.ResourceClaimTemplateName, &out.ResourceClaimTemplateName
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroupResourceClaim.
|
||||
func (in *PodGroupResourceClaim) DeepCopy() *PodGroupResourceClaim {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodGroupResourceClaim)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodGroupResourceClaimStatus) DeepCopyInto(out *PodGroupResourceClaimStatus) {
|
||||
*out = *in
|
||||
if in.ResourceClaimName != nil {
|
||||
in, out := &in.ResourceClaimName, &out.ResourceClaimName
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroupResourceClaimStatus.
|
||||
func (in *PodGroupResourceClaimStatus) DeepCopy() *PodGroupResourceClaimStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodGroupResourceClaimStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodGroupSchedulingConstraints) DeepCopyInto(out *PodGroupSchedulingConstraints) {
|
||||
*out = *in
|
||||
if in.Topology != nil {
|
||||
in, out := &in.Topology, &out.Topology
|
||||
*out = make([]TopologyConstraint, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroupSchedulingConstraints.
|
||||
func (in *PodGroupSchedulingConstraints) DeepCopy() *PodGroupSchedulingConstraints {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodGroupSchedulingConstraints)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodGroupSchedulingPolicy) DeepCopyInto(out *PodGroupSchedulingPolicy) {
|
||||
*out = *in
|
||||
if in.Basic != nil {
|
||||
in, out := &in.Basic, &out.Basic
|
||||
*out = new(BasicSchedulingPolicy)
|
||||
**out = **in
|
||||
}
|
||||
if in.Gang != nil {
|
||||
in, out := &in.Gang, &out.Gang
|
||||
*out = new(GangSchedulingPolicy)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroupSchedulingPolicy.
|
||||
func (in *PodGroupSchedulingPolicy) DeepCopy() *PodGroupSchedulingPolicy {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodGroupSchedulingPolicy)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodGroupSpec) DeepCopyInto(out *PodGroupSpec) {
|
||||
*out = *in
|
||||
if in.PodGroupTemplateRef != nil {
|
||||
in, out := &in.PodGroupTemplateRef, &out.PodGroupTemplateRef
|
||||
*out = new(PodGroupTemplateReference)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
in.SchedulingPolicy.DeepCopyInto(&out.SchedulingPolicy)
|
||||
if in.SchedulingConstraints != nil {
|
||||
in, out := &in.SchedulingConstraints, &out.SchedulingConstraints
|
||||
*out = new(PodGroupSchedulingConstraints)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.ResourceClaims != nil {
|
||||
in, out := &in.ResourceClaims, &out.ResourceClaims
|
||||
*out = make([]PodGroupResourceClaim, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.DisruptionMode != nil {
|
||||
in, out := &in.DisruptionMode, &out.DisruptionMode
|
||||
*out = new(DisruptionMode)
|
||||
**out = **in
|
||||
}
|
||||
if in.Priority != nil {
|
||||
in, out := &in.Priority, &out.Priority
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroupSpec.
|
||||
func (in *PodGroupSpec) DeepCopy() *PodGroupSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodGroupSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodGroupStatus) DeepCopyInto(out *PodGroupStatus) {
|
||||
*out = *in
|
||||
if in.Conditions != nil {
|
||||
in, out := &in.Conditions, &out.Conditions
|
||||
*out = make([]v1.Condition, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.ResourceClaimStatuses != nil {
|
||||
in, out := &in.ResourceClaimStatuses, &out.ResourceClaimStatuses
|
||||
*out = make([]PodGroupResourceClaimStatus, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroupStatus.
|
||||
func (in *PodGroupStatus) DeepCopy() *PodGroupStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodGroupStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodGroupTemplate) DeepCopyInto(out *PodGroupTemplate) {
|
||||
*out = *in
|
||||
in.SchedulingPolicy.DeepCopyInto(&out.SchedulingPolicy)
|
||||
if in.SchedulingConstraints != nil {
|
||||
in, out := &in.SchedulingConstraints, &out.SchedulingConstraints
|
||||
*out = new(PodGroupSchedulingConstraints)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.ResourceClaims != nil {
|
||||
in, out := &in.ResourceClaims, &out.ResourceClaims
|
||||
*out = make([]PodGroupResourceClaim, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.DisruptionMode != nil {
|
||||
in, out := &in.DisruptionMode, &out.DisruptionMode
|
||||
*out = new(DisruptionMode)
|
||||
**out = **in
|
||||
}
|
||||
if in.Priority != nil {
|
||||
in, out := &in.Priority, &out.Priority
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroupTemplate.
|
||||
func (in *PodGroupTemplate) DeepCopy() *PodGroupTemplate {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodGroupTemplate)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodGroupTemplateReference) DeepCopyInto(out *PodGroupTemplateReference) {
|
||||
*out = *in
|
||||
if in.Workload != nil {
|
||||
in, out := &in.Workload, &out.Workload
|
||||
*out = new(WorkloadPodGroupTemplateReference)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroupTemplateReference.
|
||||
func (in *PodGroupTemplateReference) DeepCopy() *PodGroupTemplateReference {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodGroupTemplateReference)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *TopologyConstraint) DeepCopyInto(out *TopologyConstraint) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopologyConstraint.
|
||||
func (in *TopologyConstraint) DeepCopy() *TopologyConstraint {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(TopologyConstraint)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *TypedLocalObjectReference) DeepCopyInto(out *TypedLocalObjectReference) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypedLocalObjectReference.
|
||||
func (in *TypedLocalObjectReference) DeepCopy() *TypedLocalObjectReference {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(TypedLocalObjectReference)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Workload) DeepCopyInto(out *Workload) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workload.
|
||||
func (in *Workload) DeepCopy() *Workload {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Workload)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *Workload) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkloadList) DeepCopyInto(out *WorkloadList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]Workload, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadList.
|
||||
func (in *WorkloadList) DeepCopy() *WorkloadList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkloadList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *WorkloadList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkloadPodGroupTemplateReference) DeepCopyInto(out *WorkloadPodGroupTemplateReference) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadPodGroupTemplateReference.
|
||||
func (in *WorkloadPodGroupTemplateReference) DeepCopy() *WorkloadPodGroupTemplateReference {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkloadPodGroupTemplateReference)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkloadSpec) DeepCopyInto(out *WorkloadSpec) {
|
||||
*out = *in
|
||||
if in.ControllerRef != nil {
|
||||
in, out := &in.ControllerRef, &out.ControllerRef
|
||||
*out = new(TypedLocalObjectReference)
|
||||
**out = **in
|
||||
}
|
||||
if in.PodGroupTemplates != nil {
|
||||
in, out := &in.PodGroupTemplates, &out.PodGroupTemplates
|
||||
*out = make([]PodGroupTemplate, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadSpec.
|
||||
func (in *WorkloadSpec) DeepCopy() *WorkloadSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkloadSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
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 openapi-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in BasicSchedulingPolicy) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha2.BasicSchedulingPolicy"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in GangSchedulingPolicy) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha2.GangSchedulingPolicy"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in PodGroup) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha2.PodGroup"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in PodGroupList) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha2.PodGroupList"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in PodGroupResourceClaim) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha2.PodGroupResourceClaim"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in PodGroupResourceClaimStatus) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha2.PodGroupResourceClaimStatus"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in PodGroupSchedulingConstraints) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha2.PodGroupSchedulingConstraints"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in PodGroupSchedulingPolicy) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha2.PodGroupSchedulingPolicy"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in PodGroupSpec) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha2.PodGroupSpec"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in PodGroupStatus) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha2.PodGroupStatus"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in PodGroupTemplate) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha2.PodGroupTemplate"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in PodGroupTemplateReference) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha2.PodGroupTemplateReference"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in TopologyConstraint) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha2.TopologyConstraint"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in TypedLocalObjectReference) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha2.TypedLocalObjectReference"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in Workload) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha2.Workload"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in WorkloadList) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha2.WorkloadList"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in WorkloadPodGroupTemplateReference) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha2.WorkloadPodGroupTemplateReference"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in WorkloadSpec) OpenAPIModelName() string {
|
||||
return "io.k8s.api.scheduling.v1alpha2.WorkloadSpec"
|
||||
}
|
||||
Reference in New Issue
Block a user