Skip to content

Commit 9cd6551

Browse files
authored
Merge pull request GoogleCloudPlatform#4542 from shubpal07/shubham/kueue-on-helm
Migrate Kueue installation to use Helm chart
2 parents 1f28255 + e3c13f1 commit 9cd6551

9 files changed

Lines changed: 51 additions & 53691 deletions

File tree

modules/management/kubectl-apply/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ limitations under the License.
207207
| <a name="module_install_gib"></a> [install\_gib](#module\_install\_gib) | ./kubectl | n/a |
208208
| <a name="module_install_gpu_operator"></a> [install\_gpu\_operator](#module\_install\_gpu\_operator) | ./helm_install | n/a |
209209
| <a name="module_install_jobset"></a> [install\_jobset](#module\_install\_jobset) | ./kubectl | n/a |
210-
| <a name="module_install_kueue"></a> [install\_kueue](#module\_install\_kueue) | ./kubectl | n/a |
210+
| <a name="module_install_kueue"></a> [install\_kueue](#module\_install\_kueue) | ./helm_install | n/a |
211211
| <a name="module_install_nvidia_dra_driver"></a> [install\_nvidia\_dra\_driver](#module\_install\_nvidia\_dra\_driver) | ./helm_install | n/a |
212212
| <a name="module_kubectl_apply_manifests"></a> [kubectl\_apply\_manifests](#module\_kubectl\_apply\_manifests) | ./kubectl | n/a |
213213

@@ -233,7 +233,7 @@ limitations under the License.
233233
| <a name="input_gke_cluster_exists"></a> [gke\_cluster\_exists](#input\_gke\_cluster\_exists) | A static flag that signals to downstream modules that a cluster has been created. Needed by community/modules/scripts/kubernetes-operations. | `bool` | `false` | no |
234234
| <a name="input_gpu_operator"></a> [gpu\_operator](#input\_gpu\_operator) | Install [GPU Operator](https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/latest/getting-started.html) which uses the [Kubernetes operator](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/) to automate the management of all NVIDIA software components needed to provision GPU. | <pre>object({<br/> install = optional(bool, false)<br/> version = optional(string, "v25.3.0")<br/> })</pre> | `{}` | no |
235235
| <a name="input_jobset"></a> [jobset](#input\_jobset) | Install [Jobset](https://github.com/kubernetes-sigs/jobset) which manages a group of K8s [jobs](https://kubernetes.io/docs/concepts/workloads/controllers/job/) as a unit. | <pre>object({<br/> install = optional(bool, false)<br/> version = optional(string, "v0.7.2")<br/> })</pre> | `{}` | no |
236-
| <a name="input_kueue"></a> [kueue](#input\_kueue) | Install and configure [Kueue](https://kueue.sigs.k8s.io/docs/overview/) workload scheduler. A configuration yaml/template file can be provided with config\_path to be applied right after kueue installation. If a template file provided, its variables can be set to config\_template\_vars. | <pre>object({<br/> install = optional(bool, false)<br/> version = optional(string, "v0.12.2")<br/> config_path = optional(string, null)<br/> config_template_vars = optional(map(any), null)<br/> })</pre> | `{}` | no |
236+
| <a name="input_kueue"></a> [kueue](#input\_kueue) | Install and configure [Kueue](https://kueue.sigs.k8s.io/docs/overview/) workload scheduler. A configuration yaml/template file can be provided with config\_path to be applied right after kueue installation. If a template file provided, its variables can be set to config\_template\_vars. | <pre>object({<br/> install = optional(bool, false)<br/> version = optional(string, "0.13.3")<br/> config_path = optional(string, null)<br/> config_template_vars = optional(map(any), null)<br/> })</pre> | `{}` | no |
237237
| <a name="input_nvidia_dra_driver"></a> [nvidia\_dra\_driver](#input\_nvidia\_dra\_driver) | Installs [Nvidia DRA driver](https://github.com/NVIDIA/k8s-dra-driver-gpu) which supports Dynamic Resource Allocation for NVIDIA GPUs in Kubernetes | <pre>object({<br/> install = optional(bool, false)<br/> version = optional(string, "v25.3.0")<br/> })</pre> | `{}` | no |
238238
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | The project ID that hosts the gke cluster. | `string` | n/a | yes |
239239

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright 2025 "Google LLC"
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# For referencing the original Kueue helm chart values, pull the latest helm chart version
16+
# `helm pull oci://registry.k8s.io/kueue/charts/kueue --version=0.13.3` (latest helm chart version)
17+
18+
controllerManager:
19+
# -- Enables the Topology-Aware Scheduling feature gate.
20+
featureGates:
21+
- name: TopologyAwareScheduling
22+
enabled: true
23+
24+
# It ensures the Kueue pod can schedule on GKE clusters where the
25+
# system node pool uses the default "gke-managed-components" taint.
26+
tolerations:
27+
- key: "components.gke.io/gke-managed-components"
28+
operator: "Equal"
29+
value: "true"
30+
effect: "NoSchedule"

modules/management/kubectl-apply/main.tf

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ locals {
5353
install_gpu_operator = try(var.gpu_operator.install, false)
5454
install_nvidia_dra_driver = try(var.nvidia_dra_driver.install, false)
5555
install_gib = try(var.gib.install, false)
56-
kueue_install_source = format("${path.module}/manifests/kueue-%s.yaml", try(var.kueue.version, ""))
5756
jobset_install_source = format("${path.module}/manifests/jobset-%s.yaml", try(var.jobset.version, ""))
5857
}
5958

@@ -87,15 +86,21 @@ module "kubectl_apply_manifests" {
8786
}
8887

8988
module "install_kueue" {
90-
source = "./kubectl"
91-
source_path = local.install_kueue ? local.kueue_install_source : null
92-
server_side_apply = true
93-
wait_for_rollout = true
94-
depends_on = [var.gke_cluster_exists]
89+
source = "./helm_install"
90+
count = local.install_kueue ? 1 : 0
91+
wait = false
92+
timeout = 1200
93+
release_name = "kueue"
94+
chart_repository = "oci://registry.k8s.io/kueue/charts"
95+
chart_name = "kueue"
96+
chart_version = var.kueue.version
97+
namespace = "kueue-system"
98+
create_namespace = true
99+
values_yaml = [
100+
file("${path.module}/kueue/kueue-helm-values.yaml")
101+
]
95102

96-
providers = {
97-
kubectl = kubectl
98-
}
103+
depends_on = [var.gke_cluster_exists]
99104
}
100105

101106
module "configure_kueue" {

0 commit comments

Comments
 (0)