Commit 35aabdb6 authored by Adam Reese's avatar Adam Reese Committed by GitHub

Merge pull request #2423 from FengyunPan/add-check

Add check for getting kubeclient
parents 80998bb9 78871859
......@@ -429,7 +429,11 @@ func updateResource(c *Client, target *resource.Info, currentObj runtime.Object,
if err != nil {
return nil
}
client, _ := c.ClientSet()
client, err := c.ClientSet()
if err != nil {
return err
}
pods, err := client.Core().Pods(target.Namespace).List(metav1.ListOptions{
FieldSelector: fields.Everything().String(),
......
......@@ -46,7 +46,10 @@ type deployment struct {
func (c *Client) waitForResources(timeout time.Duration, created Result) error {
log.Printf("beginning wait for resources with timeout of %v", timeout)
cs, _ := c.ClientSet()
cs, err := c.ClientSet()
if err != nil {
return err
}
client := versionedClientsetForDeployment(cs)
return wait.Poll(2*time.Second, timeout, func() (bool, error) {
pods := []v1.Pod{}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment