Skip to content

Commit b63be46

Browse files
Migrating configure_kueue to helm
1 parent ab81e76 commit b63be46

File tree

6 files changed

+80
-10
lines changed

6 files changed

+80
-10
lines changed

.yamllint

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ yaml-files:
88
ignore:
99
- modules/management/kubectl-apply/manifests/*
1010
- examples/gke-a4x/nvidia-dra-driver.yaml
11+
- modules/management/kubectl-apply/raw-config-chart/templates/
1112

1213
rules:
1314
# Defaults

modules/management/kubectl-apply/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ limitations under the License.
203203

204204
| Name | Source | Version |
205205
|------|--------|---------|
206-
| <a name="module_configure_kueue"></a> [configure\_kueue](#module\_configure\_kueue) | ./kubectl | n/a |
206+
| <a name="module_configure_kueue"></a> [configure\_kueue](#module\_configure\_kueue) | ./helm_install | 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 |
209209
| <a name="module_install_jobset"></a> [install\_jobset](#module\_install\_jobset) | ./helm_install | n/a |

modules/management/kubectl-apply/main.tf

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,32 @@ module "install_kueue" {
103103
}
104104

105105
module "configure_kueue" {
106-
source = "./kubectl"
107-
source_path = local.install_kueue ? try(var.kueue.config_path, "") : null
108-
template_vars = local.install_kueue ? try(var.kueue.config_template_vars, null) : null
109-
depends_on = [module.install_kueue]
106+
source = "./helm_install"
107+
count = local.install_kueue ? (try(var.kueue.config_path, "") != "" ? 1 : 0) : 0
108+
release_name = "kueue-config"
109+
chart_name = "${path.module}/raw-config-chart"
110+
chart_version = "0.1.0"
111+
namespace = "kueue-system"
112+
create_namespace = true
113+
wait = false # Configuration resources (Queues) usually don't need wait
110114

111-
server_side_apply = true
112-
wait_for_rollout = true
115+
values_yaml = [
116+
yamlencode({
117+
manifests = [
118+
for doc in split("\n---", (
119+
try(var.kueue.config_path, "") != ""
120+
? (length(try(var.kueue.config_template_vars, {})) > 0 || length(regexall("\\.tftpl$", var.kueue.config_path)) > 0
121+
? templatefile(var.kueue.config_path, try(var.kueue.config_template_vars, {}))
122+
: file(var.kueue.config_path))
123+
: ""
124+
)) : trimspace(doc)
125+
if length(trimspace(doc)) > 0
126+
]
127+
})
128+
]
129+
130+
depends_on = [module.install_kueue]
113131

114-
providers = {
115-
kubectl = kubectl
116-
}
117132
}
118133

119134
module "install_jobset" {
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright 2026 "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+
apiVersion: v2
16+
name: raw-config-chart
17+
description: Generic chart to apply raw manifests
18+
type: application
19+
version: 0.1.0
20+
appVersion: "1.16.0"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2026 "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+
{{- range $index, $manifest := .Values.manifests }}
16+
---
17+
# Manifest {{ $index }}
18+
{{ $manifest }}
19+
{{- end }}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright 2026 "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+
manifests: []

0 commit comments

Comments
 (0)