// Update updates the provided resource. func (rc *ResourceClient) Update(obj *runtime.Unstructured) (*runtime.Unstructured, error) { result := new(runtime.Unstructured) if len(obj.GetName()) == 0 { return result, errors.New("object missing name") } err := rc.cl.Put(). NamespaceIfScoped(rc.ns, rc.resource.Namespaced). Resource(rc.resource.Name). Name(obj.GetName()). Body(obj). Do(). Into(result) return result, err }