Adding missing UpdateStatus methods to client
This commit is contained in:
@@ -35,6 +35,7 @@ type PersistentVolumeInterface interface {
|
||||
Get(name string) (*api.PersistentVolume, error)
|
||||
Create(volume *api.PersistentVolume) (*api.PersistentVolume, error)
|
||||
Update(volume *api.PersistentVolume) (*api.PersistentVolume, error)
|
||||
UpdateStatus(persistentVolume *api.PersistentVolume) (*api.PersistentVolume, error)
|
||||
Delete(name string) error
|
||||
Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
|
||||
}
|
||||
@@ -82,6 +83,12 @@ func (c *persistentVolumes) Update(volume *api.PersistentVolume) (result *api.Pe
|
||||
return
|
||||
}
|
||||
|
||||
func (c *persistentVolumes) UpdateStatus(volume *api.PersistentVolume) (result *api.PersistentVolume, err error) {
|
||||
result = &api.PersistentVolume{}
|
||||
err = c.client.Put().Resource("persistentVolumes").Name(volume.Name).SubResource("status").Body(volume).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
func (c *persistentVolumes) Delete(name string) error {
|
||||
return c.client.Delete().Resource("persistentVolumes").Name(name).Do().Error()
|
||||
}
|
||||
|
Reference in New Issue
Block a user