Skip to content

Commit

Permalink
Merge 2acf398 into 42880ee
Browse files Browse the repository at this point in the history
  • Loading branch information
xudifsd committed Sep 22, 2020
2 parents 42880ee + 2acf398 commit 1e0f751
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/ClusterManager/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ def gen_containers(job, role):
"name": "dshm",
"mountPath": "/dev/shm"
},
{
"name": "host-proc",
"mountPath": "/host-proc"
},
]

if job.dns_policy is None:
Expand Down Expand Up @@ -490,6 +494,12 @@ def gen_task_role(job, role):
"medium": "Memory"
}
},
{
"name": "host-proc",
"hostPath": {
"path": "/proc"
}
},
]

if job.dns_policy is None:
Expand Down
5 changes: 5 additions & 0 deletions src/Jobs_Templete/deployment.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ spec:
readOnly: true
- name: ssh-volume
mountPath: /home/{{ job["user"] }}/.ssh
- mountPath: /host-proc
name: host-proc
{% if not job["dnsPolicy"] %}
- mountPath: /etc/resolv.conf
name: resolv
Expand Down Expand Up @@ -165,6 +167,9 @@ spec:
hostPath:
path: /etc/resolv.conf
{% endif %}
- hostPath:
path: /proc
name: host-proc
- name: dshm
emptyDir:
medium: Memory
Expand Down
5 changes: 5 additions & 0 deletions src/Jobs_Templete/pod.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ spec:
readOnly: true
- name: ssh-volume
mountPath: /home/{{ job["user"] }}/.ssh
- mountPath: /host-proc
name: host-proc
{% if not job["dnsPolicy"] %}
- mountPath: /etc/resolv.conf
name: resolv
Expand Down Expand Up @@ -296,6 +298,9 @@ spec:
- name: dshm
emptyDir:
medium: Memory
- hostPath:
path: /proc
name: host-proc
{% if not job["dnsPolicy"] %}
- name: resolv
hostPath:
Expand Down

0 comments on commit 1e0f751

Please sign in to comment.