diff --git a/openapi/generated_openapi/zz_generated.openapi.go b/openapi/generated_openapi/zz_generated.openapi.go index 72470ff0a95..cc7a7a41362 100644 --- a/openapi/generated_openapi/zz_generated.openapi.go +++ b/openapi/generated_openapi/zz_generated.openapi.go @@ -1100,6 +1100,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/openshift/api/operator/v1.UpstreamResolvers": schema_openshift_api_operator_v1_UpstreamResolvers(ref), "github.com/openshift/api/operator/v1.VSphereCSIDriverConfigSpec": schema_openshift_api_operator_v1_VSphereCSIDriverConfigSpec(ref), "github.com/openshift/api/operator/v1alpha1.BackupJobReference": schema_openshift_api_operator_v1alpha1_BackupJobReference(ref), + "github.com/openshift/api/operator/v1alpha1.ByWorkload": schema_openshift_api_operator_v1alpha1_ByWorkload(ref), "github.com/openshift/api/operator/v1alpha1.ClusterVersionOperator": schema_openshift_api_operator_v1alpha1_ClusterVersionOperator(ref), "github.com/openshift/api/operator/v1alpha1.ClusterVersionOperatorList": schema_openshift_api_operator_v1alpha1_ClusterVersionOperatorList(ref), "github.com/openshift/api/operator/v1alpha1.ClusterVersionOperatorSpec": schema_openshift_api_operator_v1alpha1_ClusterVersionOperatorSpec(ref), @@ -1110,11 +1111,20 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/openshift/api/operator/v1alpha1.EtcdBackupList": schema_openshift_api_operator_v1alpha1_EtcdBackupList(ref), "github.com/openshift/api/operator/v1alpha1.EtcdBackupSpec": schema_openshift_api_operator_v1alpha1_EtcdBackupSpec(ref), "github.com/openshift/api/operator/v1alpha1.EtcdBackupStatus": schema_openshift_api_operator_v1alpha1_EtcdBackupStatus(ref), + "github.com/openshift/api/operator/v1alpha1.ExternalFramework": schema_openshift_api_operator_v1alpha1_ExternalFramework(ref), + "github.com/openshift/api/operator/v1alpha1.GangScheduling": schema_openshift_api_operator_v1alpha1_GangScheduling(ref), "github.com/openshift/api/operator/v1alpha1.GenerationHistory": schema_openshift_api_operator_v1alpha1_GenerationHistory(ref), "github.com/openshift/api/operator/v1alpha1.GenericOperatorConfig": schema_openshift_api_operator_v1alpha1_GenericOperatorConfig(ref), "github.com/openshift/api/operator/v1alpha1.ImageContentSourcePolicy": schema_openshift_api_operator_v1alpha1_ImageContentSourcePolicy(ref), "github.com/openshift/api/operator/v1alpha1.ImageContentSourcePolicyList": schema_openshift_api_operator_v1alpha1_ImageContentSourcePolicyList(ref), "github.com/openshift/api/operator/v1alpha1.ImageContentSourcePolicySpec": schema_openshift_api_operator_v1alpha1_ImageContentSourcePolicySpec(ref), + "github.com/openshift/api/operator/v1alpha1.Integrations": schema_openshift_api_operator_v1alpha1_Integrations(ref), + "github.com/openshift/api/operator/v1alpha1.Kueue": schema_openshift_api_operator_v1alpha1_Kueue(ref), + "github.com/openshift/api/operator/v1alpha1.KueueConfiguration": schema_openshift_api_operator_v1alpha1_KueueConfiguration(ref), + "github.com/openshift/api/operator/v1alpha1.KueueList": schema_openshift_api_operator_v1alpha1_KueueList(ref), + "github.com/openshift/api/operator/v1alpha1.KueueOperandSpec": schema_openshift_api_operator_v1alpha1_KueueOperandSpec(ref), + "github.com/openshift/api/operator/v1alpha1.KueueStatus": schema_openshift_api_operator_v1alpha1_KueueStatus(ref), + "github.com/openshift/api/operator/v1alpha1.LabelKeys": schema_openshift_api_operator_v1alpha1_LabelKeys(ref), "github.com/openshift/api/operator/v1alpha1.LoggingConfig": schema_openshift_api_operator_v1alpha1_LoggingConfig(ref), "github.com/openshift/api/operator/v1alpha1.NodeStatus": schema_openshift_api_operator_v1alpha1_NodeStatus(ref), "github.com/openshift/api/operator/v1alpha1.OLM": schema_openshift_api_operator_v1alpha1_OLM(ref), @@ -1124,9 +1134,11 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/openshift/api/operator/v1alpha1.OperatorCondition": schema_openshift_api_operator_v1alpha1_OperatorCondition(ref), "github.com/openshift/api/operator/v1alpha1.OperatorSpec": schema_openshift_api_operator_v1alpha1_OperatorSpec(ref), "github.com/openshift/api/operator/v1alpha1.OperatorStatus": schema_openshift_api_operator_v1alpha1_OperatorStatus(ref), + "github.com/openshift/api/operator/v1alpha1.Preemption": schema_openshift_api_operator_v1alpha1_Preemption(ref), "github.com/openshift/api/operator/v1alpha1.RepositoryDigestMirrors": schema_openshift_api_operator_v1alpha1_RepositoryDigestMirrors(ref), "github.com/openshift/api/operator/v1alpha1.StaticPodOperatorStatus": schema_openshift_api_operator_v1alpha1_StaticPodOperatorStatus(ref), "github.com/openshift/api/operator/v1alpha1.VersionAvailability": schema_openshift_api_operator_v1alpha1_VersionAvailability(ref), + "github.com/openshift/api/operator/v1alpha1.WorkloadManagement": schema_openshift_api_operator_v1alpha1_WorkloadManagement(ref), "github.com/openshift/api/operatorcontrolplane/v1alpha1.LogEntry": schema_openshift_api_operatorcontrolplane_v1alpha1_LogEntry(ref), "github.com/openshift/api/operatorcontrolplane/v1alpha1.OutageEntry": schema_openshift_api_operatorcontrolplane_v1alpha1_OutageEntry(ref), "github.com/openshift/api/operatorcontrolplane/v1alpha1.PodNetworkConnectivityCheck": schema_openshift_api_operatorcontrolplane_v1alpha1_PodNetworkConnectivityCheck(ref), @@ -56494,6 +56506,28 @@ func schema_openshift_api_operator_v1alpha1_BackupJobReference(ref common.Refere } } +func schema_openshift_api_operator_v1alpha1_ByWorkload(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ByWorkload controls how admission is done", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "admission": { + SchemaProps: spec.SchemaProps{ + Description: "admission controls how Kueue will process workloads. admission is required. Allowed values are Sequential, Parallel and \"\". When admission is set to Sequential, only pods from the currently processing workload will be admitted. Once all pods from the current workload are admitted, and ready, Kueue will process the next workload. Sequential processing may slow down admission when the cluster has sufficient capacity for multiple workloads, but provides a higher guarantee of workloads scheduling all pods together successfully. When set to Parallel, pods from any workload will be admitted at any time. This may lead to a deadlock where workloads are in contention for cluster capacity and pods from another workload having successfully scheduled prevent pods from the current workload scheduling. When set to \"\", this means no opinion and the operator is left to choose a reasonable default, which is subject to change over time. The current default is Parallel.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"admission"}, + }, + }, + } +} + func schema_openshift_api_operator_v1alpha1_ClusterVersionOperator(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -56839,6 +56873,86 @@ func schema_openshift_api_operator_v1alpha1_EtcdBackupStatus(ref common.Referenc } } +func schema_openshift_api_operator_v1alpha1_ExternalFramework(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "This is the GVR for an external framework. Controller runtime requires this in this format for api discoverability.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Description: "group is the API group of the externalFramework. Must be a valid DNS 1123 subdomain consisting of of lower-case alphanumeric characters, hyphens and periods, of at most 253 characters in length. Each period separated segment within the subdomain must start and end with an alphanumeric character.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Description: "resource is the Resource type of the external framework. Resource types are lowercase and plural (e.g. pods, deployments). Must be a valid DNS 1123 label consisting of a lower-case alphanumeric string and hyphens of at most 63 characters in length. The value must start and end with an alphanumeric character.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Description: "version is the version of the api (e.g. v1alpha1, v1beta1, v1). Must be a valid DNS 1035 label consisting of a lower-case alphanumeric string and hyphens of at most 63 characters in length. The value must start with an alphabetic character and end with an alphanumeric character.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "resource", "version"}, + }, + }, + } +} + +func schema_openshift_api_operator_v1alpha1_GangScheduling(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Kueue provides the ability to admit workloads all in one (gang admission) and evicts workloads if they are not ready within a specific time.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "policy": { + SchemaProps: spec.SchemaProps{ + Description: "policy allows you to enable and configure gang scheduling. The allowed values are ByWorkload, None and \"\". When set to ByWorkload, this means each workload is processed and considered for admission as a single unit. Where workloads do not become ready over time, the entire workload may then be evicted and retried at a later time. None means gang scheduling is disabled. When set to \"\", this means no opinion and the operator is left to choose a reasonable default, which is subject to change over time. The current default is None. policy is a required field.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "byWorkload": { + SchemaProps: spec.SchemaProps{ + Description: "byWorkload configures how Kueue will process workloads for admission. byWorkload is required when policy is ByWorkload, and forbidden otherwise.", + Ref: ref("github.com/openshift/api/operator/v1alpha1.ByWorkload"), + }, + }, + }, + Required: []string{"policy"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-unions": []interface{}{ + map[string]interface{}{ + "discriminator": "policy", + "fields-to-discriminateBy": map[string]interface{}{ + "byWorkload": "ByWorkload", + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/operator/v1alpha1.ByWorkload"}, + } +} + func schema_openshift_api_operator_v1alpha1_GenerationHistory(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -57073,6 +57187,400 @@ func schema_openshift_api_operator_v1alpha1_ImageContentSourcePolicySpec(ref com } } +func schema_openshift_api_operator_v1alpha1_Integrations(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "This is the integrations for Kueue. Kueue uses these apis to determine which jobs will be managed by Kueue.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "frameworks": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "frameworks are a list of frameworks that Kueue has support for. The allowed values are BatchJob, RayJob, RayCluster, JobSet, MPIJob, PaddleJob, PyTorchJob, TFJob, XGBoostJob, AppWrapper, Pod, Deployment, StatefulSet and LeaderWorkerSet. frameworks are required and must have at least one element. frameworks can not have more than 14 elements. Each framework represents a type of job that Kueue will manage.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "externalFrameworks": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "group", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "externalFrameworks are a list of GroupVersionResources that are managed for Kueue by external controllers. externalFrameworks are optional and should only be used if you have an external controller that integrates with Kueue. externalFrameworks, if specified, can not have more than 32 items.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/operator/v1alpha1.ExternalFramework"), + }, + }, + }, + }, + }, + "labelKeysToCopy": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "key", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "labelKeysToCopy are a list of label keys that are copied once a workload is created. These keys are persisted to the internal Kueue workload object. If not specified, only the Kueue labels will be copied. labelKeysToCopy, if specified, is limited to a maximum of 64 items.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/operator/v1alpha1.LabelKeys"), + }, + }, + }, + }, + }, + }, + Required: []string{"frameworks"}, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/operator/v1alpha1.ExternalFramework", "github.com/openshift/api/operator/v1alpha1.LabelKeys"}, + } +} + +func schema_openshift_api_operator_v1alpha1_Kueue(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Kueue is the CRD to represent the Kueue operator This CRD defines the configuration that the Kueue Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "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", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "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", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "metadata for Kueue.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "spec holds user settable values for configuration", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/operator/v1alpha1.KueueOperandSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status holds observed values from the cluster. They may not be overridden.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/operator/v1alpha1.KueueStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/operator/v1alpha1.KueueOperandSpec", "github.com/openshift/api/operator/v1alpha1.KueueStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_openshift_api_operator_v1alpha1_KueueConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "integrations": { + SchemaProps: spec.SchemaProps{ + Description: "integrations is a required field that configures the Kueue's workload integrations. Kueue has both standard integrations, known as job frameworks, and external integrations known as external frameworks. Kueue will only manage workloads that correspond to the specified integrations.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/operator/v1alpha1.Integrations"), + }, + }, + "workloadManagement": { + SchemaProps: spec.SchemaProps{ + Description: "workloadManagement controls how Kueue manages workloads. By default Kueue will manage workloads that have a queue-name label. Workloads that are missing the queue-name will be ignored by Kueue. If workloadManagement is not specified, the operator will decide the default. This default could change over time. This field is optional.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/operator/v1alpha1.WorkloadManagement"), + }, + }, + "gangScheduling": { + SchemaProps: spec.SchemaProps{ + Description: "gangScheduling controls how Kueue admits workloads. Gang Scheduling is the act of all or nothing scheduling, where workloads do not become ready within a certain period, they may be evicted and later retried. This field is optional. If gangScheduling is not specified, the operator will decide the default. This default could change over time.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/operator/v1alpha1.GangScheduling"), + }, + }, + "preemption": { + SchemaProps: spec.SchemaProps{ + Description: "preemption is the process of evicting one or more admitted Workloads to accommodate another Workload. Kueue has classical premption and preemption via fair sharing. preemption is optional. If preemption is not specified, the operator will decide the default. This default could change over time.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/operator/v1alpha1.Preemption"), + }, + }, + }, + Required: []string{"integrations"}, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/operator/v1alpha1.GangScheduling", "github.com/openshift/api/operator/v1alpha1.Integrations", "github.com/openshift/api/operator/v1alpha1.Preemption", "github.com/openshift/api/operator/v1alpha1.WorkloadManagement"}, + } +} + +func schema_openshift_api_operator_v1alpha1_KueueList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KueueList contains a list of Kueue\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "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", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "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", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "metadata for the list", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items is a slice of Kueue this is a cluster scoped resource and there can only be 1 Kueue", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/operator/v1alpha1.Kueue"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/operator/v1alpha1.Kueue", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_openshift_api_operator_v1alpha1_KueueOperandSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "managementState": { + SchemaProps: spec.SchemaProps{ + Description: "managementState indicates whether and how the operator should manage the component", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "logLevel": { + SchemaProps: spec.SchemaProps{ + Description: "logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands.\n\nValid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\".", + Type: []string{"string"}, + Format: "", + }, + }, + "operatorLogLevel": { + SchemaProps: spec.SchemaProps{ + Description: "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves.\n\nValid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\".", + Type: []string{"string"}, + Format: "", + }, + }, + "unsupportedConfigOverrides": { + SchemaProps: spec.SchemaProps{ + Description: "unsupportedConfigOverrides overrides the final configuration that was computed by the operator. Red Hat does not support the use of this field. Misuse of this field could lead to unexpected behavior or conflict with other configuration options. Seek guidance from the Red Hat support before using this field. Use of this property blocks cluster upgrades, it must be removed before upgrading your cluster.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + "observedConfig": { + SchemaProps: spec.SchemaProps{ + Description: "observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because it is an input to the level for the operator", + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + "config": { + SchemaProps: spec.SchemaProps{ + Description: "config is the desired configuration for the Kueue operator.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/operator/v1alpha1.KueueConfiguration"), + }, + }, + }, + Required: []string{"managementState", "config"}, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/operator/v1alpha1.KueueConfiguration", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_openshift_api_operator_v1alpha1_KueueStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KueueStatus defines the observed state of Kueue", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "observedGeneration is the last generation change you've dealt with", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "conditions is a list of conditions and their status", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/operator/v1.OperatorCondition"), + }, + }, + }, + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Description: "version is the level this availability applies to", + Type: []string{"string"}, + Format: "", + }, + }, + "readyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "readyReplicas indicates how many replicas are ready and at the desired state", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "latestAvailableRevision": { + SchemaProps: spec.SchemaProps{ + Description: "latestAvailableRevision is the deploymentID of the most recent deployment", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "generations": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "group", + "resource", + "namespace", + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/operator/v1.GenerationStatus"), + }, + }, + }, + }, + }, + }, + Required: []string{"readyReplicas"}, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/operator/v1.GenerationStatus", "github.com/openshift/api/operator/v1.OperatorCondition"}, + } +} + +func schema_openshift_api_operator_v1alpha1_LabelKeys(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "key": { + SchemaProps: spec.SchemaProps{ + Description: "key is the label key. A label key must be a valid qualified name consisting of a lower-case alphanumeric string, and hyphens of at most 63 characters in length. To support older openshift versions, matches is used instead of CEL validation. The name must start and end with an alphanumeric character. The name may be optionally prefixed with a subdomain consisting of lower-case alphanumeric characters, hyphens and periods, of at most 253 characters in length. Each period separated segment within the subdomain must start and end with an alphanumeric character. The optional prefix and the name are separate by a forward slash (/).", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"key"}, + }, + }, + } +} + func schema_openshift_api_operator_v1alpha1_LoggingConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -57570,6 +58078,27 @@ func schema_openshift_api_operator_v1alpha1_OperatorStatus(ref common.ReferenceC } } +func schema_openshift_api_operator_v1alpha1_Preemption(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "preemptionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "preemptionPolicy are the types of preemption Kueue allows. preemptionPolicy is an optional field. The allowed values are Classical, FairSharing and \"\". Classical means that an incoming workload, which does not fit within the unusued quota, is eligible to issue preemptions when the requests of the workload are below the resource flavor's nominal quota or borrowWithinCohort is enabled on the Cluster Queue. FairSharing means that ClusterQueues with pending Workloads can preempt other Workloads in their cohort until the preempting ClusterQueue obtains an equal or weighted share of the borrowable resources. The borrowable resources are the unused nominal quota of all the ClusterQueues in the cohort. FairSharing is a more heavy weight algorithm. When set to \"\", this means no opinion and the operator is left to choose a reasonable default, which is subject to change over time. The current default is Classical.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"preemptionPolicy"}, + }, + }, + } +} + func schema_openshift_api_operator_v1alpha1_RepositoryDigestMirrors(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -57761,6 +58290,27 @@ func schema_openshift_api_operator_v1alpha1_VersionAvailability(ref common.Refer } } +func schema_openshift_api_operator_v1alpha1_WorkloadManagement(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "labelPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "labelPolicy controls whether or not Kueue reconciles jobs that don't set the label kueue.x-k8s.io/queue-name. labelPolicy is a required field. The allowed values are QueueName, None and \"\". None means that workloads will be suspended on creation and a label will be added via a mutating webhook. This will be applied for all integrations that Kueue manages. QueueName means that workloads that are managed by Kueue must have a label kueue.x-k8s.io/queue-name. If this label is not present on the workload, then Kueue will ignore this workload. When set to \"\", this means no opinion and the operator is left to choose a reasonable default, which is subject to change over time. The current default is QueueName.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"labelPolicy"}, + }, + }, + } +} + func schema_openshift_api_operatorcontrolplane_v1alpha1_LogEntry(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/openapi/openapi.json b/openapi/openapi.json index 8e81748664b..5a834c7885c 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -33009,6 +33009,20 @@ } } }, + "com.github.openshift.api.operator.v1alpha1.ByWorkload": { + "description": "ByWorkload controls how admission is done", + "type": "object", + "required": [ + "admission" + ], + "properties": { + "admission": { + "description": "admission controls how Kueue will process workloads. admission is required. Allowed values are Sequential, Parallel and \"\". When admission is set to Sequential, only pods from the currently processing workload will be admitted. Once all pods from the current workload are admitted, and ready, Kueue will process the next workload. Sequential processing may slow down admission when the cluster has sufficient capacity for multiple workloads, but provides a higher guarantee of workloads scheduling all pods together successfully. When set to Parallel, pods from any workload will be admitted at any time. This may lead to a deadlock where workloads are in contention for cluster capacity and pods from another workload having successfully scheduled prevent pods from the current workload scheduling. When set to \"\", this means no opinion and the operator is left to choose a reasonable default, which is subject to change over time. The current default is Parallel.", + "type": "string", + "default": "" + } + } + }, "com.github.openshift.api.operator.v1alpha1.ClusterVersionOperator": { "description": "ClusterVersionOperator holds cluster-wide information about the Cluster Version Operator.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", "type": "object", @@ -33206,6 +33220,58 @@ } } }, + "com.github.openshift.api.operator.v1alpha1.ExternalFramework": { + "description": "This is the GVR for an external framework. Controller runtime requires this in this format for api discoverability.", + "type": "object", + "required": [ + "group", + "resource", + "version" + ], + "properties": { + "group": { + "description": "group is the API group of the externalFramework. Must be a valid DNS 1123 subdomain consisting of of lower-case alphanumeric characters, hyphens and periods, of at most 253 characters in length. Each period separated segment within the subdomain must start and end with an alphanumeric character.", + "type": "string", + "default": "" + }, + "resource": { + "description": "resource is the Resource type of the external framework. Resource types are lowercase and plural (e.g. pods, deployments). Must be a valid DNS 1123 label consisting of a lower-case alphanumeric string and hyphens of at most 63 characters in length. The value must start and end with an alphanumeric character.", + "type": "string", + "default": "" + }, + "version": { + "description": "version is the version of the api (e.g. v1alpha1, v1beta1, v1). Must be a valid DNS 1035 label consisting of a lower-case alphanumeric string and hyphens of at most 63 characters in length. The value must start with an alphabetic character and end with an alphanumeric character.", + "type": "string", + "default": "" + } + } + }, + "com.github.openshift.api.operator.v1alpha1.GangScheduling": { + "description": "Kueue provides the ability to admit workloads all in one (gang admission) and evicts workloads if they are not ready within a specific time.", + "type": "object", + "required": [ + "policy" + ], + "properties": { + "byWorkload": { + "description": "byWorkload configures how Kueue will process workloads for admission. byWorkload is required when policy is ByWorkload, and forbidden otherwise.", + "$ref": "#/definitions/com.github.openshift.api.operator.v1alpha1.ByWorkload" + }, + "policy": { + "description": "policy allows you to enable and configure gang scheduling. The allowed values are ByWorkload, None and \"\". When set to ByWorkload, this means each workload is processed and considered for admission as a single unit. Where workloads do not become ready over time, the entire workload may then be evicted and retried at a later time. None means gang scheduling is disabled. When set to \"\", this means no opinion and the operator is left to choose a reasonable default, which is subject to change over time. The current default is None. policy is a required field.", + "type": "string", + "default": "" + } + }, + "x-kubernetes-unions": [ + { + "discriminator": "policy", + "fields-to-discriminateBy": { + "byWorkload": "ByWorkload" + } + } + ] + }, "com.github.openshift.api.operator.v1alpha1.GenerationHistory": { "description": "GenerationHistory keeps track of the generation for a given resource so that decisions about forced updated can be made. DEPRECATED: Use fields in v1.GenerationStatus instead", "type": "object", @@ -33350,6 +33416,242 @@ } } }, + "com.github.openshift.api.operator.v1alpha1.Integrations": { + "description": "This is the integrations for Kueue. Kueue uses these apis to determine which jobs will be managed by Kueue.", + "type": "object", + "required": [ + "frameworks" + ], + "properties": { + "externalFrameworks": { + "description": "externalFrameworks are a list of GroupVersionResources that are managed for Kueue by external controllers. externalFrameworks are optional and should only be used if you have an external controller that integrates with Kueue. externalFrameworks, if specified, can not have more than 32 items.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.operator.v1alpha1.ExternalFramework" + }, + "x-kubernetes-list-map-keys": [ + "group" + ], + "x-kubernetes-list-type": "map" + }, + "frameworks": { + "description": "frameworks are a list of frameworks that Kueue has support for. The allowed values are BatchJob, RayJob, RayCluster, JobSet, MPIJob, PaddleJob, PyTorchJob, TFJob, XGBoostJob, AppWrapper, Pod, Deployment, StatefulSet and LeaderWorkerSet. frameworks are required and must have at least one element. frameworks can not have more than 14 elements. Each framework represents a type of job that Kueue will manage.", + "type": "array", + "items": { + "type": "string", + "default": "" + }, + "x-kubernetes-list-type": "set" + }, + "labelKeysToCopy": { + "description": "labelKeysToCopy are a list of label keys that are copied once a workload is created. These keys are persisted to the internal Kueue workload object. If not specified, only the Kueue labels will be copied. labelKeysToCopy, if specified, is limited to a maximum of 64 items.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.operator.v1alpha1.LabelKeys" + }, + "x-kubernetes-list-map-keys": [ + "key" + ], + "x-kubernetes-list-type": "map" + } + } + }, + "com.github.openshift.api.operator.v1alpha1.Kueue": { + "description": "Kueue is the CRD to represent the Kueue operator This CRD defines the configuration that the Kueue Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", + "type": "object", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "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", + "type": "string" + }, + "kind": { + "description": "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", + "type": "string" + }, + "metadata": { + "description": "metadata for Kueue.", + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "spec holds user settable values for configuration", + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.operator.v1alpha1.KueueOperandSpec" + }, + "status": { + "description": "status holds observed values from the cluster. They may not be overridden.", + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.operator.v1alpha1.KueueStatus" + } + } + }, + "com.github.openshift.api.operator.v1alpha1.KueueConfiguration": { + "type": "object", + "required": [ + "integrations" + ], + "properties": { + "gangScheduling": { + "description": "gangScheduling controls how Kueue admits workloads. Gang Scheduling is the act of all or nothing scheduling, where workloads do not become ready within a certain period, they may be evicted and later retried. This field is optional. If gangScheduling is not specified, the operator will decide the default. This default could change over time.", + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.operator.v1alpha1.GangScheduling" + }, + "integrations": { + "description": "integrations is a required field that configures the Kueue's workload integrations. Kueue has both standard integrations, known as job frameworks, and external integrations known as external frameworks. Kueue will only manage workloads that correspond to the specified integrations.", + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.operator.v1alpha1.Integrations" + }, + "preemption": { + "description": "preemption is the process of evicting one or more admitted Workloads to accommodate another Workload. Kueue has classical premption and preemption via fair sharing. preemption is optional. If preemption is not specified, the operator will decide the default. This default could change over time.", + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.operator.v1alpha1.Preemption" + }, + "workloadManagement": { + "description": "workloadManagement controls how Kueue manages workloads. By default Kueue will manage workloads that have a queue-name label. Workloads that are missing the queue-name will be ignored by Kueue. If workloadManagement is not specified, the operator will decide the default. This default could change over time. This field is optional.", + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.operator.v1alpha1.WorkloadManagement" + } + } + }, + "com.github.openshift.api.operator.v1alpha1.KueueList": { + "description": "KueueList contains a list of Kueue\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "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", + "type": "string" + }, + "items": { + "description": "items is a slice of Kueue this is a cluster scoped resource and there can only be 1 Kueue", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.operator.v1alpha1.Kueue" + } + }, + "kind": { + "description": "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", + "type": "string" + }, + "metadata": { + "description": "metadata for the list", + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + } + }, + "com.github.openshift.api.operator.v1alpha1.KueueOperandSpec": { + "type": "object", + "required": [ + "managementState", + "config" + ], + "properties": { + "config": { + "description": "config is the desired configuration for the Kueue operator.", + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.operator.v1alpha1.KueueConfiguration" + }, + "logLevel": { + "description": "logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands.\n\nValid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\".", + "type": "string" + }, + "managementState": { + "description": "managementState indicates whether and how the operator should manage the component", + "type": "string", + "default": "" + }, + "observedConfig": { + "description": "observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because it is an input to the level for the operator", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension" + }, + "operatorLogLevel": { + "description": "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves.\n\nValid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\".", + "type": "string" + }, + "unsupportedConfigOverrides": { + "description": "unsupportedConfigOverrides overrides the final configuration that was computed by the operator. Red Hat does not support the use of this field. Misuse of this field could lead to unexpected behavior or conflict with other configuration options. Seek guidance from the Red Hat support before using this field. Use of this property blocks cluster upgrades, it must be removed before upgrading your cluster.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension" + } + } + }, + "com.github.openshift.api.operator.v1alpha1.KueueStatus": { + "description": "KueueStatus defines the observed state of Kueue", + "type": "object", + "required": [ + "readyReplicas" + ], + "properties": { + "conditions": { + "description": "conditions is a list of conditions and their status", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.operator.v1.OperatorCondition" + }, + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map" + }, + "generations": { + "description": "generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.operator.v1.GenerationStatus" + }, + "x-kubernetes-list-map-keys": [ + "group", + "resource", + "namespace", + "name" + ], + "x-kubernetes-list-type": "map" + }, + "latestAvailableRevision": { + "description": "latestAvailableRevision is the deploymentID of the most recent deployment", + "type": "integer", + "format": "int32" + }, + "observedGeneration": { + "description": "observedGeneration is the last generation change you've dealt with", + "type": "integer", + "format": "int64" + }, + "readyReplicas": { + "description": "readyReplicas indicates how many replicas are ready and at the desired state", + "type": "integer", + "format": "int32", + "default": 0 + }, + "version": { + "description": "version is the level this availability applies to", + "type": "string" + } + } + }, + "com.github.openshift.api.operator.v1alpha1.LabelKeys": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "key is the label key. A label key must be a valid qualified name consisting of a lower-case alphanumeric string, and hyphens of at most 63 characters in length. To support older openshift versions, matches is used instead of CEL validation. The name must start and end with an alphanumeric character. The name may be optionally prefixed with a subdomain consisting of lower-case alphanumeric characters, hyphens and periods, of at most 253 characters in length. Each period separated segment within the subdomain must start and end with an alphanumeric character. The optional prefix and the name are separate by a forward slash (/).", + "type": "string", + "default": "" + } + } + }, "com.github.openshift.api.operator.v1alpha1.LoggingConfig": { "description": "LoggingConfig holds information about configuring logging DEPRECATED: Use v1.LogLevel instead", "type": "object", @@ -33662,6 +33964,19 @@ } } }, + "com.github.openshift.api.operator.v1alpha1.Preemption": { + "type": "object", + "required": [ + "preemptionPolicy" + ], + "properties": { + "preemptionPolicy": { + "description": "preemptionPolicy are the types of preemption Kueue allows. preemptionPolicy is an optional field. The allowed values are Classical, FairSharing and \"\". Classical means that an incoming workload, which does not fit within the unusued quota, is eligible to issue preemptions when the requests of the workload are below the resource flavor's nominal quota or borrowWithinCohort is enabled on the Cluster Queue. FairSharing means that ClusterQueues with pending Workloads can preempt other Workloads in their cohort until the preempting ClusterQueue obtains an equal or weighted share of the borrowable resources. The borrowable resources are the unused nominal quota of all the ClusterQueues in the cohort. FairSharing is a more heavy weight algorithm. When set to \"\", this means no opinion and the operator is left to choose a reasonable default, which is subject to change over time. The current default is Classical.", + "type": "string", + "default": "" + } + } + }, "com.github.openshift.api.operator.v1alpha1.RepositoryDigestMirrors": { "description": "RepositoryDigestMirrors holds cluster-wide information about how to handle mirros in the registries config. Note: the mirrors only work when pulling the images that are referenced by their digests.", "type": "object", @@ -33783,6 +34098,19 @@ } } }, + "com.github.openshift.api.operator.v1alpha1.WorkloadManagement": { + "type": "object", + "required": [ + "labelPolicy" + ], + "properties": { + "labelPolicy": { + "description": "labelPolicy controls whether or not Kueue reconciles jobs that don't set the label kueue.x-k8s.io/queue-name. labelPolicy is a required field. The allowed values are QueueName, None and \"\". None means that workloads will be suspended on creation and a label will be added via a mutating webhook. This will be applied for all integrations that Kueue manages. QueueName means that workloads that are managed by Kueue must have a label kueue.x-k8s.io/queue-name. If this label is not present on the workload, then Kueue will ignore this workload. When set to \"\", this means no opinion and the operator is left to choose a reasonable default, which is subject to change over time. The current default is QueueName.", + "type": "string", + "default": "" + } + } + }, "com.github.openshift.api.operatorcontrolplane.v1alpha1.LogEntry": { "description": "LogEntry records events", "type": "object", diff --git a/operator/v1alpha1/register.go b/operator/v1alpha1/register.go index 3e9b09ccede..689786f2dbb 100644 --- a/operator/v1alpha1/register.go +++ b/operator/v1alpha1/register.go @@ -41,6 +41,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &EtcdBackupList{}, &ClusterVersionOperator{}, &ClusterVersionOperatorList{}, + &Kueue{}, + &KueueList{}, ) return nil diff --git a/operator/v1alpha1/types_kueue.go b/operator/v1alpha1/types_kueue.go new file mode 100644 index 00000000000..dd4a55f1cdb --- /dev/null +++ b/operator/v1alpha1/types_kueue.go @@ -0,0 +1,326 @@ +package v1alpha1 + +import ( + operatorv1 "github.com/openshift/api/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Kueue is the CRD to represent the Kueue operator +// This CRD defines the configuration that the Kueue +// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +// +openshift:compatibility-gen:level=4 +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=kueue,scope=Cluster +// +k8s:openapi-gen=true +// +genclient +// +genclient:nonNamespaced +// +kubebuilder:storageversion +// +kubebuilder:subresource:status +// +kubebuilder:validation:XValidation:rule="self.metadata.name == 'cluster'",message="Kueue is a singleton, .metadata.name must be 'cluster'" +type Kueue struct { + metav1.TypeMeta `json:",inline"` + // metadata for Kueue. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec holds user settable values for configuration + // +required + Spec KueueOperandSpec `json:"spec"` + // status holds observed values from the cluster. + // They may not be overridden. + // +optional + Status KueueStatus `json:"status,omitempty"` +} + +type KueueOperandSpec struct { + operatorv1.OperatorSpec `json:",inline"` + // config is the desired configuration + // for the Kueue operator. + // +required + Config KueueConfiguration `json:"config"` +} + +type KueueConfiguration struct { + // integrations is a required field that configures the Kueue's workload integrations. + // Kueue has both standard integrations, known as job frameworks, and external integrations + // known as external frameworks. + // Kueue will only manage workloads that correspond to the specified integrations. + // +required + Integrations Integrations `json:"integrations"` + // workloadManagement controls how Kueue manages workloads. + // By default Kueue will manage workloads that have a queue-name label. + // Workloads that are missing the queue-name will be ignored by Kueue. + // If workloadManagement is not specified, the operator will decide the + // default. + // This default could change over time. + // This field is optional. + // +optional + WorkloadManagement WorkloadManagement `json:"workloadManagement"` + // gangScheduling controls how Kueue admits workloads. + // Gang Scheduling is the act of all or nothing scheduling, + // where workloads do not become ready within a certain period, they may be evicted and later retried. + // This field is optional. + // If gangScheduling is not specified, the operator will decide the default. + // This default could change over time. + // +optional + GangScheduling GangScheduling `json:"gangScheduling"` + // preemption is the process of evicting one or more admitted Workloads to accommodate another Workload. + // Kueue has classical premption and preemption via fair sharing. + // preemption is optional. + // If preemption is not specified, the operator will decide the default. + // This default could change over time. + // +optional + Preemption Preemption `json:"preemption"` +} + +// KueueStatus defines the observed state of Kueue +type KueueStatus struct { + operatorv1.OperatorStatus `json:",inline"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// KueueList contains a list of Kueue +// +// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +// +openshift:compatibility-gen:level=4 +type KueueList struct { + metav1.TypeMeta `json:",inline"` + // metadata for the list + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + // items is a slice of Kueue + // this is a cluster scoped resource and there can only be 1 Kueue + // +kubebuilder:validation:MaxItems=1 + // +required + Items []Kueue `json:"items"` +} + +// +kubebuilder:validation:Enum=BatchJob;RayJob;RayCluster;JobSet;MPIJob;PaddleJob;PyTorchJob;TFJob;XGBoostJob;AppWrapper;Pod;Deployment;StatefulSet;LeaderWorkerSet +type KueueIntegration string + +const ( + KueueIntegrationBatchJob KueueIntegration = "BatchJob" + KueueIntegrationRayJob KueueIntegration = "RayJob" + KueueIntegrationRayCluster KueueIntegration = "RayCluster" + KueueIntegrationJobSet KueueIntegration = "JobSet" + KueueIntegrationMPIJob KueueIntegration = "MPIJob" + KueueIntegrationPaddleJob KueueIntegration = "PaddleJob" + KueueIntegrationPyTorchJob KueueIntegration = "PyTorchJob" + KueueIntegrationTFJob KueueIntegration = "TFJob" + KueueIntegrationXGBoostJob KueueIntegration = "XGBoostJob" + KueueIntegrationAppWrapper KueueIntegration = "AppWrapper" + KueueIntegrationPod KueueIntegration = "Pod" + KueueIntegrationDeployment KueueIntegration = "Deployment" + KueueIntegrationStatefulSet KueueIntegration = "StatefulSet" + KueueIntegrationLeaderWorkerSet KueueIntegration = "LeaderWorkerSet" +) + +// This is the GVR for an external framework. +// Controller runtime requires this in this format +// for api discoverability. +type ExternalFramework struct { + // group is the API group of the externalFramework. + // Must be a valid DNS 1123 subdomain consisting of of lower-case alphanumeric characters, + // hyphens and periods, of at most 253 characters in length. + // Each period separated segment within the subdomain must start and end with an alphanumeric character. + // +group uses matches and not cel functions to allow for use on 4.17. + // +kubebuilder:validation:MaxLength=253 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:XValidation:rule="self.matches(r'^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$')" + // +required + Group string `json:"group"` + // resource is the Resource type of the external framework. + // Resource types are lowercase and plural (e.g. pods, deployments). + // Must be a valid DNS 1123 label consisting of a lower-case alphanumeric string + // and hyphens of at most 63 characters in length. + // The value must start and end with an alphanumeric character. + // +resource uses matches and not cel functions to allow for use on 4.17. + // +kubebuilder:validation:MaxLength=63 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:XValidation:rule="self.matches(r'^[a-z0-9]([-a-z0-9]*[a-z0-9])?$')" + // +required + Resource string `json:"resource"` + // version is the version of the api (e.g. v1alpha1, v1beta1, v1). + // Must be a valid DNS 1035 label consisting of a lower-case alphanumeric string + // and hyphens of at most 63 characters in length. + // The value must start with an alphabetic character and end with an alphanumeric character. + // +version uses matches and not cel functions to allow for use on 4.17. + // +kubebuilder:validation:MaxLength=63 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:XValidation:rule="self.matches(r'^[a-z0-9]([-a-z0-9]*[a-z0-9])?$')" + // +required + Version string `json:"version"` +} + +// This is the integrations for Kueue. +// Kueue uses these apis to determine +// which jobs will be managed by Kueue. +type Integrations struct { + // frameworks are a list of frameworks that Kueue has support for. + // The allowed values are BatchJob, RayJob, RayCluster, JobSet, MPIJob, PaddleJob, PyTorchJob, TFJob, XGBoostJob, AppWrapper, Pod, Deployment, StatefulSet and LeaderWorkerSet. + // frameworks are required and must have at least one element. + // frameworks can not have more than 14 elements. + // Each framework represents a type of job that Kueue will manage. + // +kubebuilder:validation:MaxItems=14 + // +kubebuilder:validation:MinItems=1 + // +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x == y))",message="each item in frameworks must be unique" + // +listType=set + // +required + Frameworks []KueueIntegration `json:"frameworks"` + // externalFrameworks are a list of GroupVersionResources + // that are managed for Kueue by external controllers. + // externalFrameworks are optional and should only be used if you have an external controller + // that integrates with Kueue. + // externalFrameworks, if specified, can not have more than 32 items. + // +listType=map + // +listMapKey=group + // +kubebuilder:validation:MaxItems=32 + // +optional + ExternalFrameworks []ExternalFramework `json:"externalFrameworks"` + // labelKeysToCopy are a list of label keys that are copied once a workload is created. + // These keys are persisted to the internal Kueue workload object. + // If not specified, only the Kueue labels will be copied. + // labelKeysToCopy, if specified, is limited to a maximum of 64 items. + // +kubebuilder:validation:MaxItems=64 + // +listType=map + // +listMapKey=key + // +optional + LabelKeysToCopy []LabelKeys `json:"labelKeysToCopy"` +} + +type LabelKeys struct { + // key is the label key. + // A label key must be a valid qualified name consisting of a lower-case alphanumeric string, + // and hyphens of at most 63 characters in length. + // To support older openshift versions, matches is used instead of CEL validation. + // The name must start and end with an alphanumeric character. + // The name may be optionally prefixed with a subdomain consisting of lower-case alphanumeric characters, + // hyphens and periods, of at most 253 characters in length. + // Each period separated segment within the subdomain must start and end with an alphanumeric character. + // The optional prefix and the name are separate by a forward slash (/). + // +key uses matches and not cel functions to allow for use on 4.17. + // +kubebuilder:validation:MaxLength=317 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:XValidation:rule="self.matches(r'^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?([a-z0-9]([-a-z0-9]*[a-z0-9])?)$')" + // +required + Key string `json:"key"` +} + +// +kubebuilder:validation:Enum=ByWorkload;None;"" +type GangSchedulingPolicy string + +const ( + GangSchedulingPolicyByWorkload GangSchedulingPolicy = "ByWorkload" + GangSchedulingPolicyNone GangSchedulingPolicy = "None" +) + +// +kubebuilder:validation:Enum="";Parallel;Sequential +type GangSchedulingWorkloadAdmission string + +const ( + GangSchedulingWorkloadAdmissionSequential GangSchedulingWorkloadAdmission = "Sequential" + GangSchedulingWorkloadAdmissionParallel GangSchedulingWorkloadAdmission = "Parallel" +) + +// Kueue provides the ability to admit workloads all in one (gang admission) +// and evicts workloads if they are not ready within a specific time. +// +kubebuilder:validation:XValidation:rule="has(self.policy) && self.policy == 'ByWorkload' ? has(self.byWorkload) : !has(self.byWorkload)",message="byWorkload is required when policy is byWorkload, and forbidden otherwise" +// +union +type GangScheduling struct { + // policy allows you to enable and configure gang scheduling. + // The allowed values are ByWorkload, None and "". + // When set to ByWorkload, this means each workload is processed and considered + // for admission as a single unit. + // Where workloads do not become ready over time, the entire workload may then be evicted and retried at a later time. + // None means gang scheduling is disabled. + // When set to "", this means no opinion and the operator is left + // to choose a reasonable default, which is subject to change over time. + // The current default is None. + // policy is a required field. + // +required + // +unionDiscriminator + Policy GangSchedulingPolicy `json:"policy"` + // byWorkload configures how Kueue will process workloads for admission. + // byWorkload is required when policy is ByWorkload, and forbidden otherwise. + // +optional + ByWorkload *ByWorkload `json:"byWorkload,omitempty"` +} + +// ByWorkload controls how admission is done +type ByWorkload struct { + // admission controls how Kueue will process workloads. + // admission is required. + // Allowed values are Sequential, Parallel and "". + // When admission is set to Sequential, only pods from the currently processing workload will be admitted. + // Once all pods from the current workload are admitted, and ready, Kueue will process the next workload. + // Sequential processing may slow down admission when the cluster has sufficient capacity for multiple workloads, + // but provides a higher guarantee of workloads scheduling all pods together successfully. + // When set to Parallel, pods from any workload will be admitted at any time. + // This may lead to a deadlock where workloads are in contention for cluster capacity and + // pods from another workload having successfully scheduled prevent pods from the current workload scheduling. + // When set to "", this means no opinion and the operator is left + // to choose a reasonable default, which is subject to change over time. + // The current default is Parallel. + // +required + Admission GangSchedulingWorkloadAdmission `json:"admission"` +} + +// +kubebuilder:validation:Enum="";QueueName;None +type LabelPolicy string + +const ( + LabelPolicyQueueName LabelPolicy = "QueueName" + LabelPolicyNone LabelPolicy = "None" +) + +type WorkloadManagement struct { + // labelPolicy controls whether or not Kueue reconciles + // jobs that don't set the label kueue.x-k8s.io/queue-name. + // labelPolicy is a required field. + // The allowed values are QueueName, None and "". + // None means that workloads will be suspended on + // creation and a label will be added via a mutating webhook. + // This will be applied for all integrations that Kueue manages. + // QueueName means that workloads that are managed + // by Kueue must have a label kueue.x-k8s.io/queue-name. + // If this label is not present on the workload, then Kueue will + // ignore this workload. + // When set to "", this means no opinion and the operator is left + // to choose a reasonable default, which is subject to change over time. + // The current default is QueueName. + // +required + LabelPolicy LabelPolicy `json:"labelPolicy"` +} + +// +kubebuilder:validation:Enum="";Classical;FairSharing +type PreemptionPolicy string + +const ( + PreemptionStrategyClassical PreemptionPolicy = "Classical" + PreemptionStrategyFairsharing PreemptionPolicy = "FairSharing" +) + +type Preemption struct { + // preemptionPolicy are the types of preemption Kueue allows. + // preemptionPolicy is an optional field. + // The allowed values are Classical, FairSharing and "". + // Classical means that an incoming workload, which does + // not fit within the unusued quota, is eligible to issue preemptions + // when the requests of the workload are below the + // resource flavor's nominal quota or borrowWithinCohort is enabled + // on the Cluster Queue. + // FairSharing means that ClusterQueues with pending Workloads can preempt other Workloads + // in their cohort until the preempting ClusterQueue + // obtains an equal or weighted share of the borrowable resources. + // The borrowable resources are the unused nominal quota + // of all the ClusterQueues in the cohort. + // FairSharing is a more heavy weight algorithm. + // When set to "", this means no opinion and the operator is left + // to choose a reasonable default, which is subject to change over time. + // The current default is Classical. + // +required + PreemptionPolicy PreemptionPolicy `json:"preemptionPolicy"` +} diff --git a/operator/v1alpha1/zz_generated.crd-manifests/kueue.crd.yaml b/operator/v1alpha1/zz_generated.crd-manifests/kueue.crd.yaml new file mode 100644 index 00000000000..f3e3be5396d --- /dev/null +++ b/operator/v1alpha1/zz_generated.crd-manifests/kueue.crd.yaml @@ -0,0 +1,485 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + name: kueue.operator.openshift.io +spec: + group: operator.openshift.io + names: + kind: Kueue + listKind: KueueList + plural: kueue + singular: kueue + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: |- + Kueue is the CRD to represent the Kueue operator + This CRD defines the configuration that the Kueue + Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. + properties: + apiVersion: + description: |- + 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 + type: string + kind: + description: |- + 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 + type: string + metadata: + type: object + spec: + description: spec holds user settable values for configuration + properties: + config: + description: |- + config is the desired configuration + for the Kueue operator. + properties: + gangScheduling: + description: |- + gangScheduling controls how Kueue admits workloads. + Gang Scheduling is the act of all or nothing scheduling, + where workloads do not become ready within a certain period, they may be evicted and later retried. + This field is optional. + If gangScheduling is not specified, the operator will decide the default. + This default could change over time. + properties: + byWorkload: + description: |- + byWorkload configures how Kueue will process workloads for admission. + byWorkload is required when policy is ByWorkload, and forbidden otherwise. + properties: + admission: + description: |- + admission controls how Kueue will process workloads. + admission is required. + Allowed values are Sequential, Parallel and "". + When admission is set to Sequential, only pods from the currently processing workload will be admitted. + Once all pods from the current workload are admitted, and ready, Kueue will process the next workload. + Sequential processing may slow down admission when the cluster has sufficient capacity for multiple workloads, + but provides a higher guarantee of workloads scheduling all pods together successfully. + When set to Parallel, pods from any workload will be admitted at any time. + This may lead to a deadlock where workloads are in contention for cluster capacity and + pods from another workload having successfully scheduled prevent pods from the current workload scheduling. + When set to "", this means no opinion and the operator is left + to choose a reasonable default, which is subject to change over time. + The current default is Parallel. + enum: + - "" + - Parallel + - Sequential + type: string + required: + - admission + type: object + policy: + description: |- + policy allows you to enable and configure gang scheduling. + The allowed values are ByWorkload, None and "". + When set to ByWorkload, this means each workload is processed and considered + for admission as a single unit. + Where workloads do not become ready over time, the entire workload may then be evicted and retried at a later time. + None means gang scheduling is disabled. + When set to "", this means no opinion and the operator is left + to choose a reasonable default, which is subject to change over time. + The current default is None. + policy is a required field. + enum: + - ByWorkload + - None + - "" + type: string + required: + - policy + type: object + x-kubernetes-validations: + - message: byWorkload is required when policy is byWorkload, and + forbidden otherwise + rule: 'has(self.policy) && self.policy == ''ByWorkload'' ? has(self.byWorkload) + : !has(self.byWorkload)' + integrations: + description: |- + integrations is a required field that configures the Kueue's workload integrations. + Kueue has both standard integrations, known as job frameworks, and external integrations + known as external frameworks. + Kueue will only manage workloads that correspond to the specified integrations. + properties: + externalFrameworks: + description: |- + externalFrameworks are a list of GroupVersionResources + that are managed for Kueue by external controllers. + externalFrameworks are optional and should only be used if you have an external controller + that integrates with Kueue. + externalFrameworks, if specified, can not have more than 32 items. + items: + description: |- + This is the GVR for an external framework. + Controller runtime requires this in this format + for api discoverability. + properties: + group: + description: |- + group is the API group of the externalFramework. + Must be a valid DNS 1123 subdomain consisting of of lower-case alphanumeric characters, + hyphens and periods, of at most 253 characters in length. + Each period separated segment within the subdomain must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - rule: self.matches(r'^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$') + resource: + description: |- + resource is the Resource type of the external framework. + Resource types are lowercase and plural (e.g. pods, deployments). + Must be a valid DNS 1123 label consisting of a lower-case alphanumeric string + and hyphens of at most 63 characters in length. + The value must start and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + type: string + x-kubernetes-validations: + - rule: self.matches(r'^[a-z0-9]([-a-z0-9]*[a-z0-9])?$') + version: + description: |- + version is the version of the api (e.g. v1alpha1, v1beta1, v1). + Must be a valid DNS 1035 label consisting of a lower-case alphanumeric string + and hyphens of at most 63 characters in length. + The value must start with an alphabetic character and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + type: string + x-kubernetes-validations: + - rule: self.matches(r'^[a-z0-9]([-a-z0-9]*[a-z0-9])?$') + required: + - group + - resource + - version + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - group + x-kubernetes-list-type: map + frameworks: + description: |- + frameworks are a list of frameworks that Kueue has support for. + The allowed values are BatchJob, RayJob, RayCluster, JobSet, MPIJob, PaddleJob, PyTorchJob, TFJob, XGBoostJob, AppWrapper, Pod, Deployment, StatefulSet and LeaderWorkerSet. + frameworks are required and must have at least one element. + frameworks can not have more than 14 elements. + Each framework represents a type of job that Kueue will manage. + items: + enum: + - BatchJob + - RayJob + - RayCluster + - JobSet + - MPIJob + - PaddleJob + - PyTorchJob + - TFJob + - XGBoostJob + - AppWrapper + - Pod + - Deployment + - StatefulSet + - LeaderWorkerSet + type: string + maxItems: 14 + minItems: 1 + type: array + x-kubernetes-list-type: set + x-kubernetes-validations: + - message: each item in frameworks must be unique + rule: self.all(x, self.exists_one(y, x == y)) + labelKeysToCopy: + description: |- + labelKeysToCopy are a list of label keys that are copied once a workload is created. + These keys are persisted to the internal Kueue workload object. + If not specified, only the Kueue labels will be copied. + labelKeysToCopy, if specified, is limited to a maximum of 64 items. + items: + properties: + key: + description: |- + key is the label key. + A label key must be a valid qualified name consisting of a lower-case alphanumeric string, + and hyphens of at most 63 characters in length. + To support older openshift versions, matches is used instead of CEL validation. + The name must start and end with an alphanumeric character. + The name may be optionally prefixed with a subdomain consisting of lower-case alphanumeric characters, + hyphens and periods, of at most 253 characters in length. + Each period separated segment within the subdomain must start and end with an alphanumeric character. + The optional prefix and the name are separate by a forward slash (/). + maxLength: 317 + minLength: 1 + type: string + x-kubernetes-validations: + - rule: self.matches(r'^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?([a-z0-9]([-a-z0-9]*[a-z0-9])?)$') + required: + - key + type: object + maxItems: 64 + type: array + x-kubernetes-list-map-keys: + - key + x-kubernetes-list-type: map + required: + - frameworks + type: object + preemption: + description: |- + preemption is the process of evicting one or more admitted Workloads to accommodate another Workload. + Kueue has classical premption and preemption via fair sharing. + preemption is optional. + If preemption is not specified, the operator will decide the default. + This default could change over time. + properties: + preemptionPolicy: + description: |- + preemptionPolicy are the types of preemption Kueue allows. + preemptionPolicy is an optional field. + The allowed values are Classical, FairSharing and "". + Classical means that an incoming workload, which does + not fit within the unusued quota, is eligible to issue preemptions + when the requests of the workload are below the + resource flavor's nominal quota or borrowWithinCohort is enabled + on the Cluster Queue. + FairSharing means that ClusterQueues with pending Workloads can preempt other Workloads + in their cohort until the preempting ClusterQueue + obtains an equal or weighted share of the borrowable resources. + The borrowable resources are the unused nominal quota + of all the ClusterQueues in the cohort. + FairSharing is a more heavy weight algorithm. + When set to "", this means no opinion and the operator is left + to choose a reasonable default, which is subject to change over time. + The current default is Classical. + enum: + - "" + - Classical + - FairSharing + type: string + required: + - preemptionPolicy + type: object + workloadManagement: + description: |- + workloadManagement controls how Kueue manages workloads. + By default Kueue will manage workloads that have a queue-name label. + Workloads that are missing the queue-name will be ignored by Kueue. + If workloadManagement is not specified, the operator will decide the + default. + This default could change over time. + This field is optional. + properties: + labelPolicy: + description: |- + labelPolicy controls whether or not Kueue reconciles + jobs that don't set the label kueue.x-k8s.io/queue-name. + labelPolicy is a required field. + The allowed values are QueueName, None and "". + None means that workloads will be suspended on + creation and a label will be added via a mutating webhook. + This will be applied for all integrations that Kueue manages. + QueueName means that workloads that are managed + by Kueue must have a label kueue.x-k8s.io/queue-name. + If this label is not present on the workload, then Kueue will + ignore this workload. + When set to "", this means no opinion and the operator is left + to choose a reasonable default, which is subject to change over time. + The current default is QueueName. + enum: + - "" + - QueueName + - None + type: string + required: + - labelPolicy + type: object + required: + - integrations + type: object + logLevel: + default: Normal + description: |- + logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a + simple way to manage coarse grained logging choices that operators have to interpret for their operands. + + Valid values are: "Normal", "Debug", "Trace", "TraceAll". + Defaults to "Normal". + enum: + - "" + - Normal + - Debug + - Trace + - TraceAll + type: string + managementState: + description: managementState indicates whether and how the operator + should manage the component + pattern: ^(Managed|Unmanaged|Force|Removed)$ + type: string + observedConfig: + description: |- + observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because + it is an input to the level for the operator + nullable: true + type: object + x-kubernetes-preserve-unknown-fields: true + operatorLogLevel: + default: Normal + description: |- + operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a + simple way to manage coarse grained logging choices that operators have to interpret for themselves. + + Valid values are: "Normal", "Debug", "Trace", "TraceAll". + Defaults to "Normal". + enum: + - "" + - Normal + - Debug + - Trace + - TraceAll + type: string + unsupportedConfigOverrides: + description: |- + unsupportedConfigOverrides overrides the final configuration that was computed by the operator. + Red Hat does not support the use of this field. + Misuse of this field could lead to unexpected behavior or conflict with other configuration options. + Seek guidance from the Red Hat support before using this field. + Use of this property blocks cluster upgrades, it must be removed before upgrading your cluster. + nullable: true + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - config + type: object + status: + description: |- + status holds observed values from the cluster. + They may not be overridden. + properties: + conditions: + description: conditions is a list of conditions and their status + items: + description: OperatorCondition is just the standard condition fields. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + type: string + reason: + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + generations: + description: generations are used to determine when an item needs + to be reconciled or has changed in a way that needs a reaction. + items: + description: GenerationStatus keeps track of the generation for + a given resource so that decisions about forced updates can be + made. + properties: + group: + description: group is the group of the thing you're tracking + type: string + hash: + description: hash is an optional field set for resources without + generation that are content sensitive like secrets and configmaps + type: string + lastGeneration: + description: lastGeneration is the last generation of the workload + controller involved + format: int64 + type: integer + name: + description: name is the name of the thing you're tracking + type: string + namespace: + description: namespace is where the thing you're tracking is + type: string + resource: + description: resource is the resource type of the thing you're + tracking + type: string + required: + - group + - name + - namespace + - resource + type: object + type: array + x-kubernetes-list-map-keys: + - group + - resource + - namespace + - name + x-kubernetes-list-type: map + latestAvailableRevision: + description: latestAvailableRevision is the deploymentID of the most + recent deployment + format: int32 + type: integer + x-kubernetes-validations: + - message: must only increase + rule: self >= oldSelf + observedGeneration: + description: observedGeneration is the last generation change you've + dealt with + format: int64 + type: integer + readyReplicas: + description: readyReplicas indicates how many replicas are ready and + at the desired state + format: int32 + type: integer + version: + description: version is the level this availability applies to + type: string + type: object + required: + - spec + type: object + x-kubernetes-validations: + - message: Kueue is a singleton, .metadata.name must be 'cluster' + rule: self.metadata.name == 'cluster' + served: true + storage: true + subresources: + status: {} diff --git a/operator/v1alpha1/zz_generated.deepcopy.go b/operator/v1alpha1/zz_generated.deepcopy.go index f8daa0576b1..6681c8217d0 100644 --- a/operator/v1alpha1/zz_generated.deepcopy.go +++ b/operator/v1alpha1/zz_generated.deepcopy.go @@ -26,6 +26,22 @@ func (in *BackupJobReference) DeepCopy() *BackupJobReference { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ByWorkload) DeepCopyInto(out *ByWorkload) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ByWorkload. +func (in *ByWorkload) DeepCopy() *ByWorkload { + if in == nil { + return nil + } + out := new(ByWorkload) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterVersionOperator) DeepCopyInto(out *ClusterVersionOperator) { *out = *in @@ -256,6 +272,43 @@ func (in *EtcdBackupStatus) DeepCopy() *EtcdBackupStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExternalFramework) DeepCopyInto(out *ExternalFramework) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalFramework. +func (in *ExternalFramework) DeepCopy() *ExternalFramework { + if in == nil { + return nil + } + out := new(ExternalFramework) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GangScheduling) DeepCopyInto(out *GangScheduling) { + *out = *in + if in.ByWorkload != nil { + in, out := &in.ByWorkload, &out.ByWorkload + *out = new(ByWorkload) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GangScheduling. +func (in *GangScheduling) DeepCopy() *GangScheduling { + if in == nil { + return nil + } + out := new(GangScheduling) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GenerationHistory) DeepCopyInto(out *GenerationHistory) { *out = *in @@ -384,6 +437,169 @@ func (in *ImageContentSourcePolicySpec) DeepCopy() *ImageContentSourcePolicySpec return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Integrations) DeepCopyInto(out *Integrations) { + *out = *in + if in.Frameworks != nil { + in, out := &in.Frameworks, &out.Frameworks + *out = make([]KueueIntegration, len(*in)) + copy(*out, *in) + } + if in.ExternalFrameworks != nil { + in, out := &in.ExternalFrameworks, &out.ExternalFrameworks + *out = make([]ExternalFramework, len(*in)) + copy(*out, *in) + } + if in.LabelKeysToCopy != nil { + in, out := &in.LabelKeysToCopy, &out.LabelKeysToCopy + *out = make([]LabelKeys, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Integrations. +func (in *Integrations) DeepCopy() *Integrations { + if in == nil { + return nil + } + out := new(Integrations) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Kueue) DeepCopyInto(out *Kueue) { + *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 Kueue. +func (in *Kueue) DeepCopy() *Kueue { + if in == nil { + return nil + } + out := new(Kueue) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Kueue) 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 *KueueConfiguration) DeepCopyInto(out *KueueConfiguration) { + *out = *in + in.Integrations.DeepCopyInto(&out.Integrations) + out.WorkloadManagement = in.WorkloadManagement + in.GangScheduling.DeepCopyInto(&out.GangScheduling) + out.Preemption = in.Preemption + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KueueConfiguration. +func (in *KueueConfiguration) DeepCopy() *KueueConfiguration { + if in == nil { + return nil + } + out := new(KueueConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KueueList) DeepCopyInto(out *KueueList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Kueue, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KueueList. +func (in *KueueList) DeepCopy() *KueueList { + if in == nil { + return nil + } + out := new(KueueList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KueueList) 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 *KueueOperandSpec) DeepCopyInto(out *KueueOperandSpec) { + *out = *in + in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) + in.Config.DeepCopyInto(&out.Config) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KueueOperandSpec. +func (in *KueueOperandSpec) DeepCopy() *KueueOperandSpec { + if in == nil { + return nil + } + out := new(KueueOperandSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KueueStatus) DeepCopyInto(out *KueueStatus) { + *out = *in + in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KueueStatus. +func (in *KueueStatus) DeepCopy() *KueueStatus { + if in == nil { + return nil + } + out := new(KueueStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LabelKeys) DeepCopyInto(out *LabelKeys) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelKeys. +func (in *LabelKeys) DeepCopy() *LabelKeys { + if in == nil { + return nil + } + out := new(LabelKeys) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LoggingConfig) DeepCopyInto(out *LoggingConfig) { *out = *in @@ -583,6 +799,22 @@ func (in *OperatorStatus) DeepCopy() *OperatorStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Preemption) DeepCopyInto(out *Preemption) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Preemption. +func (in *Preemption) DeepCopy() *Preemption { + if in == nil { + return nil + } + out := new(Preemption) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RepositoryDigestMirrors) DeepCopyInto(out *RepositoryDigestMirrors) { *out = *in @@ -653,3 +885,19 @@ func (in *VersionAvailability) DeepCopy() *VersionAvailability { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WorkloadManagement) DeepCopyInto(out *WorkloadManagement) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadManagement. +func (in *WorkloadManagement) DeepCopy() *WorkloadManagement { + if in == nil { + return nil + } + out := new(WorkloadManagement) + in.DeepCopyInto(out) + return out +} diff --git a/operator/v1alpha1/zz_generated.featuregated-crd-manifests.yaml b/operator/v1alpha1/zz_generated.featuregated-crd-manifests.yaml index 0d595be801b..d9ff920ea50 100644 --- a/operator/v1alpha1/zz_generated.featuregated-crd-manifests.yaml +++ b/operator/v1alpha1/zz_generated.featuregated-crd-manifests.yaml @@ -66,6 +66,27 @@ imagecontentsourcepolicies.operator.openshift.io: TopLevelFeatureGates: [] Version: v1alpha1 +kueue.operator.openshift.io: + Annotations: {} + ApprovedPRNumber: "" + CRDName: kueue.operator.openshift.io + Capability: "" + Category: "" + FeatureGates: [] + FilenameOperatorName: "" + FilenameOperatorOrdering: "" + FilenameRunLevel: "" + GroupName: operator.openshift.io + HasStatus: true + KindName: Kueue + Labels: {} + PluralName: kueue + PrinterColumns: [] + Scope: Cluster + ShortNames: null + TopLevelFeatureGates: [] + Version: v1alpha1 + olms.operator.openshift.io: Annotations: include.release.openshift.io/ibm-cloud-managed: "false" diff --git a/operator/v1alpha1/zz_generated.featuregated-crd-manifests/kueue.operator.openshift.io/AAA_ungated.yaml b/operator/v1alpha1/zz_generated.featuregated-crd-manifests/kueue.operator.openshift.io/AAA_ungated.yaml new file mode 100644 index 00000000000..a6a6ca67ab9 --- /dev/null +++ b/operator/v1alpha1/zz_generated.featuregated-crd-manifests/kueue.operator.openshift.io/AAA_ungated.yaml @@ -0,0 +1,483 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + feature-gate.release.openshift.io/: "true" + name: kueue.operator.openshift.io +spec: + group: operator.openshift.io + names: + kind: Kueue + listKind: KueueList + plural: kueue + singular: kueue + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: |- + Kueue is the CRD to represent the Kueue operator + This CRD defines the configuration that the Kueue + Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. + properties: + apiVersion: + description: |- + 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 + type: string + kind: + description: |- + 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 + type: string + metadata: + type: object + spec: + description: spec holds user settable values for configuration + properties: + config: + description: |- + config is the desired configuration + for the Kueue operator. + properties: + gangScheduling: + description: |- + gangScheduling controls how Kueue admits workloads. + Gang Scheduling is the act of all or nothing scheduling, + where workloads do not become ready within a certain period, they may be evicted and later retried. + This field is optional. + If gangScheduling is not specified, the operator will decide the default. + This default could change over time. + properties: + byWorkload: + description: |- + byWorkload configures how Kueue will process workloads for admission. + byWorkload is required when policy is ByWorkload, and forbidden otherwise. + properties: + admission: + description: |- + admission controls how Kueue will process workloads. + admission is required. + Allowed values are Sequential, Parallel and "". + When admission is set to Sequential, only pods from the currently processing workload will be admitted. + Once all pods from the current workload are admitted, and ready, Kueue will process the next workload. + Sequential processing may slow down admission when the cluster has sufficient capacity for multiple workloads, + but provides a higher guarantee of workloads scheduling all pods together successfully. + When set to Parallel, pods from any workload will be admitted at any time. + This may lead to a deadlock where workloads are in contention for cluster capacity and + pods from another workload having successfully scheduled prevent pods from the current workload scheduling. + When set to "", this means no opinion and the operator is left + to choose a reasonable default, which is subject to change over time. + The current default is Parallel. + enum: + - "" + - Parallel + - Sequential + type: string + required: + - admission + type: object + policy: + description: |- + policy allows you to enable and configure gang scheduling. + The allowed values are ByWorkload, None and "". + When set to ByWorkload, this means each workload is processed and considered + for admission as a single unit. + Where workloads do not become ready over time, the entire workload may then be evicted and retried at a later time. + None means gang scheduling is disabled. + When set to "", this means no opinion and the operator is left + to choose a reasonable default, which is subject to change over time. + The current default is None. + policy is a required field. + enum: + - ByWorkload + - None + - "" + type: string + required: + - policy + type: object + x-kubernetes-validations: + - message: byWorkload is required when policy is byWorkload, and + forbidden otherwise + rule: 'has(self.policy) && self.policy == ''ByWorkload'' ? has(self.byWorkload) + : !has(self.byWorkload)' + integrations: + description: |- + integrations is a required field that configures the Kueue's workload integrations. + Kueue has both standard integrations, known as job frameworks, and external integrations + known as external frameworks. + Kueue will only manage workloads that correspond to the specified integrations. + properties: + externalFrameworks: + description: |- + externalFrameworks are a list of GroupVersionResources + that are managed for Kueue by external controllers. + externalFrameworks are optional and should only be used if you have an external controller + that integrates with Kueue. + externalFrameworks, if specified, can not have more than 32 items. + items: + description: |- + This is the GVR for an external framework. + Controller runtime requires this in this format + for api discoverability. + properties: + group: + description: |- + group is the API group of the externalFramework. + Must be a valid DNS 1123 subdomain consisting of of lower-case alphanumeric characters, + hyphens and periods, of at most 253 characters in length. + Each period separated segment within the subdomain must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - rule: self.matches(r'^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$') + resource: + description: |- + resource is the Resource type of the external framework. + Resource types are lowercase and plural (e.g. pods, deployments). + Must be a valid DNS 1123 label consisting of a lower-case alphanumeric string + and hyphens of at most 63 characters in length. + The value must start and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + type: string + x-kubernetes-validations: + - rule: self.matches(r'^[a-z0-9]([-a-z0-9]*[a-z0-9])?$') + version: + description: |- + version is the version of the api (e.g. v1alpha1, v1beta1, v1). + Must be a valid DNS 1035 label consisting of a lower-case alphanumeric string + and hyphens of at most 63 characters in length. + The value must start with an alphabetic character and end with an alphanumeric character. + maxLength: 63 + minLength: 1 + type: string + x-kubernetes-validations: + - rule: self.matches(r'^[a-z0-9]([-a-z0-9]*[a-z0-9])?$') + required: + - group + - resource + - version + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - group + x-kubernetes-list-type: map + frameworks: + description: |- + frameworks are a list of frameworks that Kueue has support for. + The allowed values are BatchJob, RayJob, RayCluster, JobSet, MPIJob, PaddleJob, PyTorchJob, TFJob, XGBoostJob, AppWrapper, Pod, Deployment, StatefulSet and LeaderWorkerSet. + frameworks are required and must have at least one element. + frameworks can not have more than 14 elements. + Each framework represents a type of job that Kueue will manage. + items: + enum: + - BatchJob + - RayJob + - RayCluster + - JobSet + - MPIJob + - PaddleJob + - PyTorchJob + - TFJob + - XGBoostJob + - AppWrapper + - Pod + - Deployment + - StatefulSet + - LeaderWorkerSet + type: string + maxItems: 14 + minItems: 1 + type: array + x-kubernetes-list-type: set + x-kubernetes-validations: + - message: each item in frameworks must be unique + rule: self.all(x, self.exists_one(y, x == y)) + labelKeysToCopy: + description: |- + labelKeysToCopy are a list of label keys that are copied once a workload is created. + These keys are persisted to the internal Kueue workload object. + If not specified, only the Kueue labels will be copied. + labelKeysToCopy, if specified, is limited to a maximum of 64 items. + items: + properties: + key: + description: |- + key is the label key. + A label key must be a valid qualified name consisting of a lower-case alphanumeric string, + and hyphens of at most 63 characters in length. + To support older openshift versions, matches is used instead of CEL validation. + The name must start and end with an alphanumeric character. + The name may be optionally prefixed with a subdomain consisting of lower-case alphanumeric characters, + hyphens and periods, of at most 253 characters in length. + Each period separated segment within the subdomain must start and end with an alphanumeric character. + The optional prefix and the name are separate by a forward slash (/). + maxLength: 317 + minLength: 1 + type: string + x-kubernetes-validations: + - rule: self.matches(r'^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?([a-z0-9]([-a-z0-9]*[a-z0-9])?)$') + required: + - key + type: object + maxItems: 64 + type: array + x-kubernetes-list-map-keys: + - key + x-kubernetes-list-type: map + required: + - frameworks + type: object + preemption: + description: |- + preemption is the process of evicting one or more admitted Workloads to accommodate another Workload. + Kueue has classical premption and preemption via fair sharing. + preemption is optional. + If preemption is not specified, the operator will decide the default. + This default could change over time. + properties: + preemptionPolicy: + description: |- + preemptionPolicy are the types of preemption Kueue allows. + preemptionPolicy is an optional field. + The allowed values are Classical, FairSharing and "". + Classical means that an incoming workload, which does + not fit within the unusued quota, is eligible to issue preemptions + when the requests of the workload are below the + resource flavor's nominal quota or borrowWithinCohort is enabled + on the Cluster Queue. + FairSharing means that ClusterQueues with pending Workloads can preempt other Workloads + in their cohort until the preempting ClusterQueue + obtains an equal or weighted share of the borrowable resources. + The borrowable resources are the unused nominal quota + of all the ClusterQueues in the cohort. + FairSharing is a more heavy weight algorithm. + When set to "", this means no opinion and the operator is left + to choose a reasonable default, which is subject to change over time. + The current default is Classical. + enum: + - "" + - Classical + - FairSharing + type: string + required: + - preemptionPolicy + type: object + workloadManagement: + description: |- + workloadManagement controls how Kueue manages workloads. + By default Kueue will manage workloads that have a queue-name label. + Workloads that are missing the queue-name will be ignored by Kueue. + If workloadManagement is not specified, the operator will decide the + default. + This default could change over time. + This field is optional. + properties: + labelPolicy: + description: |- + labelPolicy controls whether or not Kueue reconciles + jobs that don't set the label kueue.x-k8s.io/queue-name. + labelPolicy is a required field. + The allowed values are QueueName, None and "". + None means that workloads will be suspended on + creation and a label will be added via a mutating webhook. + This will be applied for all integrations that Kueue manages. + QueueName means that workloads that are managed + by Kueue must have a label kueue.x-k8s.io/queue-name. + If this label is not present on the workload, then Kueue will + ignore this workload. + When set to "", this means no opinion and the operator is left + to choose a reasonable default, which is subject to change over time. + The current default is QueueName. + enum: + - "" + - QueueName + - None + type: string + required: + - labelPolicy + type: object + required: + - integrations + type: object + logLevel: + default: Normal + description: |- + logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a + simple way to manage coarse grained logging choices that operators have to interpret for their operands. + + Valid values are: "Normal", "Debug", "Trace", "TraceAll". + Defaults to "Normal". + enum: + - "" + - Normal + - Debug + - Trace + - TraceAll + type: string + managementState: + description: managementState indicates whether and how the operator + should manage the component + pattern: ^(Managed|Unmanaged|Force|Removed)$ + type: string + observedConfig: + description: |- + observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because + it is an input to the level for the operator + nullable: true + type: object + x-kubernetes-preserve-unknown-fields: true + operatorLogLevel: + default: Normal + description: |- + operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a + simple way to manage coarse grained logging choices that operators have to interpret for themselves. + + Valid values are: "Normal", "Debug", "Trace", "TraceAll". + Defaults to "Normal". + enum: + - "" + - Normal + - Debug + - Trace + - TraceAll + type: string + unsupportedConfigOverrides: + description: |- + unsupportedConfigOverrides overrides the final configuration that was computed by the operator. + Red Hat does not support the use of this field. + Misuse of this field could lead to unexpected behavior or conflict with other configuration options. + Seek guidance from the Red Hat support before using this field. + Use of this property blocks cluster upgrades, it must be removed before upgrading your cluster. + nullable: true + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - config + type: object + status: + description: |- + status holds observed values from the cluster. + They may not be overridden. + properties: + conditions: + description: conditions is a list of conditions and their status + items: + description: OperatorCondition is just the standard condition fields. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + type: string + reason: + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + generations: + description: generations are used to determine when an item needs + to be reconciled or has changed in a way that needs a reaction. + items: + description: GenerationStatus keeps track of the generation for + a given resource so that decisions about forced updates can be + made. + properties: + group: + description: group is the group of the thing you're tracking + type: string + hash: + description: hash is an optional field set for resources without + generation that are content sensitive like secrets and configmaps + type: string + lastGeneration: + description: lastGeneration is the last generation of the workload + controller involved + format: int64 + type: integer + name: + description: name is the name of the thing you're tracking + type: string + namespace: + description: namespace is where the thing you're tracking is + type: string + resource: + description: resource is the resource type of the thing you're + tracking + type: string + required: + - group + - name + - namespace + - resource + type: object + type: array + x-kubernetes-list-map-keys: + - group + - resource + - namespace + - name + x-kubernetes-list-type: map + latestAvailableRevision: + description: latestAvailableRevision is the deploymentID of the most + recent deployment + format: int32 + type: integer + x-kubernetes-validations: + - message: must only increase + rule: self >= oldSelf + observedGeneration: + description: observedGeneration is the last generation change you've + dealt with + format: int64 + type: integer + readyReplicas: + description: readyReplicas indicates how many replicas are ready and + at the desired state + format: int32 + type: integer + version: + description: version is the level this availability applies to + type: string + type: object + required: + - spec + type: object + x-kubernetes-validations: + - message: Kueue is a singleton, .metadata.name must be 'cluster' + rule: self.metadata.name == 'cluster' + served: true + storage: true + subresources: + status: {} diff --git a/operator/v1alpha1/zz_generated.swagger_doc_generated.go b/operator/v1alpha1/zz_generated.swagger_doc_generated.go index 9060bf99815..19bcbee462e 100644 --- a/operator/v1alpha1/zz_generated.swagger_doc_generated.go +++ b/operator/v1alpha1/zz_generated.swagger_doc_generated.go @@ -257,6 +257,119 @@ func (RepositoryDigestMirrors) SwaggerDoc() map[string]string { return map_RepositoryDigestMirrors } +var map_ByWorkload = map[string]string{ + "": "ByWorkload controls how admission is done", + "admission": "admission controls how Kueue will process workloads. admission is required. Allowed values are Sequential, Parallel and \"\". When admission is set to Sequential, only pods from the currently processing workload will be admitted. Once all pods from the current workload are admitted, and ready, Kueue will process the next workload. Sequential processing may slow down admission when the cluster has sufficient capacity for multiple workloads, but provides a higher guarantee of workloads scheduling all pods together successfully. When set to Parallel, pods from any workload will be admitted at any time. This may lead to a deadlock where workloads are in contention for cluster capacity and pods from another workload having successfully scheduled prevent pods from the current workload scheduling. When set to \"\", this means no opinion and the operator is left to choose a reasonable default, which is subject to change over time. The current default is Parallel.", +} + +func (ByWorkload) SwaggerDoc() map[string]string { + return map_ByWorkload +} + +var map_ExternalFramework = map[string]string{ + "": "This is the GVR for an external framework. Controller runtime requires this in this format for api discoverability.", + "group": "group is the API group of the externalFramework. Must be a valid DNS 1123 subdomain consisting of of lower-case alphanumeric characters, hyphens and periods, of at most 253 characters in length. Each period separated segment within the subdomain must start and end with an alphanumeric character.", + "resource": "resource is the Resource type of the external framework. Resource types are lowercase and plural (e.g. pods, deployments). Must be a valid DNS 1123 label consisting of a lower-case alphanumeric string and hyphens of at most 63 characters in length. The value must start and end with an alphanumeric character.", + "version": "version is the version of the api (e.g. v1alpha1, v1beta1, v1). Must be a valid DNS 1035 label consisting of a lower-case alphanumeric string and hyphens of at most 63 characters in length. The value must start with an alphabetic character and end with an alphanumeric character.", +} + +func (ExternalFramework) SwaggerDoc() map[string]string { + return map_ExternalFramework +} + +var map_GangScheduling = map[string]string{ + "": "Kueue provides the ability to admit workloads all in one (gang admission) and evicts workloads if they are not ready within a specific time.", + "policy": "policy allows you to enable and configure gang scheduling. The allowed values are ByWorkload, None and \"\". When set to ByWorkload, this means each workload is processed and considered for admission as a single unit. Where workloads do not become ready over time, the entire workload may then be evicted and retried at a later time. None means gang scheduling is disabled. When set to \"\", this means no opinion and the operator is left to choose a reasonable default, which is subject to change over time. The current default is None. policy is a required field.", + "byWorkload": "byWorkload configures how Kueue will process workloads for admission. byWorkload is required when policy is ByWorkload, and forbidden otherwise.", +} + +func (GangScheduling) SwaggerDoc() map[string]string { + return map_GangScheduling +} + +var map_Integrations = map[string]string{ + "": "This is the integrations for Kueue. Kueue uses these apis to determine which jobs will be managed by Kueue.", + "frameworks": "frameworks are a list of frameworks that Kueue has support for. The allowed values are BatchJob, RayJob, RayCluster, JobSet, MPIJob, PaddleJob, PyTorchJob, TFJob, XGBoostJob, AppWrapper, Pod, Deployment, StatefulSet and LeaderWorkerSet. frameworks are required and must have at least one element. frameworks can not have more than 14 elements. Each framework represents a type of job that Kueue will manage.", + "externalFrameworks": "externalFrameworks are a list of GroupVersionResources that are managed for Kueue by external controllers. externalFrameworks are optional and should only be used if you have an external controller that integrates with Kueue. externalFrameworks, if specified, can not have more than 32 items.", + "labelKeysToCopy": "labelKeysToCopy are a list of label keys that are copied once a workload is created. These keys are persisted to the internal Kueue workload object. If not specified, only the Kueue labels will be copied. labelKeysToCopy, if specified, is limited to a maximum of 64 items.", +} + +func (Integrations) SwaggerDoc() map[string]string { + return map_Integrations +} + +var map_Kueue = map[string]string{ + "": "Kueue is the CRD to represent the Kueue operator This CRD defines the configuration that the Kueue Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", + "metadata": "metadata for Kueue.", + "spec": "spec holds user settable values for configuration", + "status": "status holds observed values from the cluster. They may not be overridden.", +} + +func (Kueue) SwaggerDoc() map[string]string { + return map_Kueue +} + +var map_KueueConfiguration = map[string]string{ + "integrations": "integrations is a required field that configures the Kueue's workload integrations. Kueue has both standard integrations, known as job frameworks, and external integrations known as external frameworks. Kueue will only manage workloads that correspond to the specified integrations.", + "workloadManagement": "workloadManagement controls how Kueue manages workloads. By default Kueue will manage workloads that have a queue-name label. Workloads that are missing the queue-name will be ignored by Kueue. If workloadManagement is not specified, the operator will decide the default. This default could change over time. This field is optional.", + "gangScheduling": "gangScheduling controls how Kueue admits workloads. Gang Scheduling is the act of all or nothing scheduling, where workloads do not become ready within a certain period, they may be evicted and later retried. This field is optional. If gangScheduling is not specified, the operator will decide the default. This default could change over time.", + "preemption": "preemption is the process of evicting one or more admitted Workloads to accommodate another Workload. Kueue has classical premption and preemption via fair sharing. preemption is optional. If preemption is not specified, the operator will decide the default. This default could change over time.", +} + +func (KueueConfiguration) SwaggerDoc() map[string]string { + return map_KueueConfiguration +} + +var map_KueueList = map[string]string{ + "": "KueueList contains a list of Kueue\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", + "metadata": "metadata for the list", + "items": "items is a slice of Kueue this is a cluster scoped resource and there can only be 1 Kueue", +} + +func (KueueList) SwaggerDoc() map[string]string { + return map_KueueList +} + +var map_KueueOperandSpec = map[string]string{ + "config": "config is the desired configuration for the Kueue operator.", +} + +func (KueueOperandSpec) SwaggerDoc() map[string]string { + return map_KueueOperandSpec +} + +var map_KueueStatus = map[string]string{ + "": "KueueStatus defines the observed state of Kueue", +} + +func (KueueStatus) SwaggerDoc() map[string]string { + return map_KueueStatus +} + +var map_LabelKeys = map[string]string{ + "key": "key is the label key. A label key must be a valid qualified name consisting of a lower-case alphanumeric string, and hyphens of at most 63 characters in length. To support older openshift versions, matches is used instead of CEL validation. The name must start and end with an alphanumeric character. The name may be optionally prefixed with a subdomain consisting of lower-case alphanumeric characters, hyphens and periods, of at most 253 characters in length. Each period separated segment within the subdomain must start and end with an alphanumeric character. The optional prefix and the name are separate by a forward slash (/).", +} + +func (LabelKeys) SwaggerDoc() map[string]string { + return map_LabelKeys +} + +var map_Preemption = map[string]string{ + "preemptionPolicy": "preemptionPolicy are the types of preemption Kueue allows. preemptionPolicy is an optional field. The allowed values are Classical, FairSharing and \"\". Classical means that an incoming workload, which does not fit within the unusued quota, is eligible to issue preemptions when the requests of the workload are below the resource flavor's nominal quota or borrowWithinCohort is enabled on the Cluster Queue. FairSharing means that ClusterQueues with pending Workloads can preempt other Workloads in their cohort until the preempting ClusterQueue obtains an equal or weighted share of the borrowable resources. The borrowable resources are the unused nominal quota of all the ClusterQueues in the cohort. FairSharing is a more heavy weight algorithm. When set to \"\", this means no opinion and the operator is left to choose a reasonable default, which is subject to change over time. The current default is Classical.", +} + +func (Preemption) SwaggerDoc() map[string]string { + return map_Preemption +} + +var map_WorkloadManagement = map[string]string{ + "labelPolicy": "labelPolicy controls whether or not Kueue reconciles jobs that don't set the label kueue.x-k8s.io/queue-name. labelPolicy is a required field. The allowed values are QueueName, None and \"\". None means that workloads will be suspended on creation and a label will be added via a mutating webhook. This will be applied for all integrations that Kueue manages. QueueName means that workloads that are managed by Kueue must have a label kueue.x-k8s.io/queue-name. If this label is not present on the workload, then Kueue will ignore this workload. When set to \"\", this means no opinion and the operator is left to choose a reasonable default, which is subject to change over time. The current default is QueueName.", +} + +func (WorkloadManagement) SwaggerDoc() map[string]string { + return map_WorkloadManagement +} + var map_OLM = map[string]string{ "": "OLM provides information to configure an operator to manage the OLM controllers\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",