File tree Expand file tree Collapse file tree
cli/polyaxon/_k8s/custom_resources Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,26 @@ def set_termination(custom_object: Dict, termination: V1Termination) -> Dict:
1414 termination_spec ["activeDeadlineSeconds" ] = termination .timeout
1515 if termination .ttl :
1616 termination_spec ["ttlSecondsAfterFinished" ] = termination .ttl
17+ if termination .culling :
18+ culling_spec = {}
19+ if termination .culling .timeout :
20+ culling_spec ["timeout" ] = termination .culling .timeout
21+ termination_spec ["culling" ] = culling_spec
22+ if termination .probe :
23+ probe_spec = {}
24+ if termination .probe .var_exec :
25+ exec_spec = {}
26+ if termination .probe .var_exec .command :
27+ exec_spec ["command" ] = termination .probe .var_exec .command
28+ probe_spec ["exec" ] = exec_spec
29+ if termination .probe .http :
30+ http_spec = {}
31+ if termination .probe .http .path :
32+ http_spec ["path" ] = termination .probe .http .path
33+ if termination .probe .http .port :
34+ http_spec ["port" ] = termination .probe .http .port
35+ probe_spec ["http" ] = http_spec
36+ termination_spec ["probe" ] = probe_spec
1737
1838 custom_object ["termination" ] = termination_spec
1939 return custom_object
You can’t perform that action at this time.
0 commit comments