Skip to content

Commit a870713

Browse files
committed
Update volcano cluster role to allow update/patch of replicaset finalizers in OpenShift
Ref nvbug: 5351460 Signed-off-by: Shiva Krishna, Merla <smerla@nvidia.com>
1 parent 2d28086 commit a870713

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/e2e/nemo-dependencies/customizer/tasks/volcano.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,23 @@
3030
--namespace {{ namespace }} \
3131
--version {{ volcano.chart_version }}
3232

33+
- name: Patch ClusterRole for volcano to update/patch replicaset finalizers in OpenShift
34+
shell: |
35+
kubectl patch clusterrole volcano-controllers --type='json' -p='[
36+
{
37+
"op": "add",
38+
"path": "/rules/-",
39+
"value": {
40+
"apiGroups": ["apps"],
41+
"resources": ["replicasets/finalizers"],
42+
"verbs": ["update", "patch"]
43+
}
44+
}
45+
]'
46+
register: patch_result
47+
changed_when: "'configured' in patch_result.stdout or 'patched' in patch_result.stdout"
48+
when: is_openshift
49+
3350
- name: Wait for Volcano deployments to be available
3451
command: kubectl rollout status deployment/{{ item }} -n {{ namespace }} --timeout=300s
3552
loop:

0 commit comments

Comments
 (0)