scheduling_v1alpha1
BasicSchedulingPolicy
GangSchedulingPolicy
class
lightkube.models.scheduling_v1alpha1.GangSchedulingPolicy(minCount)GangSchedulingPolicy defines the parameters for gang scheduling.
parameters
- minCount
int- 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.
PodGroup
class
lightkube.models.scheduling_v1alpha1.PodGroup(name, policy)PodGroup represents a set of pods with a common scheduling policy.
parameters
- name
str- Name is a unique identifier for the PodGroup within the Workload. It must be a DNS label. This field is immutable. - policy
PodGroupPolicy- Policy defines the scheduling policy for this PodGroup.
PodGroupPolicy
class
lightkube.models.scheduling_v1alpha1.PodGroupPolicy(basic=None, gang=None)PodGroupPolicy defines the scheduling configuration for a PodGroup.
parameters
- basic
Optional[BasicSchedulingPolicy]- Basic specifies that the pods in this group should be scheduled using standard Kubernetes scheduling behavior. - gang
Optional[GangSchedulingPolicy]- Gang specifies that the pods in this group should be scheduled using all-or-nothing semantics.
TypedLocalObjectReference
class
lightkube.models.scheduling_v1alpha1.TypedLocalObjectReference(kind, name, apiGroup=None)TypedLocalObjectReference allows to reference typed object inside the same namespace.
parameters
- kind
str- Kind is the type of resource being referenced. It must be a path segment name. - name
str- Name is the name of resource being referenced. It must be a path segment name. - apiGroup
Optional[str]- 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.
Workload
class
lightkube.models.scheduling_v1alpha1.Workload(spec, apiVersion=None, kind=None, metadata=None)Workload allows for expressing scheduling constraints that should be used when managing lifecycle of workloads from scheduling perspective, including scheduling, preemption, eviction and other phases.
parameters
- spec
WorkloadSpec- Spec defines the desired behavior of a Workload. - apiVersion
Optional[str]- APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info - kind
Optional[str]- Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info - metadata
Optional[meta_v1.ObjectMeta]- Standard object's metadata. Name must be a DNS subdomain.
WorkloadList
class
lightkube.models.scheduling_v1alpha1.WorkloadList(items, apiVersion=None, kind=None, metadata=None)WorkloadList contains a list of Workload resources.
parameters
- items
List[Workload]- Items is the list of Workloads. - apiVersion
Optional[str]- APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info - kind
Optional[str]- Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info - metadata
Optional[meta_v1.ListMeta]- Standard list metadata.
WorkloadSpec
class
lightkube.models.scheduling_v1alpha1.WorkloadSpec(podGroups, controllerRef=None)WorkloadSpec defines the desired state of a Workload.
parameters
- podGroups
List[PodGroup]- PodGroups is the list of pod groups that make up the Workload. The maximum number of pod groups is 8. This field is immutable. - controllerRef
Optional[TypedLocalObjectReference]- 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. When set, it cannot be changed.