Fix pod recreation

pull/3373/head
Reinhard Nägele 7 years ago
parent 36983182d2
commit 3d05da0109

@ -428,9 +428,7 @@ func updateResource(c *Client, target *resource.Info, currentObj runtime.Object,
if err := target.Get(); err != nil { if err := target.Get(); err != nil {
return fmt.Errorf("error trying to refresh resource information: %v", err) return fmt.Errorf("error trying to refresh resource information: %v", err)
} }
return nil } else {
}
// send patch to server // send patch to server
helper := resource.NewHelper(target.Client, target.Mapping) helper := resource.NewHelper(target.Client, target.Mapping)
@ -463,6 +461,7 @@ func updateResource(c *Client, target *resource.Info, currentObj runtime.Object,
// When patch succeeds without needing to recreate, refresh target. // When patch succeeds without needing to recreate, refresh target.
target.Refresh(obj, true) target.Refresh(obj, true)
} }
}
if !recreate { if !recreate {
return nil return nil

Loading…
Cancel
Save