Commit 78871859 authored by fengyun.pan's avatar fengyun.pan

Add check for getting kubeclient

parent a9f0be9b
......@@ -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