mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-30 18:58:02 +08:00
Merge branch 'V5.2' into etcdv2
This commit is contained in:
commit
6407bef99e
@ -471,13 +471,6 @@ func getJobPodLogs(ctx context.Context, podChan chan struct{}, clientset kuberne
|
||||
func delete(clientset kubernetes.Interface, namespace, job string) {
|
||||
logrus.Debugf("start delete job: %s", job)
|
||||
listOptions := metav1.ListOptions{LabelSelector:fmt.Sprintf("job-name=%s", job)}
|
||||
pods, err := clientset.CoreV1().Pods(namespace).List(listOptions)
|
||||
if err != nil {
|
||||
logrus.Errorf("get job's pod error: %s", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
logrus.Debugf("get pod len : %d", len(pods.Items))
|
||||
|
||||
if err := clientset.CoreV1().Pods(namespace).DeleteCollection(&metav1.DeleteOptions{}, listOptions); err != nil {
|
||||
logrus.Errorf("delete job pod failed: %s", err.Error())
|
||||
|
Loading…
Reference in New Issue
Block a user