Skip to content

Commit 765c491

Browse files
authored
Merge pull request GoogleCloudPlatform#4765 from shubpal07/shubham/jobset-on-helm
Migration of jobset from static manifests to helm chart and upgrading version to 0.10.1
2 parents b66980a + bc904b8 commit 765c491

8 files changed

Lines changed: 57 additions & 26367 deletions

File tree

community/examples/xpk-n2-filestore/xpk-n2-filestore.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ vars:
3232
slice_cpu_count: 64
3333
xpk_version: v0.8.0
3434
kueue_version: v0.11.1
35-
jobset_version: v0.7.2
35+
jobset_version: 0.10.1
3636
kjob_version: f775609365df47bdc3e7c10290d8efae7f512464
3737

3838
deployment_groups:

modules/management/kubectl-apply/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ limitations under the License.
206206
| <a name="module_configure_kueue"></a> [configure\_kueue](#module\_configure\_kueue) | ./kubectl | n/a |
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 |
209-
| <a name="module_install_jobset"></a> [install\_jobset](#module\_install\_jobset) | ./kubectl | n/a |
209+
| <a name="module_install_jobset"></a> [install\_jobset](#module\_install\_jobset) | ./helm_install | n/a |
210210
| <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 |
@@ -232,7 +232,7 @@ limitations under the License.
232232
| <a name="input_gib"></a> [gib](#input\_gib) | Install the NCCL gIB plugin | <pre>object({<br/> install = bool<br/> path = string<br/> template_vars = object({<br/> image = optional(string, "us-docker.pkg.dev/gce-ai-infra/gpudirect-gib/nccl-plugin-gib")<br/> version = string<br/> node_affinity = optional(any, {<br/> requiredDuringSchedulingIgnoredDuringExecution = {<br/> nodeSelectorTerms = [{<br/> matchExpressions = [{<br/> key = "cloud.google.com/gke-gpu",<br/> operator = "In",<br/> values = ["true"]<br/> }]<br/> }]<br/> }<br/> })<br/> accelerator_count = number<br/> })<br/> })</pre> | <pre>{<br/> "install": false,<br/> "path": "",<br/> "template_vars": {<br/> "accelerator_count": 0,<br/> "version": ""<br/> }<br/>}</pre> | no |
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 |
235-
| <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 |
235+
| <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, "0.10.1")<br/> })</pre> | `{}` | no |
236236
| <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 |
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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 jobset helm chart values, pull the latest jobset chart version
16+
# `helm pull oci://registry.k8s.io/jobset/charts/jobset --version=0.10.1` (latest helm chart version)
17+
18+
controller:
19+
# It ensures the Jobset pod(s) can be scheduled on GKE clusters where the
20+
# system node pool uses the default "gke-managed-components" taint.
21+
tolerations:
22+
- key: "components.gke.io/gke-managed-components"
23+
operator: "Equal"
24+
value: "true"
25+
effect: "NoSchedule"

modules/management/kubectl-apply/main.tf

Lines changed: 23 additions & 19 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-
jobset_install_source = format("${path.module}/manifests/jobset-%s.yaml", try(var.jobset.version, ""))
5756
}
5857

5958
data "http" "manifest_from_url" {
@@ -118,15 +117,20 @@ module "configure_kueue" {
118117
}
119118

120119
module "install_jobset" {
121-
source = "./kubectl"
122-
source_path = local.install_jobset ? local.jobset_install_source : null
123-
server_side_apply = true
124-
wait_for_rollout = true
125-
depends_on = [var.gke_cluster_exists, module.configure_kueue]
126-
127-
providers = {
128-
kubectl = kubectl
129-
}
120+
source = "./helm_install"
121+
count = local.install_jobset ? 1 : 0
122+
wait = false
123+
timeout = 1200
124+
release_name = "jobset"
125+
chart_repository = "oci://registry.k8s.io/jobset/charts"
126+
chart_name = "jobset"
127+
chart_version = var.jobset.version
128+
namespace = "jobset-system"
129+
create_namespace = true
130+
values_yaml = [
131+
file("${path.module}/jobset/jobset-helm-values.yaml")
132+
]
133+
depends_on = [var.gke_cluster_exists, module.configure_kueue]
130134
}
131135

132136
module "install_nvidia_dra_driver" {
@@ -178,9 +182,9 @@ module "install_nvidia_dra_driver" {
178182
operator: Equal
179183
value: present
180184
effect: NoSchedule
181-
- key: kubernetes.io/arch
182-
operator: Equal
183-
value: arm64
185+
- key: kubernetes.io/arch
186+
operator: Equal
187+
value: arm64
184188
effect: NoSchedule
185189
186190
EOF
@@ -223,17 +227,17 @@ module "install_gpu_operator" {
223227
operator: Equal
224228
value: present
225229
effect: NoSchedule
226-
- key: kubernetes.io/arch
227-
operator: Equal
228-
value: arm64
230+
- key: kubernetes.io/arch
231+
operator: Equal
232+
value: arm64
229233
effect: NoSchedule
230234
231235
node-feature-discovery:
232236
worker:
233237
tolerations:
234-
- key: kubernetes.io/arch
235-
operator: Equal
236-
value: arm64
238+
- key: kubernetes.io/arch
239+
operator: Equal
240+
value: arm64
237241
effect: NoSchedule
238242
- key: "node-role.kubernetes.io/master"
239243
operator: "Equal"

0 commit comments

Comments
 (0)