mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
add status subresource for deployment
This commit is contained in:
@@ -34,8 +34,9 @@ type DeploymentInterface interface {
|
||||
List(label labels.Selector, field fields.Selector) (*extensions.DeploymentList, error)
|
||||
Get(name string) (*extensions.Deployment, error)
|
||||
Delete(name string, options *api.DeleteOptions) error
|
||||
Create(Deployment *extensions.Deployment) (*extensions.Deployment, error)
|
||||
Update(Deployment *extensions.Deployment) (*extensions.Deployment, error)
|
||||
Create(*extensions.Deployment) (*extensions.Deployment, error)
|
||||
Update(*extensions.Deployment) (*extensions.Deployment, error)
|
||||
UpdateStatus(*extensions.Deployment) (*extensions.Deployment, error)
|
||||
Watch(label labels.Selector, field fields.Selector, opts api.ListOptions) (watch.Interface, error)
|
||||
}
|
||||
|
||||
@@ -93,6 +94,12 @@ func (c *deployments) Update(deployment *extensions.Deployment) (result *extensi
|
||||
return
|
||||
}
|
||||
|
||||
func (c *deployments) UpdateStatus(deployment *extensions.Deployment) (result *extensions.Deployment, err error) {
|
||||
result = &extensions.Deployment{}
|
||||
err = c.client.Put().Namespace(c.ns).Resource("deployments").Name(deployment.Name).SubResource("status").Body(deployment).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested deployments.
|
||||
func (c *deployments) Watch(label labels.Selector, field fields.Selector, opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.client.Get().
|
||||
|
||||
Reference in New Issue
Block a user