Skip to content

Commit

Permalink
Added system node pool toleration to Kueue
Browse files Browse the repository at this point in the history
  • Loading branch information
arueth committed Jan 14, 2025
1 parent 82561f2 commit 97c4c8f
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 deletions.
6 changes: 3 additions & 3 deletions platforms/gke/base/core/workloads/kueue/kueue.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ resource "null_resource" "kueue_manifests" {
command = <<EOT
mkdir -p ${self.triggers.manifests_dir}
wget https://github.com/kubernetes-sigs/kueue/releases/download/v${self.triggers.version}/manifests.yaml -O ${self.triggers.manifests_dir}/manifests.yaml
cp manifests/* ${self.triggers.manifests_dir}/
cp -r manifests/* ${self.triggers.manifests_dir}/
EOT
interpreter = ["bash", "-c"]
working_dir = path.module
Expand All @@ -44,7 +44,7 @@ resource "null_resource" "kueue_manifests_apply" {
]

provisioner "local-exec" {
command = "kubectl apply --server-side -f ${self.triggers.manifests_dir}/manifests.yaml"
command = "kubectl apply --server-side -k ${self.triggers.manifests_dir}/"
environment = {
KUBECONFIG = self.triggers.kubeconfig_file
}
Expand All @@ -53,7 +53,7 @@ resource "null_resource" "kueue_manifests_apply" {
}

provisioner "local-exec" {
command = "kubectl delete -f ${self.triggers.manifests_dir}/manifests.yaml; exit 0"
command = "kubectl delete -k ${self.triggers.manifests_dir}; exit 0"
environment = {
KUBECONFIG = self.triggers.kubeconfig_file
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

patches:
- path: patch/system-node-pool-tolerations.yaml
target:
kind: Deployment

resources:
- kueue-monitoring-gmp.yaml
- manifests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# kubectl patch deployment/kueue-controller-manager --namespace kueue-system --patch-file patch-system-node-pool-tolerations.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: not-applicable
spec:
template:
spec:
tolerations:
- effect: "NoSchedule"
key: "components.gke.io/gke-managed-components"
value: "true"

0 comments on commit 97c4c8f

Please sign in to comment.