package v1alpha1 import "cue.dev/x/k8s.io/apimachinery/pkg/apis/meta/v1" // BasicSchedulingPolicy indicates that standard Kubernetes // scheduling behavior should be used. #BasicSchedulingPolicy: {} // GangSchedulingPolicy defines the parameters for gang // scheduling. #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. "minCount"!: int32 & int } // PodGroup represents a set of pods with a common scheduling // policy. #PodGroup: { // Name is a unique identifier for the PodGroup within the // Workload. It must be a DNS label. This field is immutable. "name"!: string // Policy defines the scheduling policy for this PodGroup. "policy"!: #PodGroupPolicy } // PodGroupPolicy defines the scheduling configuration for a // PodGroup. #PodGroupPolicy: { // Basic specifies that the pods in this group should be scheduled // using standard Kubernetes scheduling behavior. "basic"?: #BasicSchedulingPolicy // Gang specifies that the pods in this group should be scheduled // using all-or-nothing semantics. "gang"?: #GangSchedulingPolicy } // TypedLocalObjectReference allows to reference typed object // inside the same namespace. #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. "apiGroup"?: string // Kind is the type of resource being referenced. It must be a // path segment name. "kind"!: string // Name is the name of resource being referenced. It must be a // path segment name. "name"!: string } // 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. #Workload: { // 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: // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources "apiVersion": "scheduling.k8s.io/v1alpha1" // 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: // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds "kind": "Workload" // Standard object's metadata. Name must be a DNS subdomain. "metadata"?: v1.#ObjectMeta // Spec defines the desired behavior of a Workload. "spec"!: #WorkloadSpec } // WorkloadList contains a list of Workload resources. #WorkloadList: { // 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: // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources "apiVersion": "scheduling.k8s.io/v1alpha1" // Items is the list of Workloads. "items"!: [...#Workload] // 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: // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds "kind": "WorkloadList" // Standard list metadata. "metadata"?: v1.#ListMeta } // WorkloadSpec defines the desired state of a Workload. #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. When set, it cannot be changed. "controllerRef"?: #TypedLocalObjectReference // PodGroups is the list of pod groups that make up the Workload. // The maximum number of pod groups is 8. This field is // immutable. "podGroups"!: [...#PodGroup] }