This commit is contained in:
parent
2c316eeebf
commit
461ed329e4
@ -25,7 +25,23 @@ class JobView(FlaskView):
|
||||
# Meglátjuk mennyire lesz ez robosztus így
|
||||
pod_name = JobView._controller_to_pod_name(controller)
|
||||
|
||||
r = k8s.corev1api.read_namespaced_pod(pod_name, current_app.config['WORKING_NAMESPACE'])
|
||||
try:
|
||||
r = k8s.corev1api.read_namespaced_pod(pod_name, current_app.config['WORKING_NAMESPACE'])
|
||||
except kubernetes.client.exceptions.ApiException as e:
|
||||
if e.status == 404:
|
||||
return {
|
||||
"pod_name": pod_name,
|
||||
"config": {
|
||||
"robot_address": None,
|
||||
"program_url": None,
|
||||
},
|
||||
"status": {
|
||||
"cluster_ip": None,
|
||||
"phase": None
|
||||
}
|
||||
}
|
||||
else:
|
||||
raise
|
||||
|
||||
env = {x.name: x.value for x in r.spec.containers[0].env}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user