diff --git a/openapi/generated_openapi/zz_generated.openapi.go b/openapi/generated_openapi/zz_generated.openapi.go index 72470ff0a95..1f1cf260c2e 100644 --- a/openapi/generated_openapi/zz_generated.openapi.go +++ b/openapi/generated_openapi/zz_generated.openapi.go @@ -1110,11 +1110,19 @@ 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.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), @@ -56839,6 +56847,44 @@ 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_GenerationHistory(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -57073,6 +57119,371 @@ 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": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "frameworks are a unique list of names to be enabled. This is required and must have at least one element. Each framework represents a type of job that Kueue will manage. 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.", + 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-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "externalFrameworks are a list of GroupVersionResources that are managed for Kueue by external controllers. These are optional and should only be used if you have an external controller that integrates with 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.ExternalFramework"), + }, + }, + }, + }, + }, + "labelKeysToCopy": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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.", + 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"), + }, + }, + }, + Required: []string{"integrations"}, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/operator/v1alpha1.Integrations"}, + } +} + +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. 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{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_openshift_api_operator_v1alpha1_LoggingConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/openapi/openapi.json b/openapi/openapi.json index 8e81748664b..731374033f9 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -33206,6 +33206,32 @@ } } }, + "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.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 +33376,217 @@ } } }, + "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. These are optional and should only be used if you have an external controller that integrates with Kueue.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.operator.v1alpha1.ExternalFramework" + }, + "x-kubernetes-list-type": "atomic" + }, + "frameworks": { + "description": "frameworks are a unique list of names to be enabled. This is required and must have at least one element. Each framework represents a type of job that Kueue will manage. 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.", + "type": "array", + "items": { + "type": "string", + "default": "" + }, + "x-kubernetes-list-type": "atomic" + }, + "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.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.operator.v1alpha1.LabelKeys" + }, + "x-kubernetes-list-type": "atomic" + } + } + }, + "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": { + "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" + } + } + }, + "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", + "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. 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" + } + } + }, "com.github.openshift.api.operator.v1alpha1.LoggingConfig": { "description": "LoggingConfig holds information about configuring logging DEPRECATED: Use v1.LogLevel instead", "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..b37c731c456 --- /dev/null +++ b/operator/v1alpha1/types_kueue.go @@ -0,0 +1,175 @@ +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"` +} + +// 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" + KueueIntegrationPaddeJob KueueIntegration = "PaddeJob" + 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. + // +kubebuilder:validation:MaxLength=253 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:XValidation:rule="self.size() == 0 || !format.dns1123Label().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character." + // +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. + // +kubebuilder:validation:MaxLength=63 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:XValidation:rule="self.size() == 0 || !format.dns1123Label().validate(self).hasValue()",message="a lowercase RFC 1123 label must consist of lower case alphanumeric characters and '-', and must start and end with an alphanumeric character." + // +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. + // +kubebuilder:validation:MaxLength=63 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:XValidation:rule="self.size() == 0 || !format.dns1035Label().validate(self).hasValue()",message="a lowercase RFC 1035 label must consist of lower case alphanumeric characters, '-' or '.', and must start with an alphabetic character and end with an alphanumeric character." + // +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 unique list of names to be enabled. + // This is required and must have at least one element. + // Each framework represents a type of job that Kueue will manage. + // 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. + // +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=atomic + // +required + Frameworks []KueueIntegration `json:"frameworks"` + // externalFrameworks are a list of GroupVersionResources + // that are managed for Kueue by external controllers. + // These are optional and should only be used if you have an external controller + // that integrates with Kueue. + // +listType=atomic + // +kubebuilder:validation:MaxItems=32 + // +optional + ExternalFrameworks []ExternalFramework `json:"externalFrameworks,omitempty"` + // 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. + // +kubebuilder:validation:MaxItems=64 + // +listType=atomic + // +optional + LabelKeysToCopy []LabelKeys `json:"labelKeysToCopy,omitempty"` +} + +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. + // 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 (/). + // +kubebuilder:validation:MaxLength=317 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:XValidation:rule="!format.qualifiedName().validate(self).hasValue()",message="a qualified name must consist of a lower-case alphanumeric and hyphenated string of at most 63 characters in length, starting and ending with alphanumeric chracters. 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." + // +optional + Key string `json:"key,omitempty"` +} 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..af8c9965ac9 --- /dev/null +++ b/operator/v1alpha1/zz_generated.crd-manifests/kueue.crd.yaml @@ -0,0 +1,362 @@ +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: + 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. + These are optional and should only be used if you have an external controller + that integrates with Kueue. + 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: + - message: a lowercase RFC 1123 subdomain must consist + of lower case alphanumeric characters, '-' or '.', + and must start and end with an alphanumeric character. + rule: self.size() == 0 || !format.dns1123Label().validate(self).hasValue() + 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: + - message: a lowercase RFC 1123 label must consist of + lower case alphanumeric characters and '-', and + must start and end with an alphanumeric character. + rule: self.size() == 0 || !format.dns1123Label().validate(self).hasValue() + 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: + - message: a lowercase RFC 1035 label must consist of + lower case alphanumeric characters, '-' or '.', + and must start with an alphabetic character and + end with an alphanumeric character. + rule: self.size() == 0 || !format.dns1035Label().validate(self).hasValue() + required: + - group + - resource + - version + type: object + maxItems: 32 + type: array + x-kubernetes-list-type: atomic + frameworks: + description: |- + frameworks are a unique list of names to be enabled. + This is required and must have at least one element. + Each framework represents a type of job that Kueue will manage. + 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. + 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: atomic + 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. + 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. + 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: + - message: a qualified name must consist of a lower-case + alphanumeric and hyphenated string of at most 63 + characters in length, starting and ending with alphanumeric + chracters. 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. + rule: '!format.qualifiedName().validate(self).hasValue()' + type: object + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + required: + - frameworks + 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..48e924eacf0 100644 --- a/operator/v1alpha1/zz_generated.deepcopy.go +++ b/operator/v1alpha1/zz_generated.deepcopy.go @@ -256,6 +256,22 @@ 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 *GenerationHistory) DeepCopyInto(out *GenerationHistory) { *out = *in @@ -384,6 +400,166 @@ 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) + 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 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..5b51737365b --- /dev/null +++ b/operator/v1alpha1/zz_generated.featuregated-crd-manifests/kueue.operator.openshift.io/AAA_ungated.yaml @@ -0,0 +1,360 @@ +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: + 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. + These are optional and should only be used if you have an external controller + that integrates with Kueue. + 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: + - message: a lowercase RFC 1123 subdomain must consist + of lower case alphanumeric characters, '-' or '.', + and must start and end with an alphanumeric character. + rule: self.size() == 0 || !format.dns1123Label().validate(self).hasValue() + 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: + - message: a lowercase RFC 1123 label must consist of + lower case alphanumeric characters and '-', and + must start and end with an alphanumeric character. + rule: self.size() == 0 || !format.dns1123Label().validate(self).hasValue() + 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: + - message: a lowercase RFC 1035 label must consist of + lower case alphanumeric characters, '-' or '.', + and must start with an alphabetic character and + end with an alphanumeric character. + rule: self.size() == 0 || !format.dns1035Label().validate(self).hasValue() + required: + - group + - resource + - version + type: object + maxItems: 32 + type: array + x-kubernetes-list-type: atomic + frameworks: + description: |- + frameworks are a unique list of names to be enabled. + This is required and must have at least one element. + Each framework represents a type of job that Kueue will manage. + 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. + 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: atomic + 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. + 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. + 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: + - message: a qualified name must consist of a lower-case + alphanumeric and hyphenated string of at most 63 + characters in length, starting and ending with alphanumeric + chracters. 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. + rule: '!format.qualifiedName().validate(self).hasValue()' + type: object + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + required: + - frameworks + 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..f4a3023a200 100644 --- a/operator/v1alpha1/zz_generated.swagger_doc_generated.go +++ b/operator/v1alpha1/zz_generated.swagger_doc_generated.go @@ -257,6 +257,81 @@ func (RepositoryDigestMirrors) SwaggerDoc() map[string]string { return map_RepositoryDigestMirrors } +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_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 unique list of names to be enabled. This is required and must have at least one element. Each framework represents a type of job that Kueue will manage. 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.", + "externalFrameworks": "externalFrameworks are a list of GroupVersionResources that are managed for Kueue by external controllers. These are optional and should only be used if you have an external controller that integrates with Kueue.", + "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.", +} + +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.", +} + +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. 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_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",