File tree Expand file tree Collapse file tree 3 files changed +56
-5
lines changed
test/e2e/nemo-dependencies/customizer Expand file tree Collapse file tree 3 files changed +56
-5
lines changed Original file line number Diff line number Diff line change 13
13
ignore_errors : true
14
14
15
15
- name : Delete Volcano Kubernetes resources
16
- shell : kubectl get {{ item }} | egrep 'volcano|mlflow' | awk '{print $1}' | xargs kubectl delete {{ item }}
16
+ shell : kubectl get {{ item }} -n {{ namespace }} | egrep 'volcano|mlflow' | awk '{print $1}' | xargs kubectl delete {{ item }} -n {{ namespace }}
17
17
loop :
18
18
- crd
19
+ - serviceaccount
19
20
- clusterrole
20
21
- clusterrolebinding
21
22
- mutatingwebhookconfiguration
Original file line number Diff line number Diff line change 6
6
- name : Update Helm repositories cache
7
7
command : helm repo update
8
8
9
+ - name : Get Kube API resources
10
+ command : kubectl api-resources --verbs=list --namespaced -o name
11
+ register : api_resources
12
+
13
+ - name : Check if the current cluster is OpenShift
14
+ set_fact :
15
+ is_openshift : " {{ 'routes.route.openshift.io' in api_resources.stdout_lines }}"
16
+
17
+ - name : OpenShift - Prepare RBAC to use hostmount-anyuid SCC
18
+ ansible.builtin.template :
19
+ src : volcano-oc-rbac.yaml.j2
20
+ dest : volcano-oc-rbac.yaml
21
+ when : is_openshift
22
+
23
+ - name : OpenShift - apply RBAC to use hostmount-anyuid SCC
24
+ command : kubectl apply -f volcano-oc-rbac.yaml
25
+ when : is_openshift
26
+
9
27
- name : Install Volcano Helm chart in Kubernetes cluster
10
28
shell : |
11
29
helm upgrade --install {{ volcano.helm_repo_name }} {{ volcano.chart_name }} \
12
30
--namespace {{ namespace }} \
13
31
--version {{ volcano.chart_version }}
14
32
15
- - name : Wait for Volcano pods to be created (timeout = 300s)
16
- shell : |
17
- timeout 300s bash -c 'until kubectl get pods -n {{ namespace }} | grep -q volcano; do sleep 1; done'
18
- register : wait_result
33
+ - name : Wait for Volcano deployments to be available
34
+ command : kubectl rollout status deployment/{{ item }} -n {{ namespace }} --timeout=300s
35
+ loop :
36
+ - volcano-scheduler
37
+ - volcano-admission
38
+ - volcano-controllers
39
+ register : rollout_status
40
+ retries : 5
41
+ delay : 10
42
+ until : rollout_status.rc == 0
19
43
20
44
- name : Run Volcano Job if validation is enabled
21
45
block :
Original file line number Diff line number Diff line change
1
+ apiVersion: rbac.authorization.k8s.io/v1
2
+ kind: Role
3
+ metadata:
4
+ name: scc-hostmount-anyuid
5
+ namespace: {{ namespace }}
6
+ rules:
7
+ - apiGroups: ['security.openshift.io']
8
+ resources: ['securitycontextconstraints']
9
+ verbs: ['use']
10
+ resourceNames: ['hostmount-anyuid']
11
+
12
+ ---
13
+
14
+ apiVersion: rbac.authorization.k8s.io/v1
15
+ kind: RoleBinding
16
+ metadata:
17
+ name: volcano-scc-hostmount-anyuid-binding
18
+ namespace: {{ namespace }}
19
+ subjects:
20
+ - kind: ServiceAccount
21
+ name: volcano-scheduler
22
+ namespace: {{ namespace }}
23
+ roleRef:
24
+ kind: Role
25
+ name: scc-hostmount-anyuid
26
+ apiGroup: rbac.authorization.k8s.io
You can’t perform that action at this time.
0 commit comments