From d0890533a99bcb7f3ee173846863960d15064577 Mon Sep 17 00:00:00 2001 From: Christian Huffman Date: Fri, 6 Mar 2020 08:56:59 -0500 Subject: [PATCH] Updated files after rebase --- api/openapi-spec/swagger.json | 3 +-- pkg/volume/BUILD | 12 +++++++++++- .../kubernetes/typed/storage/v1/csidriver.go | 18 +++++++++--------- .../typed/storage/v1/fake/fake_csidriver.go | 6 +++--- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 3d83cdc37f1..f1f617e6d69 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -14334,8 +14334,7 @@ "items": { "$ref": "#/definitions/io.k8s.api.storage.v1.CSIDriver" }, - "type": "array", - "x-kubernetes-list-type": "set" + "type": "array" }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", diff --git a/pkg/volume/BUILD b/pkg/volume/BUILD index efb0bd2151a..720b13406dc 100644 --- a/pkg/volume/BUILD +++ b/pkg/volume/BUILD @@ -38,7 +38,17 @@ go_library( "//vendor/k8s.io/klog:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", - ], + ] + select({ + "@io_bazel_rules_go//go/platform:android": [ + "//pkg/features:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", + ], + "@io_bazel_rules_go//go/platform:linux": [ + "//pkg/features:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", + ], + "//conditions:default": [], + }), ) go_test( diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csidriver.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csidriver.go index 0a7de70df0c..92e82251d5d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csidriver.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csidriver.go @@ -40,8 +40,8 @@ type CSIDriversGetter interface { type CSIDriverInterface interface { Create(ctx context.Context, cSIDriver *v1.CSIDriver, opts metav1.CreateOptions) (*v1.CSIDriver, error) Update(ctx context.Context, cSIDriver *v1.CSIDriver, opts metav1.UpdateOptions) (*v1.CSIDriver, error) - Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.CSIDriver, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.CSIDriverList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) @@ -129,26 +129,26 @@ func (c *cSIDrivers) Update(ctx context.Context, cSIDriver *v1.CSIDriver, opts m } // Delete takes name of the cSIDriver and deletes it. Returns an error if one occurs. -func (c *cSIDrivers) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error { +func (c *cSIDrivers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Resource("csidrivers"). Name(name). - Body(options). + Body(&opts). Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *cSIDrivers) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { +func (c *cSIDrivers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Resource("csidrivers"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). + Body(&opts). Do(ctx). Error() } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csidriver.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csidriver.go index dae15fe2d7b..d3b682c6392 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csidriver.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csidriver.go @@ -97,15 +97,15 @@ func (c *FakeCSIDrivers) Update(ctx context.Context, cSIDriver *storagev1.CSIDri } // Delete takes name of the cSIDriver and deletes it. Returns an error if one occurs. -func (c *FakeCSIDrivers) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { +func (c *FakeCSIDrivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewRootDeleteAction(csidriversResource, name), &storagev1.CSIDriver{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeCSIDrivers) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(csidriversResource, listOptions) +func (c *FakeCSIDrivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(csidriversResource, listOpts) _, err := c.Fake.Invokes(action, &storagev1.CSIDriverList{}) return err