Merge pull request #8437 from hiddeco/kube/log-printf

fix(kube): use logger instead of fmt.Printf
pull/8443/head
Martin Hickey 5 years ago committed by GitHub
commit 298f574606
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -542,14 +542,14 @@ func (c *Client) waitForPodSuccess(obj runtime.Object, name string) (bool, error
switch o.Status.Phase { switch o.Status.Phase {
case v1.PodSucceeded: case v1.PodSucceeded:
fmt.Printf("Pod %s succeeded\n", o.Name) c.Log("Pod %s succeeded", o.Name)
return true, nil return true, nil
case v1.PodFailed: case v1.PodFailed:
return true, errors.Errorf("pod %s failed", o.Name) return true, errors.Errorf("pod %s failed", o.Name)
case v1.PodPending: case v1.PodPending:
fmt.Printf("Pod %s pending\n", o.Name) c.Log("Pod %s pending", o.Name)
case v1.PodRunning: case v1.PodRunning:
fmt.Printf("Pod %s running\n", o.Name) c.Log("Pod %s running", o.Name)
} }
return false, nil return false, nil

Loading…
Cancel
Save