Skip to content

Commit 513703f

Browse files
authored
use kustomize to deploy/configure Kueue instead of patching manifest (#190)
1 parent f2eee09 commit 513703f

File tree

5 files changed

+102
-50
lines changed

5 files changed

+102
-50
lines changed

hack/deploy-kueue.sh

+2-11
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,10 @@
1414

1515
# Installs a kueue release onto an existing cluster
1616

17-
KUEUE_VERSION=v0.7.0
18-
1917
export ROOT_DIR="$(dirname "$(dirname "$(readlink -fn "$0")")")"
2018

21-
echo "Downloading and patching Kueue ${KUEUE_VERSION} manifests"
22-
wget -q https://github.com/kubernetes-sigs/kueue/releases/download/${KUEUE_VERSION}/manifests.yaml -O $ROOT_DIR/hack/kueue-manifest.yaml
23-
patch -p 0 $ROOT_DIR/hack/kueue-manifest.yaml < $ROOT_DIR/hack/kueue-patches/01-manage-all-jobs.txt || exit 1
24-
patch -p 0 $ROOT_DIR/hack/kueue-manifest.yaml < $ROOT_DIR/hack/kueue-patches/02-aw-external-frameworks.txt || exit 1
25-
26-
echo "Deploying Kueue version $KUEUE_VERSION"
27-
kubectl apply --server-side -f $ROOT_DIR/hack/kueue-manifest.yaml
28-
29-
rm -f $ROOT_DIR/hack/kueue-manifest.yaml
19+
echo "Deploying Kueue"
20+
kubectl apply --server-side -k $ROOT_DIR/hack/kueue-config
3021

3122
# Sleep until the kueue manager is running
3223
echo "Waiting for pods in the kueue-system namespace to become ready"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
apiVersion: config.kueue.x-k8s.io/v1beta1
2+
kind: Configuration
3+
health:
4+
healthProbeBindAddress: :8081
5+
metrics:
6+
bindAddress: :8080
7+
# enableClusterQueueResources: true
8+
webhook:
9+
port: 9443
10+
leaderElection:
11+
leaderElect: true
12+
resourceName: c1f6bfd2.kueue.x-k8s.io
13+
controller:
14+
groupKindConcurrency:
15+
Job.batch: 5
16+
Pod: 5
17+
Workload.kueue.x-k8s.io: 5
18+
LocalQueue.kueue.x-k8s.io: 1
19+
ClusterQueue.kueue.x-k8s.io: 1
20+
ResourceFlavor.kueue.x-k8s.io: 1
21+
clientConnection:
22+
qps: 50
23+
burst: 100
24+
#pprofBindAddress: :8083
25+
#waitForPodsReady:
26+
# enable: false
27+
# timeout: 5m
28+
# blockAdmission: false
29+
# requeuingStrategy:
30+
# timestamp: Eviction
31+
# backoffLimitCount: null # null indicates infinite requeuing
32+
# backoffBaseSeconds: 60
33+
# backoffMaxSeconds: 3600
34+
manageJobsWithoutQueueName: true
35+
#internalCertManagement:
36+
# enable: false
37+
# webhookServiceName: ""
38+
# webhookSecretName: ""
39+
integrations:
40+
frameworks:
41+
- "batch/job"
42+
- "kubeflow.org/mpijob"
43+
- "ray.io/rayjob"
44+
- "ray.io/raycluster"
45+
- "jobset.x-k8s.io/jobset"
46+
- "kubeflow.org/mxjob"
47+
- "kubeflow.org/paddlejob"
48+
- "kubeflow.org/pytorchjob"
49+
- "kubeflow.org/tfjob"
50+
- "kubeflow.org/xgboostjob"
51+
# - "pod"
52+
externalFrameworks:
53+
- "AppWrapper.v1beta2.workload.codeflare.dev"
54+
# podOptions:
55+
# namespaceSelector:
56+
# matchExpressions:
57+
# - key: kubernetes.io/metadata.name
58+
# operator: NotIn
59+
# values: [ kube-system, kueue-system ]
60+
#fairSharing:
61+
# enable: true
62+
# preemptionStrategies: [LessThanOrEqualToFinalShare, LessThanInitialShare]
63+
#resources:
64+
# excludeResourcePrefixes: []

hack/kueue-config/kustomization.yaml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
namespace: kueue-system
5+
6+
resources:
7+
- "https://github.com/kubernetes-sigs/kueue/config/default?ref=v0.7.0"
8+
9+
configMapGenerator:
10+
- name: manager-config
11+
namespace: kueue-system
12+
behavior: replace
13+
files:
14+
- controller_manager_config.yaml
15+
16+
images:
17+
- name: gcr.io/k8s-staging-kueue/kueue
18+
newName: registry.k8s.io/kueue/kueue
19+
newTag: v0.7.0
20+
21+
patches:
22+
- target:
23+
kind: ClusterRole
24+
name: manager-role
25+
patch: |
26+
- op: add
27+
path: /rules/-
28+
value:
29+
apiGroups:
30+
- workload.codeflare.dev
31+
resources:
32+
- appwrappers
33+
verbs:
34+
- get
35+
- list
36+
- watch

hack/kueue-patches/01-manage-all-jobs.txt

-11
This file was deleted.

hack/kueue-patches/02-aw-external-frameworks.txt

-28
This file was deleted.

0 commit comments

Comments
 (0)