mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #63861 from deads2k/client-09-clean
Automatic merge from submit-queue (batch tested with PRs 63589, 63644, 63861, 63872, 63847). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. remove service.deletecollection since the server doesn't support it Updates the generated service client to match the API available. @kubernetes/sig-api-machinery-pr-reviews @kubernetes/api-reviewers ```release-note NONE ```
This commit is contained in:
commit
49e9322d4f
@ -3407,6 +3407,7 @@ type ServicePort struct {
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +genclient:skipVerbs=deleteCollection
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// Service is a named abstraction of software service (for example, mysql) consisting of local port
|
||||
@ -4010,6 +4011,7 @@ const (
|
||||
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// +genclient:skipVerbs=deleteCollection
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// Namespace provides a scope for Names.
|
||||
|
@ -112,14 +112,6 @@ func (c *FakeNamespaces) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeNamespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(namespacesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &core_v1.NamespaceList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched namespace.
|
||||
func (c *FakeNamespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.Namespace, err error) {
|
||||
obj, err := c.Fake.
|
||||
|
@ -120,14 +120,6 @@ func (c *FakeServices) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(servicesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &core_v1.ServiceList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched service.
|
||||
func (c *FakeServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.Service, err error) {
|
||||
obj, err := c.Fake.
|
||||
|
@ -39,7 +39,6 @@ type NamespaceInterface interface {
|
||||
Update(*v1.Namespace) (*v1.Namespace, error)
|
||||
UpdateStatus(*v1.Namespace) (*v1.Namespace, error)
|
||||
Delete(name string, options *meta_v1.DeleteOptions) error
|
||||
DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
|
||||
Get(name string, options meta_v1.GetOptions) (*v1.Namespace, error)
|
||||
List(opts meta_v1.ListOptions) (*v1.NamespaceList, error)
|
||||
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
|
||||
@ -139,16 +138,6 @@ func (c *namespaces) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *namespaces) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("namespaces").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched namespace.
|
||||
func (c *namespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) {
|
||||
result = &v1.Namespace{}
|
||||
|
@ -39,7 +39,6 @@ type ServiceInterface interface {
|
||||
Update(*v1.Service) (*v1.Service, error)
|
||||
UpdateStatus(*v1.Service) (*v1.Service, error)
|
||||
Delete(name string, options *meta_v1.DeleteOptions) error
|
||||
DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
|
||||
Get(name string, options meta_v1.GetOptions) (*v1.Service, error)
|
||||
List(opts meta_v1.ListOptions) (*v1.ServiceList, error)
|
||||
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
|
||||
@ -148,17 +147,6 @@ func (c *services) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *services) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("services").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched service.
|
||||
func (c *services) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) {
|
||||
result = &v1.Service{}
|
||||
|
Loading…
Reference in New Issue
Block a user