forked from project-codeflare/mlbatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmlbatch-subscription.yaml
286 lines (286 loc) · 7.88 KB
/
mlbatch-subscription.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
apiVersion: v1
kind: Namespace
metadata:
name: redhat-ods-operator
---
apiVersion: v1
kind: Namespace
metadata:
name: redhat-ods-applications
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: rhods-operator
namespace: redhat-ods-operator
---
apiVersion: v1
kind: ConfigMap
metadata:
name: mlbatch-codeflare
namespace: redhat-ods-operator
data:
manager.yaml: |
apiVersion: apps/v1
kind: Deployment
metadata:
name: manager
namespace: system
spec:
selector:
matchLabels:
app.kubernetes.io/name: codeflare-operator
app.kubernetes.io/part-of: codeflare
replicas: 1
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
labels:
app.kubernetes.io/name: codeflare-operator
app.kubernetes.io/part-of: codeflare
spec:
priorityClassName: system-node-critical
securityContext:
runAsNonRoot: true
# TODO(user): For common cases that do not require escalating privileges
# it is recommended to ensure that all your Pods/Containers are restrictive.
# More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted
# Please uncomment the following code if your project does NOT have to work on old Kubernetes
# versions < 1.20 or on vendors versions which do NOT support this field by default (i.e. Openshift < 4.11 ).
# seccompProfile:
# type: RuntimeDefault
containers:
- command:
- /manager
image: $(codeflare_operator_controller_image)
imagePullPolicy: Always
name: manager
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- "ALL"
env:
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
ports:
- containerPort: 8080
protocol: TCP
name: metrics
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
resources:
limits:
cpu: "1"
memory: 1Gi
requests:
cpu: "1"
memory: 1Gi
serviceAccountName: controller-manager
terminationGracePeriodSeconds: 10
---
apiVersion: v1
kind: ConfigMap
metadata:
name: codeflare-operator-config
namespace: redhat-ods-applications
data:
config.yaml: |
appwrapper:
Config:
manageJobsWithoutQueueName: true
userRBACAdmissionCheck: false
schedulerName: scheduler-plugins-scheduler
queueName: default-queue
enabled: true
---
apiVersion: v1
kind: ConfigMap
metadata:
name: mlbatch-kuberay
namespace: redhat-ods-operator
data:
kuberay-operator-image-patch.yaml: |
apiVersion: apps/v1
kind: Deployment
metadata:
name: kuberay-operator
spec:
template:
spec:
priorityClassName: system-node-critical
containers:
- name: kuberay-operator
image: $(image)
---
apiVersion: v1
kind: ConfigMap
metadata:
name: mlbatch-kueue
namespace: redhat-ods-operator
data:
controller_manager_config.yaml: |
apiVersion: config.kueue.x-k8s.io/v1beta1
kind: Configuration
health:
healthProbeBindAddress: :8081
metrics:
bindAddress: :8080
# enableClusterQueueResources: true
webhook:
port: 9443
leaderElection:
leaderElect: true
resourceName: c1f6bfd2.kueue.x-k8s.io
controller:
groupKindConcurrency:
Job.batch: 5
Pod: 5
Workload.kueue.x-k8s.io: 5
LocalQueue.kueue.x-k8s.io: 1
ClusterQueue.kueue.x-k8s.io: 1
ResourceFlavor.kueue.x-k8s.io: 1
clientConnection:
qps: 50
burst: 100
#pprofBindAddress: :8082
waitForPodsReady:
enable: false
blockAdmission: false
manageJobsWithoutQueueName: true
#internalCertManagement:
# enable: false
# webhookServiceName: ""
# webhookSecretName: ""
integrations:
frameworks:
# - "batch/job"
- "kubeflow.org/mpijob"
- "ray.io/rayjob"
- "ray.io/raycluster"
- "jobset.x-k8s.io/jobset"
- "kubeflow.org/mxjob"
- "kubeflow.org/paddlejob"
- "kubeflow.org/pytorchjob"
- "kubeflow.org/tfjob"
- "kubeflow.org/xgboostjob"
# - "pod"
externalFrameworks:
- "AppWrapper.v1beta2.workload.codeflare.dev"
# podOptions:
# namespaceSelector:
# matchExpressions:
# - key: kubernetes.io/metadata.name
# operator: NotIn
# values: [ kube-system, kueue-system ]
manager_config_patch.yaml: |
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
namespace: system
spec:
template:
spec:
priorityClassName: system-node-critical
containers:
- name: manager
image: $(image)
args:
- "--config=/controller_manager_config.yaml"
- "--zap-log-level=2"
volumeMounts:
- name: manager-config
mountPath: /controller_manager_config.yaml
subPath: controller_manager_config.yaml
volumes:
- name: manager-config
configMap:
name: manager-config
---
apiVersion: v1
kind: ConfigMap
metadata:
name: mlbatch-training-operator
namespace: redhat-ods-operator
data:
manager_config_patch.yaml: |
apiVersion: apps/v1
kind: Deployment
metadata:
name: training-operator
spec:
template:
spec:
priorityClassName: system-node-critical
containers:
- name: training-operator
image: $(image)
args:
- "--zap-log-level=2"
- "--gang-scheduler-name=scheduler-plugins-scheduler"
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 500m
memory: 1000Mi
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: rhods-operator
namespace: redhat-ods-operator
spec:
channel: fast
installPlanApproval: Manual
name: rhods-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
startingCSV: rhods-operator.2.11.0
config:
env:
- name: "DISABLE_DSC_CONFIG"
volumeMounts:
- name: mlbatch-codeflare
mountPath: /opt/manifests/codeflare/manager/manager.yaml
subPath: manager.yaml
- name: mlbatch-kuberay
mountPath: /opt/manifests/ray/openshift/kuberay-operator-image-patch.yaml
subPath: kuberay-operator-image-patch.yaml
- name: mlbatch-kueue
mountPath: /opt/manifests/kueue/components/manager/controller_manager_config.yaml
subPath: controller_manager_config.yaml
- name: mlbatch-kueue
mountPath: /opt/manifests/kueue/rhoai/manager_config_patch.yaml
subPath: manager_config_patch.yaml
- name: mlbatch-training-operator
mountPath: /opt/manifests/trainingoperator/rhoai/manager_config_patch.yaml
subPath: manager_config_patch.yaml
volumes:
- name: mlbatch-codeflare
configMap:
name: mlbatch-codeflare
- name: mlbatch-kuberay
configMap:
name: mlbatch-kuberay
- name: mlbatch-kueue
configMap:
name: mlbatch-kueue
- name: mlbatch-training-operator
configMap:
name: mlbatch-training-operator