diff --git a/code-generator/src/catalog.rs b/code-generator/src/catalog.rs index debcc35fd..ceede0ee3 100644 --- a/code-generator/src/catalog.rs +++ b/code-generator/src/catalog.rs @@ -2215,8 +2215,13 @@ pub const CRD_V1_SOURCES: &'static [UpstreamSource] = &[ urls: &[ "https://github.com/kubernetes-sigs/kueue/blob/main/config/components/crd/bases/kueue.x-k8s.io_admissionchecks.yaml", "https://github.com/kubernetes-sigs/kueue/blob/main/config/components/crd/bases/kueue.x-k8s.io_clusterqueues.yaml", + "https://github.com/kubernetes-sigs/kueue/blob/main/config/components/crd/bases/kueue.x-k8s.io_cohorts.yaml", "https://github.com/kubernetes-sigs/kueue/blob/main/config/components/crd/bases/kueue.x-k8s.io_localqueues.yaml", + "https://github.com/kubernetes-sigs/kueue/blob/main/config/components/crd/bases/kueue.x-k8s.io_multikueueclusters.yaml", + "https://github.com/kubernetes-sigs/kueue/blob/main/config/components/crd/bases/kueue.x-k8s.io_multikueueconfigs.yaml", + "https://github.com/kubernetes-sigs/kueue/blob/main/config/components/crd/bases/kueue.x-k8s.io_provisioningrequestconfigs.yaml", "https://github.com/kubernetes-sigs/kueue/blob/main/config/components/crd/bases/kueue.x-k8s.io_resourceflavors.yaml", + "https://github.com/kubernetes-sigs/kueue/blob/main/config/components/crd/bases/kueue.x-k8s.io_workloadpriorityclasses.yaml", "https://github.com/kubernetes-sigs/kueue/blob/main/config/components/crd/bases/kueue.x-k8s.io_workloads.yaml", ], ignores: &[], diff --git a/crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1alpha1/cohorts.yaml b/crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1alpha1/cohorts.yaml new file mode 100644 index 000000000..f67bdb4f7 --- /dev/null +++ b/crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1alpha1/cohorts.yaml @@ -0,0 +1,171 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.16.3" + name: "cohorts.kueue.x-k8s.io" +spec: + group: "kueue.x-k8s.io" + names: + kind: "Cohort" + listKind: "CohortList" + plural: "cohorts" + singular: "cohort" + scope: "Cluster" + versions: + - name: "v1alpha1" + schema: + openAPIV3Schema: + description: "Cohort is the Schema for the cohorts API. Using Hierarchical\nCohorts (any Cohort which has a parent) with Fair Sharing\nresults in undefined behavior in 0.9" + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore 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.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + description: "CohortSpec defines the desired state of Cohort" + properties: + parent: + description: "Parent references the name of the Cohort's parent, if\nany. It satisfies one of three cases:\n1) Unset. This Cohort is the root of its Cohort tree.\n2) References a non-existent Cohort. We use default Cohort (no borrowing/lending limits).\n3) References an existent Cohort.\n\nIf a cycle is created, we disable all members of the\nCohort, including ClusterQueues, until the cycle is\nremoved. We prevent further admission while the cycle\nexists." + maxLength: 253 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + resourceGroups: + description: "ResourceGroups describes groupings of Resources and\nFlavors. Each ResourceGroup defines a list of Resources\nand a list of Flavors which provide quotas for these\nResources. Each Resource and each Flavor may only form part\nof one ResourceGroup. There may be up to 16 ResourceGroups\nwithin a Cohort.\n\nBorrowingLimit limits how much members of this Cohort\nsubtree can borrow from the parent subtree.\n\nLendingLimit limits how much members of this Cohort subtree\ncan lend to the parent subtree.\n\nBorrowing and Lending limits must only be set when the\nCohort has a parent. Otherwise, the Cohort create/update\nwill be rejected by the webhook." + items: + properties: + coveredResources: + description: "coveredResources is the list of resources covered by the flavors in this\ngroup.\nExamples: cpu, memory, vendor.com/gpu.\nThe list cannot be empty and it can contain up to 16 resources." + items: + description: "ResourceName is the name identifying various resources in a ResourceList." + type: "string" + maxItems: 16 + minItems: 1 + type: "array" + flavors: + description: "flavors is the list of flavors that provide the resources of this group.\nTypically, different flavors represent different hardware models\n(e.g., gpu models, cpu architectures) or pricing models (on-demand vs spot\ncpus).\nEach flavor MUST list all the resources listed for this group in the same\norder as the .resources field.\nThe list cannot be empty and it can contain up to 16 flavors." + items: + properties: + name: + description: "name of this flavor. The name should match the .metadata.name of a\nResourceFlavor. If a matching ResourceFlavor does not exist, the\nClusterQueue will have an Active condition set to False." + maxLength: 253 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + resources: + description: "resources is the list of quotas for this flavor per resource.\nThere could be up to 16 resources." + items: + properties: + borrowingLimit: + anyOf: + - type: "integer" + - type: "string" + description: "borrowingLimit is the maximum amount of quota for the [flavor, resource]\ncombination that this ClusterQueue is allowed to borrow from the unused\nquota of other ClusterQueues in the same cohort.\nIn total, at a given time, Workloads in a ClusterQueue can consume a\nquantity of quota equal to nominalQuota+borrowingLimit, assuming the other\nClusterQueues in the cohort have enough unused quota.\nIf null, it means that there is no borrowing limit.\nIf not null, it must be non-negative.\nborrowingLimit must be null if spec.cohort is empty." + pattern: "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$" + x-kubernetes-int-or-string: true + lendingLimit: + anyOf: + - type: "integer" + - type: "string" + description: "lendingLimit is the maximum amount of unused quota for the [flavor, resource]\ncombination that this ClusterQueue can lend to other ClusterQueues in the same cohort.\nIn total, at a given time, ClusterQueue reserves for its exclusive use\na quantity of quota equals to nominalQuota - lendingLimit.\nIf null, it means that there is no lending limit, meaning that\nall the nominalQuota can be borrowed by other clusterQueues in the cohort.\nIf not null, it must be non-negative.\nlendingLimit must be null if spec.cohort is empty.\nThis field is in beta stage and is enabled by default." + pattern: "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$" + x-kubernetes-int-or-string: true + name: + description: "name of this resource." + type: "string" + nominalQuota: + anyOf: + - type: "integer" + - type: "string" + description: "nominalQuota is the quantity of this resource that is available for\nWorkloads admitted by this ClusterQueue at a point in time.\nThe nominalQuota must be non-negative.\nnominalQuota should represent the resources in the cluster available for\nrunning jobs (after discounting resources consumed by system components\nand pods not managed by kueue). In an autoscaled cluster, nominalQuota\nshould account for resources that can be provided by a component such as\nKubernetes cluster-autoscaler.\n\nIf the ClusterQueue belongs to a cohort, the sum of the quotas for each\n(flavor, resource) combination defines the maximum quantity that can be\nallocated by a ClusterQueue in the cohort." + pattern: "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$" + x-kubernetes-int-or-string: true + required: + - "name" + - "nominalQuota" + type: "object" + maxItems: 16 + minItems: 1 + type: "array" + x-kubernetes-list-map-keys: + - "name" + x-kubernetes-list-type: "map" + required: + - "name" + - "resources" + type: "object" + maxItems: 16 + minItems: 1 + type: "array" + x-kubernetes-list-map-keys: + - "name" + x-kubernetes-list-type: "map" + required: + - "coveredResources" + - "flavors" + type: "object" + x-kubernetes-validations: + - message: "flavors must have the same number of resources as the coveredResources" + rule: "self.flavors.all(x, size(x.resources) == size(self.coveredResources))" + maxItems: 16 + type: "array" + x-kubernetes-list-type: "atomic" + type: "object" + status: + description: "CohortStatus defines the observed state of Cohort" + properties: + conditions: + items: + description: "Condition contains details for one aspect of the current state of this API Resource." + properties: + lastTransitionTime: + description: "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis 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: + description: "message is a human readable message indicating details about the transition.\nThis may be an empty string." + maxLength: 32768 + type: "string" + observedGeneration: + description: "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance." + format: "int64" + minimum: 0.0 + type: "integer" + reason: + description: "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty." + maxLength: 1024 + minLength: 1 + pattern: "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$" + 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" + - "message" + - "reason" + - "status" + - "type" + type: "object" + type: "array" + x-kubernetes-list-map-keys: + - "type" + x-kubernetes-list-type: "map" + type: "object" + type: "object" + served: true + storage: true + subresources: + status: {} diff --git a/crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1alpha1/multikueueclusters.yaml b/crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1alpha1/multikueueclusters.yaml new file mode 100644 index 000000000..95643192e --- /dev/null +++ b/crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1alpha1/multikueueclusters.yaml @@ -0,0 +1,104 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.16.3" + name: "multikueueclusters.kueue.x-k8s.io" +spec: + group: "kueue.x-k8s.io" + names: + kind: "MultiKueueCluster" + listKind: "MultiKueueClusterList" + plural: "multikueueclusters" + singular: "multikueuecluster" + scope: "Cluster" + versions: + - name: "v1alpha1" + schema: + openAPIV3Schema: + description: "MultiKueueCluster is the Schema for the multikueue API" + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore 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.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + properties: + kubeConfig: + description: "Information how to connect to the cluster." + properties: + location: + description: "Location of the KubeConfig.\n\nIf LocationType is Secret then Location is the name of the secret inside the namespace in\nwhich the kueue controller manager is running. The config should be stored in the \"kubeconfig\" key." + type: "string" + locationType: + default: "Secret" + description: "Type of the KubeConfig location." + enum: + - "Secret" + - "Path" + type: "string" + required: + - "location" + - "locationType" + type: "object" + required: + - "kubeConfig" + type: "object" + status: + properties: + conditions: + items: + description: "Condition contains details for one aspect of the current state of this API Resource." + properties: + lastTransitionTime: + description: "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis 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: + description: "message is a human readable message indicating details about the transition.\nThis may be an empty string." + maxLength: 32768 + type: "string" + observedGeneration: + description: "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance." + format: "int64" + minimum: 0.0 + type: "integer" + reason: + description: "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty." + maxLength: 1024 + minLength: 1 + pattern: "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$" + 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" + - "message" + - "reason" + - "status" + - "type" + type: "object" + type: "array" + x-kubernetes-list-map-keys: + - "type" + x-kubernetes-list-type: "map" + type: "object" + type: "object" + served: true + storage: true + subresources: + status: {} diff --git a/crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1alpha1/multikueueconfigs.yaml b/crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1alpha1/multikueueconfigs.yaml new file mode 100644 index 000000000..ee8d68ba8 --- /dev/null +++ b/crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1alpha1/multikueueconfigs.yaml @@ -0,0 +1,45 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.16.3" + name: "multikueueconfigs.kueue.x-k8s.io" +spec: + group: "kueue.x-k8s.io" + names: + kind: "MultiKueueConfig" + listKind: "MultiKueueConfigList" + plural: "multikueueconfigs" + singular: "multikueueconfig" + scope: "Cluster" + versions: + - name: "v1alpha1" + schema: + openAPIV3Schema: + description: "MultiKueueConfig is the Schema for the multikueue API" + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore 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.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + description: "MultiKueueConfigSpec defines the desired state of MultiKueueConfig" + properties: + clusters: + description: "List of MultiKueueClusters names where the workloads from the ClusterQueue should be distributed." + items: + type: "string" + maxItems: 10 + minItems: 1 + type: "array" + x-kubernetes-list-type: "set" + required: + - "clusters" + type: "object" + type: "object" + served: true + storage: true diff --git a/crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1beta1/clusterqueues.yaml b/crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1beta1/clusterqueues.yaml index 30998eea9..a2fea9ecf 100644 --- a/crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1beta1/clusterqueues.yaml +++ b/crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1beta1/clusterqueues.yaml @@ -449,7 +449,7 @@ spec: format: "int32" type: "integer" pendingWorkloadsStatus: - description: "PendingWorkloadsStatus contains the information exposed about the current\nstatus of the pending workloads in the cluster queue." + description: "PendingWorkloadsStatus contains the information exposed about the current\nstatus of the pending workloads in the cluster queue.\nDeprecated: This field will be removed on v1beta2, use VisibilityOnDemand\n(https://kueue.sigs.k8s.io/docs/tasks/manage/monitor_pending_workloads/pending_workloads_on_demand/)\ninstead." properties: clusterQueuePendingWorkload: description: "Head contains the list of top pending workloads." diff --git a/crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1beta1/provisioningrequestconfigs.yaml b/crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1beta1/provisioningrequestconfigs.yaml new file mode 100644 index 000000000..e96bd518c --- /dev/null +++ b/crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1beta1/provisioningrequestconfigs.yaml @@ -0,0 +1,58 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.16.3" + name: "provisioningrequestconfigs.kueue.x-k8s.io" +spec: + group: "kueue.x-k8s.io" + names: + kind: "ProvisioningRequestConfig" + listKind: "ProvisioningRequestConfigList" + plural: "provisioningrequestconfigs" + singular: "provisioningrequestconfig" + scope: "Cluster" + versions: + - name: "v1beta1" + schema: + openAPIV3Schema: + description: "ProvisioningRequestConfig is the Schema for the provisioningrequestconfig API" + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore 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.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + description: "ProvisioningRequestConfigSpec defines the desired state of ProvisioningRequestConfig" + properties: + managedResources: + description: "managedResources contains the list of resources managed by the autoscaling.\n\nIf empty, all resources are considered managed.\n\nIf not empty, the ProvisioningRequest will contain only the podsets that are\nrequesting at least one of them.\n\nIf none of the workloads podsets is requesting at least a managed resource,\nthe workload is considered ready." + items: + description: "ResourceName is the name identifying various resources in a ResourceList." + type: "string" + maxItems: 100 + type: "array" + x-kubernetes-list-type: "set" + parameters: + additionalProperties: + description: "Parameter is limited to 255 characters." + maxLength: 255 + type: "string" + description: "Parameters contains all other parameters classes may require." + maxProperties: 100 + type: "object" + provisioningClassName: + description: "ProvisioningClassName describes the different modes of provisioning the resources.\nCheck autoscaling.x-k8s.io ProvisioningRequestSpec.ProvisioningClassName for details." + maxLength: 253 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + required: + - "provisioningClassName" + type: "object" + type: "object" + served: true + storage: true diff --git a/crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1beta1/workloadpriorityclasses.yaml b/crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1beta1/workloadpriorityclasses.yaml new file mode 100644 index 000000000..b4d5beb36 --- /dev/null +++ b/crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1beta1/workloadpriorityclasses.yaml @@ -0,0 +1,46 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.16.3" + name: "workloadpriorityclasses.kueue.x-k8s.io" +spec: + group: "kueue.x-k8s.io" + names: + kind: "WorkloadPriorityClass" + listKind: "WorkloadPriorityClassList" + plural: "workloadpriorityclasses" + singular: "workloadpriorityclass" + scope: "Cluster" + versions: + - additionalPrinterColumns: + - description: "Value of workloadPriorityClass's Priority" + jsonPath: ".value" + name: "Value" + type: "integer" + name: "v1beta1" + schema: + openAPIV3Schema: + description: "WorkloadPriorityClass is the Schema for the workloadPriorityClass API" + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + description: + description: "description is an arbitrary string that usually provides guidelines on\nwhen this workloadPriorityClass should be used." + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + value: + description: "value represents the integer value of this workloadPriorityClass. This is the actual priority that workloads\nreceive when jobs have the name of this class in their workloadPriorityClass label.\nChanging the value of workloadPriorityClass doesn't affect the priority of workloads that were already created." + format: "int32" + type: "integer" + required: + - "value" + type: "object" + served: true + storage: true + subresources: {} diff --git a/kube-custom-resources-rs/src/kueue_x_k8s_io/mod.rs b/kube-custom-resources-rs/src/kueue_x_k8s_io/mod.rs index 9f64fc82d..87218411e 100644 --- a/kube-custom-resources-rs/src/kueue_x_k8s_io/mod.rs +++ b/kube-custom-resources-rs/src/kueue_x_k8s_io/mod.rs @@ -1 +1,2 @@ +pub mod v1alpha1; pub mod v1beta1; diff --git a/kube-custom-resources-rs/src/kueue_x_k8s_io/v1alpha1/cohorts.rs b/kube-custom-resources-rs/src/kueue_x_k8s_io/v1alpha1/cohorts.rs new file mode 100644 index 000000000..65f71d071 --- /dev/null +++ b/kube-custom-resources-rs/src/kueue_x_k8s_io/v1alpha1/cohorts.rs @@ -0,0 +1,131 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1alpha1/cohorts.yaml --derive=Default --derive=PartialEq --smart-derive-elision +// kopium version: 0.21.1 + +#[allow(unused_imports)] +mod prelude { + pub use kube::CustomResource; + pub use serde::{Serialize, Deserialize}; + pub use k8s_openapi::apimachinery::pkg::util::intstr::IntOrString; + pub use k8s_openapi::apimachinery::pkg::apis::meta::v1::Condition; +} +use self::prelude::*; + +/// CohortSpec defines the desired state of Cohort +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "kueue.x-k8s.io", version = "v1alpha1", kind = "Cohort", plural = "cohorts")] +#[kube(status = "CohortStatus")] +#[kube(schema = "disabled")] +#[kube(derive="Default")] +#[kube(derive="PartialEq")] +pub struct CohortSpec { + /// Parent references the name of the Cohort's parent, if + /// any. It satisfies one of three cases: + /// 1) Unset. This Cohort is the root of its Cohort tree. + /// 2) References a non-existent Cohort. We use default Cohort (no borrowing/lending limits). + /// 3) References an existent Cohort. + /// + /// If a cycle is created, we disable all members of the + /// Cohort, including ClusterQueues, until the cycle is + /// removed. We prevent further admission while the cycle + /// exists. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub parent: Option, + /// ResourceGroups describes groupings of Resources and + /// Flavors. Each ResourceGroup defines a list of Resources + /// and a list of Flavors which provide quotas for these + /// Resources. Each Resource and each Flavor may only form part + /// of one ResourceGroup. There may be up to 16 ResourceGroups + /// within a Cohort. + /// + /// BorrowingLimit limits how much members of this Cohort + /// subtree can borrow from the parent subtree. + /// + /// LendingLimit limits how much members of this Cohort subtree + /// can lend to the parent subtree. + /// + /// Borrowing and Lending limits must only be set when the + /// Cohort has a parent. Otherwise, the Cohort create/update + /// will be rejected by the webhook. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "resourceGroups")] + pub resource_groups: Option>, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct CohortResourceGroups { + /// coveredResources is the list of resources covered by the flavors in this + /// group. + /// Examples: cpu, memory, vendor.com/gpu. + /// The list cannot be empty and it can contain up to 16 resources. + #[serde(rename = "coveredResources")] + pub covered_resources: Vec, + /// flavors is the list of flavors that provide the resources of this group. + /// Typically, different flavors represent different hardware models + /// (e.g., gpu models, cpu architectures) or pricing models (on-demand vs spot + /// cpus). + /// Each flavor MUST list all the resources listed for this group in the same + /// order as the .resources field. + /// The list cannot be empty and it can contain up to 16 flavors. + pub flavors: Vec, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct CohortResourceGroupsFlavors { + /// name of this flavor. The name should match the .metadata.name of a + /// ResourceFlavor. If a matching ResourceFlavor does not exist, the + /// ClusterQueue will have an Active condition set to False. + pub name: String, + /// resources is the list of quotas for this flavor per resource. + /// There could be up to 16 resources. + pub resources: Vec, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct CohortResourceGroupsFlavorsResources { + /// borrowingLimit is the maximum amount of quota for the [flavor, resource] + /// combination that this ClusterQueue is allowed to borrow from the unused + /// quota of other ClusterQueues in the same cohort. + /// In total, at a given time, Workloads in a ClusterQueue can consume a + /// quantity of quota equal to nominalQuota+borrowingLimit, assuming the other + /// ClusterQueues in the cohort have enough unused quota. + /// If null, it means that there is no borrowing limit. + /// If not null, it must be non-negative. + /// borrowingLimit must be null if spec.cohort is empty. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "borrowingLimit")] + pub borrowing_limit: Option, + /// lendingLimit is the maximum amount of unused quota for the [flavor, resource] + /// combination that this ClusterQueue can lend to other ClusterQueues in the same cohort. + /// In total, at a given time, ClusterQueue reserves for its exclusive use + /// a quantity of quota equals to nominalQuota - lendingLimit. + /// If null, it means that there is no lending limit, meaning that + /// all the nominalQuota can be borrowed by other clusterQueues in the cohort. + /// If not null, it must be non-negative. + /// lendingLimit must be null if spec.cohort is empty. + /// This field is in beta stage and is enabled by default. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "lendingLimit")] + pub lending_limit: Option, + /// name of this resource. + pub name: String, + /// nominalQuota is the quantity of this resource that is available for + /// Workloads admitted by this ClusterQueue at a point in time. + /// The nominalQuota must be non-negative. + /// nominalQuota should represent the resources in the cluster available for + /// running jobs (after discounting resources consumed by system components + /// and pods not managed by kueue). In an autoscaled cluster, nominalQuota + /// should account for resources that can be provided by a component such as + /// Kubernetes cluster-autoscaler. + /// + /// If the ClusterQueue belongs to a cohort, the sum of the quotas for each + /// (flavor, resource) combination defines the maximum quantity that can be + /// allocated by a ClusterQueue in the cohort. + #[serde(rename = "nominalQuota")] + pub nominal_quota: IntOrString, +} + +/// CohortStatus defines the observed state of Cohort +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct CohortStatus { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub conditions: Option>, +} + diff --git a/kube-custom-resources-rs/src/kueue_x_k8s_io/v1alpha1/mod.rs b/kube-custom-resources-rs/src/kueue_x_k8s_io/v1alpha1/mod.rs new file mode 100644 index 000000000..3740c564f --- /dev/null +++ b/kube-custom-resources-rs/src/kueue_x_k8s_io/v1alpha1/mod.rs @@ -0,0 +1,3 @@ +pub mod cohorts; +pub mod multikueueclusters; +pub mod multikueueconfigs; diff --git a/kube-custom-resources-rs/src/kueue_x_k8s_io/v1alpha1/multikueueclusters.rs b/kube-custom-resources-rs/src/kueue_x_k8s_io/v1alpha1/multikueueclusters.rs new file mode 100644 index 000000000..e1fd928e2 --- /dev/null +++ b/kube-custom-resources-rs/src/kueue_x_k8s_io/v1alpha1/multikueueclusters.rs @@ -0,0 +1,49 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1alpha1/multikueueclusters.yaml --derive=Default --derive=PartialEq --smart-derive-elision +// kopium version: 0.21.1 + +#[allow(unused_imports)] +mod prelude { + pub use kube::CustomResource; + pub use serde::{Serialize, Deserialize}; + pub use k8s_openapi::apimachinery::pkg::apis::meta::v1::Condition; +} +use self::prelude::*; + +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, PartialEq)] +#[kube(group = "kueue.x-k8s.io", version = "v1alpha1", kind = "MultiKueueCluster", plural = "multikueueclusters")] +#[kube(status = "MultiKueueClusterStatus")] +#[kube(schema = "disabled")] +#[kube(derive="PartialEq")] +pub struct MultiKueueClusterSpec { + /// Information how to connect to the cluster. + #[serde(rename = "kubeConfig")] + pub kube_config: MultiKueueClusterKubeConfig, +} + +/// Information how to connect to the cluster. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct MultiKueueClusterKubeConfig { + /// Location of the KubeConfig. + /// + /// If LocationType is Secret then Location is the name of the secret inside the namespace in + /// which the kueue controller manager is running. The config should be stored in the "kubeconfig" key. + pub location: String, + /// Type of the KubeConfig location. + #[serde(rename = "locationType")] + pub location_type: MultiKueueClusterKubeConfigLocationType, +} + +/// Information how to connect to the cluster. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum MultiKueueClusterKubeConfigLocationType { + Secret, + Path, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct MultiKueueClusterStatus { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub conditions: Option>, +} + diff --git a/kube-custom-resources-rs/src/kueue_x_k8s_io/v1alpha1/multikueueconfigs.rs b/kube-custom-resources-rs/src/kueue_x_k8s_io/v1alpha1/multikueueconfigs.rs new file mode 100644 index 000000000..812000f8a --- /dev/null +++ b/kube-custom-resources-rs/src/kueue_x_k8s_io/v1alpha1/multikueueconfigs.rs @@ -0,0 +1,22 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1alpha1/multikueueconfigs.yaml --derive=Default --derive=PartialEq --smart-derive-elision +// kopium version: 0.21.1 + +#[allow(unused_imports)] +mod prelude { + pub use kube::CustomResource; + pub use serde::{Serialize, Deserialize}; +} +use self::prelude::*; + +/// MultiKueueConfigSpec defines the desired state of MultiKueueConfig +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "kueue.x-k8s.io", version = "v1alpha1", kind = "MultiKueueConfig", plural = "multikueueconfigs")] +#[kube(schema = "disabled")] +#[kube(derive="Default")] +#[kube(derive="PartialEq")] +pub struct MultiKueueConfigSpec { + /// List of MultiKueueClusters names where the workloads from the ClusterQueue should be distributed. + pub clusters: Vec, +} + diff --git a/kube-custom-resources-rs/src/kueue_x_k8s_io/v1beta1/clusterqueues.rs b/kube-custom-resources-rs/src/kueue_x_k8s_io/v1beta1/clusterqueues.rs index 706317df9..67f77201b 100644 --- a/kube-custom-resources-rs/src/kueue_x_k8s_io/v1beta1/clusterqueues.rs +++ b/kube-custom-resources-rs/src/kueue_x_k8s_io/v1beta1/clusterqueues.rs @@ -455,6 +455,9 @@ pub struct ClusterQueueStatus { pub pending_workloads: Option, /// PendingWorkloadsStatus contains the information exposed about the current /// status of the pending workloads in the cluster queue. + /// Deprecated: This field will be removed on v1beta2, use VisibilityOnDemand + /// (https://kueue.sigs.k8s.io/docs/tasks/manage/monitor_pending_workloads/pending_workloads_on_demand/) + /// instead. #[serde(default, skip_serializing_if = "Option::is_none", rename = "pendingWorkloadsStatus")] pub pending_workloads_status: Option, /// reservingWorkloads is the number of workloads currently reserving quota in this @@ -522,6 +525,9 @@ pub struct ClusterQueueStatusFlavorsUsageResources { /// PendingWorkloadsStatus contains the information exposed about the current /// status of the pending workloads in the cluster queue. +/// Deprecated: This field will be removed on v1beta2, use VisibilityOnDemand +/// (https://kueue.sigs.k8s.io/docs/tasks/manage/monitor_pending_workloads/pending_workloads_on_demand/) +/// instead. #[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] pub struct ClusterQueueStatusPendingWorkloadsStatus { /// Head contains the list of top pending workloads. diff --git a/kube-custom-resources-rs/src/kueue_x_k8s_io/v1beta1/mod.rs b/kube-custom-resources-rs/src/kueue_x_k8s_io/v1beta1/mod.rs index 58407129e..6c8578189 100644 --- a/kube-custom-resources-rs/src/kueue_x_k8s_io/v1beta1/mod.rs +++ b/kube-custom-resources-rs/src/kueue_x_k8s_io/v1beta1/mod.rs @@ -1,5 +1,7 @@ pub mod admissionchecks; pub mod clusterqueues; pub mod localqueues; +pub mod provisioningrequestconfigs; pub mod resourceflavors; +pub mod workloadpriorityclasses; pub mod workloads; diff --git a/kube-custom-resources-rs/src/kueue_x_k8s_io/v1beta1/provisioningrequestconfigs.rs b/kube-custom-resources-rs/src/kueue_x_k8s_io/v1beta1/provisioningrequestconfigs.rs new file mode 100644 index 000000000..baa82d1e0 --- /dev/null +++ b/kube-custom-resources-rs/src/kueue_x_k8s_io/v1beta1/provisioningrequestconfigs.rs @@ -0,0 +1,39 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1beta1/provisioningrequestconfigs.yaml --derive=Default --derive=PartialEq --smart-derive-elision +// kopium version: 0.21.1 + +#[allow(unused_imports)] +mod prelude { + pub use kube::CustomResource; + pub use serde::{Serialize, Deserialize}; + pub use std::collections::BTreeMap; +} +use self::prelude::*; + +/// ProvisioningRequestConfigSpec defines the desired state of ProvisioningRequestConfig +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "kueue.x-k8s.io", version = "v1beta1", kind = "ProvisioningRequestConfig", plural = "provisioningrequestconfigs")] +#[kube(schema = "disabled")] +#[kube(derive="Default")] +#[kube(derive="PartialEq")] +pub struct ProvisioningRequestConfigSpec { + /// managedResources contains the list of resources managed by the autoscaling. + /// + /// If empty, all resources are considered managed. + /// + /// If not empty, the ProvisioningRequest will contain only the podsets that are + /// requesting at least one of them. + /// + /// If none of the workloads podsets is requesting at least a managed resource, + /// the workload is considered ready. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "managedResources")] + pub managed_resources: Option>, + /// Parameters contains all other parameters classes may require. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub parameters: Option>, + /// ProvisioningClassName describes the different modes of provisioning the resources. + /// Check autoscaling.x-k8s.io ProvisioningRequestSpec.ProvisioningClassName for details. + #[serde(rename = "provisioningClassName")] + pub provisioning_class_name: String, +} + diff --git a/kube-custom-resources-rs/src/kueue_x_k8s_io/v1beta1/workloadpriorityclasses.rs b/kube-custom-resources-rs/src/kueue_x_k8s_io/v1beta1/workloadpriorityclasses.rs new file mode 100644 index 000000000..dc73c8bef --- /dev/null +++ b/kube-custom-resources-rs/src/kueue_x_k8s_io/v1beta1/workloadpriorityclasses.rs @@ -0,0 +1,10 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/kubernetes-sigs/kueue/kueue.x-k8s.io/v1beta1/workloadpriorityclasses.yaml --derive=Default --derive=PartialEq --smart-derive-elision +// kopium version: 0.21.1 + +#[allow(unused_imports)] +mod prelude { + pub use kube::CustomResource; + pub use serde::{Serialize, Deserialize}; +} + diff --git a/kube-custom-resources-rs/src/lib.rs b/kube-custom-resources-rs/src/lib.rs index b8bd96255..0f998ad77 100644 --- a/kube-custom-resources-rs/src/lib.rs +++ b/kube-custom-resources-rs/src/lib.rs @@ -1836,11 +1836,18 @@ apiVersion `kubevious.io/v1alpha1`: ## kueue_x_k8s_io +apiVersion `kueue.x-k8s.io/v1alpha1`: +- `Cohort` +- `MultiKueueCluster` +- `MultiKueueConfig` + apiVersion `kueue.x-k8s.io/v1beta1`: - `AdmissionCheck` - `ClusterQueue` - `LocalQueue` +- `ProvisioningRequestConfig` - `ResourceFlavor` +- `WorkloadPriorityClass` - `Workload` ## kuma_io