Delete task pods upon successful completion
This commit is contained in:
		@@ -60,7 +60,7 @@ rules:
 | 
			
		||||
    verbs: ["get"]
 | 
			
		||||
  - apiGroups: [""]
 | 
			
		||||
    resources: ["pods"]
 | 
			
		||||
    verbs: ["get", "list", "watch", "create", "update", "patch"]
 | 
			
		||||
    verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
 | 
			
		||||
---
 | 
			
		||||
kind: ClusterRoleBinding
 | 
			
		||||
apiVersion: rbac.authorization.k8s.io/v1
 | 
			
		||||
 
 | 
			
		||||
@@ -63,3 +63,4 @@ def run_on_node(fn, node):
 | 
			
		||||
    wait_for(is_finished, "task to finish")
 | 
			
		||||
    if task_pod.obj["status"]["phase"] != "Succeeded":
 | 
			
		||||
        raise Exception(f"Task {name} failed")
 | 
			
		||||
    task_pod.delete()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user