Skip to content

Commit 0afab3a

Browse files
authored
fix for redhat-ods-applications network policy in RHOAI 2.19 (#182)
* add mlbatch network policy for redhat-ods-applications * reduce cpu request in samples for easier testing on small clusters
1 parent 1224030 commit 0afab3a

14 files changed

+59
-27
lines changed

samples/job.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ spec:
2020
command: ["sh", "-c", "sleep 5"]
2121
resources:
2222
requests:
23-
cpu: 1
23+
cpu: 100m

samples/pod.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ spec:
1818
command: ["sh", "-c", "sleep 5"]
1919
resources:
2020
requests:
21-
cpu: 1
21+
cpu: 100m

samples/pytorchjob-in-appwrapper.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ spec:
2626
- "--epochs=1"
2727
resources:
2828
requests:
29-
cpu: 1
29+
cpu: 100m
3030
Worker:
3131
replicas: 1
3232
restartPolicy: OnFailure
@@ -41,4 +41,4 @@ spec:
4141
- "--epochs=1"
4242
resources:
4343
requests:
44-
cpu: 1
44+
cpu: 100m

samples/pytorchjob.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
- "--epochs=1"
2121
resources:
2222
requests:
23-
cpu: 1
23+
cpu: 100m
2424
Worker:
2525
replicas: 1
2626
restartPolicy: OnFailure
@@ -35,4 +35,4 @@ spec:
3535
- "--epochs=1"
3636
resources:
3737
requests:
38-
cpu: 1
38+
cpu: 100m

setup.RHOAI-v2.16/CLUSTER-SETUP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ oc patch deployment -n scheduler-plugins --type=json --patch-file setup.RHOAI-v2
3939
Create the Red Hat OpenShift AI subscription:
4040
```sh
4141
oc apply -f setup.RHOAI-v2.16/mlbatch-subscription.yaml
42-
````
42+
```
4343
Identify install plan:
4444
```sh
4545
oc get ip -n redhat-ods-operator

setup.RHOAI-v2.19/CLUSTER-SETUP.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ oc patch deployment -n scheduler-plugins --type=json --patch-file setup.RHOAI-v2
3939
Create the Red Hat OpenShift AI subscription:
4040
```sh
4141
oc apply -f setup.RHOAI-v2.19/mlbatch-subscription.yaml
42-
````
42+
```
43+
Create the mlbatch NetworkPolicy in the redhat-ods-applications namespace.
44+
```sh
45+
oc apply -f setup.RHOAI-v2.19/mlbatch-network-policy.yaml
46+
```
4347
Identify install plan:
4448
```sh
4549
oc get ip -n redhat-ods-operator

setup.RHOAI-v2.19/UPGRADE-FAST.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@ kubectl delete crd multikueueconfigs.kueue.x-k8s.io
3434

3535
Next, update the MLBatch modifications to the default RHOAI configuration maps and subscription.
3636
```sh
37+
oc delete cm mlbatch-kuberay -n redhat-ods-operator
38+
oc delete cm mlbatch-codeflare -n redhat-ods-operator
3739
oc apply -f setup.RHOAI-v2.19/mlbatch-upgrade-configmaps.yaml
3840
oc apply -f setup.RHOAI-v2.19/mlbatch-upgrade-fast-subscription.yaml
41+
oc apply -f setup.RHOAI-v2.19/mlbatch-network-policy.yaml
3942
```
4043

4144
Finally, you can approve the install plan replacing the example plan name below

setup.RHOAI-v2.19/UPGRADE-STABLE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ kubectl delete crd multikueueconfigs.kueue.x-k8s.io
3737

3838
Next, update the MLBatch modifications to the default RHOAI configuration maps and subscription.
3939
```sh
40+
oc delete cm mlbatch-kuberay -n redhat-ods-operator
41+
oc delete cm mlbatch-codeflare -n redhat-ods-operator
4042
oc apply -f setup.RHOAI-v2.19/mlbatch-upgrade-configmaps.yaml
4143
oc apply -f setup.RHOAI-v2.19/mlbatch-upgrade-stable-subscription.yaml
44+
oc apply -f setup.RHOAI-v2.19/mlbatch-network-policy.yaml
4245
```
4346

4447
Finally, you can approve the install plan replacing the example plan name below
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
kind: NetworkPolicy
2+
apiVersion: networking.k8s.io/v1
3+
metadata:
4+
name: mlbatch-ods-applications
5+
namespace: redhat-ods-applications
6+
spec:
7+
podSelector: {}
8+
ingress:
9+
- ports:
10+
- protocol: TCP
11+
port: 8443
12+
- protocol: TCP
13+
port: 8080
14+
- protocol: TCP
15+
port: 8081
16+
- protocol: TCP
17+
port: 5432
18+
- protocol: TCP
19+
port: 8082
20+
- protocol: TCP
21+
port: 8099
22+
- protocol: TCP
23+
port: 8181
24+
- protocol: TCP
25+
port: 9443 # default webhook of components

setup.RHOAI-v2.19/mlbatch-subscription.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,19 +175,13 @@ spec:
175175
env:
176176
- name: "DISABLE_DSC_CONFIG"
177177
volumeMounts:
178-
- name: mlbatch-codeflare
179-
mountPath: /opt/manifests/codeflare/manager/manager.yaml
180-
subPath: manager.yaml
181178
- name: mlbatch-kueue
182179
mountPath: /opt/manifests/kueue/components/manager/controller_manager_config.yaml
183180
subPath: controller_manager_config.yaml
184181
- name: mlbatch-training-operator
185182
mountPath: /opt/manifests/trainingoperator/rhoai/manager_config_patch.yaml
186183
subPath: manager_config_patch.yaml
187184
volumes:
188-
- name: mlbatch-codeflare
189-
configMap:
190-
name: mlbatch-codeflare
191185
- name: mlbatch-kueue
192186
configMap:
193187
name: mlbatch-kueue

setup.RHOAI-v2.19/mlbatch-upgrade-fast-subscription.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,13 @@ spec:
1313
env:
1414
- name: "DISABLE_DSC_CONFIG"
1515
volumeMounts:
16-
- name: mlbatch-codeflare
17-
mountPath: /opt/manifests/codeflare/manager/manager.yaml
18-
subPath: manager.yaml
1916
- name: mlbatch-kueue
2017
mountPath: /opt/manifests/kueue/components/manager/controller_manager_config.yaml
2118
subPath: controller_manager_config.yaml
2219
- name: mlbatch-training-operator
2320
mountPath: /opt/manifests/trainingoperator/rhoai/manager_config_patch.yaml
2421
subPath: manager_config_patch.yaml
2522
volumes:
26-
- name: mlbatch-codeflare
27-
configMap:
28-
name: mlbatch-codeflare
2923
- name: mlbatch-kueue
3024
configMap:
3125
name: mlbatch-kueue

setup.RHOAI-v2.19/mlbatch-upgrade-stable-subscription.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,13 @@ spec:
1313
env:
1414
- name: "DISABLE_DSC_CONFIG"
1515
volumeMounts:
16-
- name: mlbatch-codeflare
17-
mountPath: /opt/manifests/codeflare/manager/manager.yaml
18-
subPath: manager.yaml
1916
- name: mlbatch-kueue
2017
mountPath: /opt/manifests/kueue/components/manager/controller_manager_config.yaml
2118
subPath: controller_manager_config.yaml
2219
- name: mlbatch-training-operator
2320
mountPath: /opt/manifests/trainingoperator/rhoai/manager_config_patch.yaml
2421
subPath: manager_config_patch.yaml
2522
volumes:
26-
- name: mlbatch-codeflare
27-
configMap:
28-
name: mlbatch-codeflare
2923
- name: mlbatch-kueue
3024
configMap:
3125
name: mlbatch-kueue

setup.tmpl/CLUSTER-SETUP.md.tmpl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,13 @@ Optionally, create a config map capturing your cluster's topology as described i
7171
Create the Red Hat OpenShift AI subscription:
7272
```sh
7373
{{ .KUBECTL }} apply -f setup.{{ .VERSION }}/mlbatch-subscription.yaml
74-
````
74+
```
75+
{{- if not (eq .VERSION "RHOAI-v2.16") }}
76+
Create the mlbatch NetworkPolicy in the redhat-ods-applications namespace.
77+
```sh
78+
{{ .KUBECTL }} apply -f setup.{{ .VERSION }}/mlbatch-network-policy.yaml
79+
```
80+
{{- end }}
7581
Identify install plan:
7682
```sh
7783
{{ .KUBECTL }} get ip -n redhat-ods-operator

setup.tmpl/StepsToUpgrade.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Things to remember/do when updating RHOAI versions.
2+
3+
1. Clone setup directory from previous RHOAI release.
4+
2. Inspect all files we are overlaying in mlbatch-subscription's
5+
overlay of ODH and merge any upstream changes.
6+
3. Replicate all subscription deltas in upgrade files and note in
7+
UPGRADE steps.
8+
4. Be sure to verify ready status of RHOAI operator, DSC and DSCI
9+
in console to make sure the overlays were successfully applied.

0 commit comments

Comments
 (0)