diff --git a/pkg/apis/volumesnapshot/v1beta1/doc.go b/client/apis/volumesnapshot/v1beta1/doc.go similarity index 100% rename from pkg/apis/volumesnapshot/v1beta1/doc.go rename to client/apis/volumesnapshot/v1beta1/doc.go diff --git a/pkg/apis/volumesnapshot/v1beta1/register.go b/client/apis/volumesnapshot/v1beta1/register.go similarity index 100% rename from pkg/apis/volumesnapshot/v1beta1/register.go rename to client/apis/volumesnapshot/v1beta1/register.go diff --git a/pkg/apis/volumesnapshot/v1beta1/types.go b/client/apis/volumesnapshot/v1beta1/types.go similarity index 100% rename from pkg/apis/volumesnapshot/v1beta1/types.go rename to client/apis/volumesnapshot/v1beta1/types.go diff --git a/pkg/apis/volumesnapshot/v1beta1/zz_generated.deepcopy.go b/client/apis/volumesnapshot/v1beta1/zz_generated.deepcopy.go similarity index 100% rename from pkg/apis/volumesnapshot/v1beta1/zz_generated.deepcopy.go rename to client/apis/volumesnapshot/v1beta1/zz_generated.deepcopy.go diff --git a/pkg/client/clientset/versioned/clientset.go b/client/clientset/versioned/clientset.go similarity index 97% rename from pkg/client/clientset/versioned/clientset.go rename to client/clientset/versioned/clientset.go index 0b85a536..8ac6951d 100644 --- a/pkg/client/clientset/versioned/clientset.go +++ b/client/clientset/versioned/clientset.go @@ -21,7 +21,7 @@ package versioned import ( "fmt" - snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1" + snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" diff --git a/pkg/client/clientset/versioned/doc.go b/client/clientset/versioned/doc.go similarity index 100% rename from pkg/client/clientset/versioned/doc.go rename to client/clientset/versioned/doc.go diff --git a/pkg/client/clientset/versioned/fake/clientset_generated.go b/client/clientset/versioned/fake/clientset_generated.go similarity index 91% rename from pkg/client/clientset/versioned/fake/clientset_generated.go rename to client/clientset/versioned/fake/clientset_generated.go index a87b04ff..92c2fa21 100644 --- a/pkg/client/clientset/versioned/fake/clientset_generated.go +++ b/client/clientset/versioned/fake/clientset_generated.go @@ -19,9 +19,9 @@ limitations under the License. package fake import ( - clientset "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned" - snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1" - fakesnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake" + clientset "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned" + snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1" + fakesnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" diff --git a/pkg/client/clientset/versioned/fake/doc.go b/client/clientset/versioned/fake/doc.go similarity index 100% rename from pkg/client/clientset/versioned/fake/doc.go rename to client/clientset/versioned/fake/doc.go diff --git a/pkg/client/clientset/versioned/fake/register.go b/client/clientset/versioned/fake/register.go similarity index 97% rename from pkg/client/clientset/versioned/fake/register.go rename to client/clientset/versioned/fake/register.go index 6b5ea645..a1e3e518 100644 --- a/pkg/client/clientset/versioned/fake/register.go +++ b/client/clientset/versioned/fake/register.go @@ -19,7 +19,7 @@ limitations under the License. package fake import ( - snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/client/clientset/versioned/scheme/doc.go b/client/clientset/versioned/scheme/doc.go similarity index 100% rename from pkg/client/clientset/versioned/scheme/doc.go rename to client/clientset/versioned/scheme/doc.go diff --git a/pkg/client/clientset/versioned/scheme/register.go b/client/clientset/versioned/scheme/register.go similarity index 97% rename from pkg/client/clientset/versioned/scheme/register.go rename to client/clientset/versioned/scheme/register.go index 879ec9b1..c0c02d70 100644 --- a/pkg/client/clientset/versioned/scheme/register.go +++ b/client/clientset/versioned/scheme/register.go @@ -19,7 +19,7 @@ limitations under the License. package scheme import ( - snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/doc.go b/client/clientset/versioned/typed/volumesnapshot/v1beta1/doc.go similarity index 100% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/doc.go rename to client/clientset/versioned/typed/volumesnapshot/v1beta1/doc.go diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/doc.go b/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/doc.go similarity index 100% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/doc.go rename to client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/doc.go diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot.go b/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot.go similarity index 98% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot.go rename to client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot.go index 443b16fd..48429885 100644 --- a/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot.go +++ b/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot.go @@ -21,7 +21,7 @@ package fake import ( "context" - v1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot_client.go b/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot_client.go similarity index 91% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot_client.go rename to client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot_client.go index cb7ec6bc..743f500c 100644 --- a/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot_client.go +++ b/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot_client.go @@ -19,7 +19,7 @@ limitations under the License. package fake import ( - v1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotclass.go b/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotclass.go similarity index 98% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotclass.go rename to client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotclass.go index 5fc4b5bc..f341fbd2 100644 --- a/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotclass.go +++ b/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotclass.go @@ -21,7 +21,7 @@ package fake import ( "context" - v1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotcontent.go b/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotcontent.go similarity index 98% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotcontent.go rename to client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotcontent.go index 9afcb013..6ac2ef07 100644 --- a/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotcontent.go +++ b/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotcontent.go @@ -21,7 +21,7 @@ package fake import ( "context" - v1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/generated_expansion.go b/client/clientset/versioned/typed/volumesnapshot/v1beta1/generated_expansion.go similarity index 100% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/generated_expansion.go rename to client/clientset/versioned/typed/volumesnapshot/v1beta1/generated_expansion.go diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot.go b/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot.go similarity index 97% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot.go rename to client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot.go index e732cc58..161d35e3 100644 --- a/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot.go +++ b/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot.go @@ -22,8 +22,8 @@ import ( "context" "time" - v1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" - scheme "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned/scheme" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + scheme "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot_client.go b/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot_client.go similarity index 93% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot_client.go rename to client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot_client.go index 0cac44c8..eaebb134 100644 --- a/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot_client.go +++ b/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot_client.go @@ -19,8 +19,8 @@ limitations under the License. package v1beta1 import ( - v1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" - "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned/scheme" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotclass.go b/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotclass.go similarity index 97% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotclass.go rename to client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotclass.go index 2bb7aca1..38cb15a3 100644 --- a/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotclass.go +++ b/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotclass.go @@ -22,8 +22,8 @@ import ( "context" "time" - v1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" - scheme "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned/scheme" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + scheme "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotcontent.go b/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotcontent.go similarity index 97% rename from pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotcontent.go rename to client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotcontent.go index ad507d24..d32060c1 100644 --- a/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotcontent.go +++ b/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotcontent.go @@ -22,8 +22,8 @@ import ( "context" "time" - v1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" - scheme "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned/scheme" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + scheme "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml b/client/config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml similarity index 97% rename from config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml rename to client/config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml index 4aa980cc..a945a5cb 100644 --- a/config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml +++ b/client/config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml @@ -4,8 +4,8 @@ apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.2.5 - api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/260" + controller-gen.kubebuilder.io/version: v0.3.0 + api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/139" creationTimestamp: null name: volumesnapshotclasses.snapshot.storage.k8s.io spec: diff --git a/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml b/client/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml similarity index 99% rename from config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml rename to client/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml index 34c51ad6..1ec15569 100644 --- a/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml +++ b/client/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml @@ -4,8 +4,8 @@ apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.2.5 - api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/260" + controller-gen.kubebuilder.io/version: v0.3.0 + api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/139" creationTimestamp: null name: volumesnapshotcontents.snapshot.storage.k8s.io spec: diff --git a/config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml b/client/config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml similarity index 98% rename from config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml rename to client/config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml index 483706f1..f7a500e6 100644 --- a/config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml +++ b/client/config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml @@ -4,8 +4,8 @@ apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.2.5 - api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/260" + controller-gen.kubebuilder.io/version: v0.3.0 + api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/139" creationTimestamp: null name: volumesnapshots.snapshot.storage.k8s.io spec: @@ -157,9 +157,7 @@ spec: of a snapshot is unknown. type: boolean restoreSize: - anyOf: - - type: integer - - type: string + type: string description: restoreSize represents the complete size of the snapshot in bytes. In dynamic snapshot creation case, this field will be filled in with the "size_bytes" value returned from CSI "CreateSnapshotRequest" diff --git a/client/go.mod b/client/go.mod new file mode 100644 index 00000000..871016b2 --- /dev/null +++ b/client/go.mod @@ -0,0 +1,11 @@ +module github.com/kubernetes-csi/external-snapshotter/client/v2 + +go 1.12 + +require ( + golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect + golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 // indirect + k8s.io/api v0.19.0-rc.2 + k8s.io/apimachinery v0.19.0-rc.2 + k8s.io/client-go v0.19.0-rc.2 +) diff --git a/client/go.sum b/client/go.sum new file mode 100644 index 00000000..6c61f504 --- /dev/null +++ b/client/go.sum @@ -0,0 +1,334 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v0.0.0-20190815234213-e83c0a1c26c8 h1:DM7gHzQfHwIj+St8zaPOI6iQEPAxOwIkskvw6s9rDaM= +github.com/evanphx/json-patch v0.0.0-20190815234213-e83c0a1c26c8/go.mod h1:pmLOTb3x90VhIKxsA9yeQG5yfOkkKnkk1h+Ql8NDYDw= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 h1:NusfzzA6yGQ+ua51ck7E3omNUX/JuqbFSaRGqU8CcLI= +golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +k8s.io/api v0.19.0-rc.2 h1:Lq0owhvgpWXmMtz+t2AT/JJpIAPX9X8lK3oE2qslYCU= +k8s.io/api v0.19.0-rc.2/go.mod h1:9nHeM2gbqeaL7yN6UFvOxKzLG5gZ4v+DJ6bpavDetZo= +k8s.io/apimachinery v0.19.0-rc.2 h1:JScnJRuwKHT8RmdrsFMkE4Oi+SVI/QIWFGOOhNZJe/M= +k8s.io/apimachinery v0.19.0-rc.2/go.mod h1:eHbWZVMaaewmYBAUuRYnAmTTMtDhvpPNZuh8/6Yl7v0= +k8s.io/client-go v0.19.0-rc.2 h1:ttUSnt95lsdRvw1MIIMppozF7BA4KMVzIxduU973h3M= +k8s.io/client-go v0.19.0-rc.2/go.mod h1:8ELpdR+MEbL/z6gbYHpB52eKPKOVJNKj4I1WiR3g87A= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/kube-openapi v0.0.0-20200427153329-656914f816f9 h1:5NC2ITmvg8RoxoH0wgmL4zn4VZqXGsKbxrikjaQx6s4= +k8s.io/kube-openapi v0.0.0-20200427153329-656914f816f9/go.mod h1:bfCVj+qXcEaE5SCvzBaqpOySr6tuCcpPKqF6HD8nyCw= +k8s.io/utils v0.0.0-20200720150651-0bdb4ca86cbc h1:GiXZzevctVRRBh56shqcqB9s9ReWMU6GTsFyE2RCFJQ= +k8s.io/utils v0.0.0-20200720150651-0bdb4ca86cbc/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v3 v3.0.1-0.20200706213357-43c19bbb7fba h1:AAbnc5KQuTWKuh2QSnyghKIOTFzB0Jayv7/OFDn3Cy4= +sigs.k8s.io/structured-merge-diff/v3 v3.0.1-0.20200706213357-43c19bbb7fba/go.mod h1:V06abazjHneE37ZdSY/UUwPVgcJMKI/jU5XGUjgIKoc= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/pkg/client/informers/externalversions/factory.go b/client/informers/externalversions/factory.go similarity index 96% rename from pkg/client/informers/externalversions/factory.go rename to client/informers/externalversions/factory.go index a11db7bf..641c1b96 100644 --- a/pkg/client/informers/externalversions/factory.go +++ b/client/informers/externalversions/factory.go @@ -23,9 +23,9 @@ import ( sync "sync" time "time" - versioned "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/informers/externalversions/internalinterfaces" - volumesnapshot "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/informers/externalversions/volumesnapshot" + versioned "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned" + internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/internalinterfaces" + volumesnapshot "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/client/informers/externalversions/generic.go b/client/informers/externalversions/generic.go similarity index 96% rename from pkg/client/informers/externalversions/generic.go rename to client/informers/externalversions/generic.go index a4a86d34..51f7844b 100644 --- a/pkg/client/informers/externalversions/generic.go +++ b/client/informers/externalversions/generic.go @@ -21,7 +21,7 @@ package externalversions import ( "fmt" - v1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) diff --git a/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go b/client/informers/externalversions/internalinterfaces/factory_interfaces.go similarity index 93% rename from pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go rename to client/informers/externalversions/internalinterfaces/factory_interfaces.go index 7cdb9b9a..c38bcfd2 100644 --- a/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/client/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -21,7 +21,7 @@ package internalinterfaces import ( time "time" - versioned "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned" + versioned "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" cache "k8s.io/client-go/tools/cache" diff --git a/pkg/client/informers/externalversions/volumesnapshot/interface.go b/client/informers/externalversions/volumesnapshot/interface.go similarity index 88% rename from pkg/client/informers/externalversions/volumesnapshot/interface.go rename to client/informers/externalversions/volumesnapshot/interface.go index 3b22963f..f8202685 100644 --- a/pkg/client/informers/externalversions/volumesnapshot/interface.go +++ b/client/informers/externalversions/volumesnapshot/interface.go @@ -19,8 +19,8 @@ limitations under the License. package volumesnapshot import ( - internalinterfaces "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/informers/externalversions/internalinterfaces" - v1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/informers/externalversions/volumesnapshot/v1beta1" + internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/internalinterfaces" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot/v1beta1" ) // Interface provides access to each of this group's versions. diff --git a/pkg/client/informers/externalversions/volumesnapshot/v1beta1/interface.go b/client/informers/externalversions/volumesnapshot/v1beta1/interface.go similarity index 97% rename from pkg/client/informers/externalversions/volumesnapshot/v1beta1/interface.go rename to client/informers/externalversions/volumesnapshot/v1beta1/interface.go index ab90184a..93b8a246 100644 --- a/pkg/client/informers/externalversions/volumesnapshot/v1beta1/interface.go +++ b/client/informers/externalversions/volumesnapshot/v1beta1/interface.go @@ -19,7 +19,7 @@ limitations under the License. package v1beta1 import ( - internalinterfaces "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/informers/externalversions/internalinterfaces" + internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/internalinterfaces" ) // Interface provides access to all the informers in this group version. diff --git a/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshot.go b/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshot.go similarity index 92% rename from pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshot.go rename to client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshot.go index 7fa4cc59..fe16773d 100644 --- a/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshot.go +++ b/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshot.go @@ -22,10 +22,10 @@ import ( "context" time "time" - volumesnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" - versioned "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/informers/externalversions/internalinterfaces" - v1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/listers/volumesnapshot/v1beta1" + volumesnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + versioned "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned" + internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/internalinterfaces" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotclass.go b/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotclass.go similarity index 92% rename from pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotclass.go rename to client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotclass.go index 3f2e648e..02c7e588 100644 --- a/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotclass.go +++ b/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotclass.go @@ -22,10 +22,10 @@ import ( "context" time "time" - volumesnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" - versioned "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/informers/externalversions/internalinterfaces" - v1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/listers/volumesnapshot/v1beta1" + volumesnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + versioned "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned" + internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/internalinterfaces" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotcontent.go b/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotcontent.go similarity index 92% rename from pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotcontent.go rename to client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotcontent.go index 9bd7d865..5d1d0809 100644 --- a/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotcontent.go +++ b/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotcontent.go @@ -22,10 +22,10 @@ import ( "context" time "time" - volumesnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" - versioned "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/informers/externalversions/internalinterfaces" - v1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/listers/volumesnapshot/v1beta1" + volumesnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + versioned "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned" + internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/internalinterfaces" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/client/listers/volumesnapshot/v1beta1/expansion_generated.go b/client/listers/volumesnapshot/v1beta1/expansion_generated.go similarity index 100% rename from pkg/client/listers/volumesnapshot/v1beta1/expansion_generated.go rename to client/listers/volumesnapshot/v1beta1/expansion_generated.go diff --git a/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshot.go b/client/listers/volumesnapshot/v1beta1/volumesnapshot.go similarity index 97% rename from pkg/client/listers/volumesnapshot/v1beta1/volumesnapshot.go rename to client/listers/volumesnapshot/v1beta1/volumesnapshot.go index 48013ce0..d449ae4d 100644 --- a/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshot.go +++ b/client/listers/volumesnapshot/v1beta1/volumesnapshot.go @@ -19,7 +19,7 @@ limitations under the License. package v1beta1 import ( - v1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshotclass.go b/client/listers/volumesnapshot/v1beta1/volumesnapshotclass.go similarity index 95% rename from pkg/client/listers/volumesnapshot/v1beta1/volumesnapshotclass.go rename to client/listers/volumesnapshot/v1beta1/volumesnapshotclass.go index c7f29dff..26d5d8fa 100644 --- a/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshotclass.go +++ b/client/listers/volumesnapshot/v1beta1/volumesnapshotclass.go @@ -19,7 +19,7 @@ limitations under the License. package v1beta1 import ( - v1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshotcontent.go b/client/listers/volumesnapshot/v1beta1/volumesnapshotcontent.go similarity index 95% rename from pkg/client/listers/volumesnapshot/v1beta1/volumesnapshotcontent.go rename to client/listers/volumesnapshot/v1beta1/volumesnapshotcontent.go index b6bb6104..2d516d85 100644 --- a/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshotcontent.go +++ b/client/listers/volumesnapshot/v1beta1/volumesnapshotcontent.go @@ -19,7 +19,7 @@ limitations under the License. package v1beta1 import ( - v1beta1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/cmd/csi-snapshotter/main.go b/cmd/csi-snapshotter/main.go index 4fa94f92..c5c94418 100644 --- a/cmd/csi-snapshotter/main.go +++ b/cmd/csi-snapshotter/main.go @@ -41,9 +41,9 @@ import ( controller "github.com/kubernetes-csi/external-snapshotter/v2/pkg/sidecar-controller" "github.com/kubernetes-csi/external-snapshotter/v2/pkg/snapshotter" - clientset "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned" - snapshotscheme "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned/scheme" - informers "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/informers/externalversions" + clientset "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned" + snapshotscheme "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/scheme" + informers "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions" coreinformers "k8s.io/client-go/informers" ) diff --git a/cmd/snapshot-controller/main.go b/cmd/snapshot-controller/main.go index cc557c29..91cdb068 100644 --- a/cmd/snapshot-controller/main.go +++ b/cmd/snapshot-controller/main.go @@ -33,9 +33,9 @@ import ( "github.com/kubernetes-csi/csi-lib-utils/leaderelection" controller "github.com/kubernetes-csi/external-snapshotter/v2/pkg/common-controller" - clientset "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned" - snapshotscheme "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned/scheme" - informers "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/informers/externalversions" + clientset "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned" + snapshotscheme "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/scheme" + informers "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions" coreinformers "k8s.io/client-go/informers" ) diff --git a/go.mod b/go.mod index 4e16805f..efeb2312 100644 --- a/go.mod +++ b/go.mod @@ -9,6 +9,7 @@ require ( github.com/imdario/mergo v0.3.9 // indirect github.com/kubernetes-csi/csi-lib-utils v0.7.0 github.com/kubernetes-csi/csi-test v2.0.0+incompatible + github.com/kubernetes-csi/external-snapshotter/client/v2 v2.0.0-00010101000000-000000000000 github.com/prometheus/client_golang v1.7.1 github.com/prometheus/client_model v0.2.0 github.com/prometheus/common v0.10.0 @@ -22,6 +23,7 @@ require ( ) replace ( + github.com/kubernetes-csi/external-snapshotter/client/v2 => ./client k8s.io/api => k8s.io/api v0.19.0-rc.2 k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.19.0-rc.2 k8s.io/apimachinery => k8s.io/apimachinery v0.19.0-rc.2 diff --git a/go.sum b/go.sum index 8d94b7c4..ad1f6446 100644 --- a/go.sum +++ b/go.sum @@ -298,6 +298,8 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -337,6 +339,8 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 h1:NusfzzA6yGQ+ua51ck7E3omNUX/JuqbFSaRGqU8CcLI= +golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/hack/README.md b/hack/README.md index f2189685..1e5c469a 100644 --- a/hack/README.md +++ b/hack/README.md @@ -8,50 +8,31 @@ This README documents: This is the script to update clientset/informers/listers and API deepcopy code using [code-generator](https://github.com/kubernetes/code-generator). -Make sure to run this script after making changes to /pkg/apis/volumesnapshot/v1beta1/types.go. +Make sure to run this script after making changes to /client/apis/volumesnapshot/v1beta1/types.go. -To run this script, you have to patch it: -```patch -diff --git a/hack/update-generated-code.sh b/hack/update-generated-code.sh ---- a/hack/update-generated-code.sh -+++ b/hack/update-generated-code.sh -@@ -27,7 +27,7 @@ CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-ge - # k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir - # instead of the $GOPATH directly. For normal projects this can be dropped. - bash ${CODEGEN_PKG}/generate-groups.sh "deepcopy,client,informer,lister" \ -- github.com/kubernetes-csi/external-snapshotter/pkg/client github.com/kubernetes-csi/external-snapshotter/pkg/apis \ -+ github.com/kubernetes-csi/external-snapshotter/v2/pkg/client github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis \ - volumesnapshot:v1beta1 \ - --go-header-file ${SCRIPT_ROOT}/hack/boilerplate.go.txt -``` +To run this script, Run: ./hack/update-generated-code.sh from the project root directory. -Once you are done with patching, continue: +Once you run the script, you got the output as: ```bash -rm -fr v2/ -ln -sfvn $(pwd) v2 -rm -fr pkg/client +Generating deepcopy funcs +Generating clientset for volumesnapshot:v1beta1 at github.com/kubernetes-csi/external-snapshotter/client/v2/clientset +Generating listers for volumesnapshot:v1beta1 at github.com/kubernetes-csi/external-snapshotter/client/v2/listers +Generating informers for volumesnapshot:v1beta1 at github.com/kubernetes-csi/external-snapshotter/client/v2/informers + ``` -Run: ./hack/update-generated-code.sh from the project root directory. - -Do not forget to revert previously applied workaround: -```bash -git checkout -- v2/ -git checkout -- hack/update-generated-code.sh -``` ## update-crd.sh -This is the script to update CRD yaml files under ./config/crd/ based on types.go file. +This is the script to update CRD yaml files under /client/config/crd/ based on types.go file. -Make sure to run this script after making changes to /pkg/apis/volumesnapshot/v1beta1/types.go. +Make sure to run this script after making changes to /client/apis/volumesnapshot/v1beta1/types.go. Follow these steps to update the CRD: -* Run ./hack/update-crd.sh from root directory, new yaml files should have been created under ./config/crd/ +* Run ./hack/update-crd.sh from client directory, new yaml files should have been created under ./config/crd/ -* Replace `api-approved.kubernetes.io` annotation value in all yaml files in the metadata section with your PR. -For example, `api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/YOUR-PULL-REQUEST-#"` +* Add api-approved.kubernetes.io annotation value in all yaml files in the metadata section with the PR where the API is approved by the API reviewers. The current approved PR for snapshot beta API is https://github.com/kubernetes-csi/external-snapshotter/pull/139. Refer to https://github.com/kubernetes/enhancements/pull/1111 for details about this annotation. * Remove any metadata sections from the yaml file which does not belong to the generated type. For example, the following command will add a metadata section for a nested object, remove any newly added metadata sections. TODO(xiangqian): this is to make sure the generated CRD is compatible with apiextensions.k8s.io/v1. Once controller-gen supports generating CRD with apiextensions.k8s.io/v1, switch to use the correct version of controller-gen and remove the last step from this README. @@ -60,3 +41,19 @@ For example, the following command will add a metadata section for a nested obje + metadata: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata' ``` +* Update the restoreSize property to string in snapshot.storage.k8s.io_volumesnapshots.yaml + +```bash + +@@ -160,7 +157,7 @@ spec: + of a snapshot is unknown. + type: boolean + restoreSize: +- - type: string ++ type: string + description: restoreSize represents the complete size of the snapshot + in bytes. In dynamic snapshot creation case, this field will be filled + in with the "size_bytes" value returned from CSI "CreateSnapshotRequest" + +``` + diff --git a/hack/update-crd.sh b/hack/update-crd.sh index 8118707b..5c9b2cd4 100755 --- a/hack/update-crd.sh +++ b/hack/update-crd.sh @@ -26,7 +26,7 @@ then TMP_DIR=$(mktemp -d); cd $TMP_DIR; go mod init tmp; - go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.5; + go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.3.0; rm -rf $TMP_DIR; CONTROLLER_GEN=$(which controller-gen) fi @@ -38,8 +38,7 @@ then fi SCRIPT_ROOT=$(unset CDPATH && cd $(dirname "${BASH_SOURCE[0]}")/.. && pwd) - -$CONTROLLER_GEN crd:trivialVersions=true,preserveUnknownFields=false paths=${SCRIPT_ROOT}/pkg/apis/volumesnapshot/v1beta1 +$CONTROLLER_GEN crd:trivialVersions=true,preserveUnknownFields=false paths=${SCRIPT_ROOT}/client/apis/volumesnapshot/v1beta1 # To use your own boilerplate text use: # --go-header-file ${SCRIPT_ROOT}/hack/custom-boilerplate.go.txt diff --git a/hack/update-generated-code.sh b/hack/update-generated-code.sh index f0254b1a..1bd561a1 100755 --- a/hack/update-generated-code.sh +++ b/hack/update-generated-code.sh @@ -27,7 +27,7 @@ CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-ge # k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir # instead of the $GOPATH directly. For normal projects this can be dropped. bash ${CODEGEN_PKG}/generate-groups.sh "deepcopy,client,informer,lister" \ - github.com/kubernetes-csi/external-snapshotter/pkg/client github.com/kubernetes-csi/external-snapshotter/pkg/apis \ + github.com/kubernetes-csi/external-snapshotter/client/v2 github.com/kubernetes-csi/external-snapshotter/client/v2/apis \ volumesnapshot:v1beta1 \ --go-header-file ${SCRIPT_ROOT}/hack/boilerplate.go.txt diff --git a/pkg/common-controller/framework_test.go b/pkg/common-controller/framework_test.go index bf18353f..f70fae4d 100644 --- a/pkg/common-controller/framework_test.go +++ b/pkg/common-controller/framework_test.go @@ -28,12 +28,12 @@ import ( "testing" "time" - crdv1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" - clientset "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned" - "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned/fake" - snapshotscheme "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned/scheme" - informers "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/informers/externalversions" - storagelisters "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/listers/volumesnapshot/v1beta1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + clientset "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned" + "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/fake" + snapshotscheme "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/scheme" + informers "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions" + storagelisters "github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1" "github.com/kubernetes-csi/external-snapshotter/v2/pkg/utils" v1 "k8s.io/api/core/v1" storagev1 "k8s.io/api/storage/v1" diff --git a/pkg/common-controller/snapshot_controller.go b/pkg/common-controller/snapshot_controller.go index d4acf431..a5ab6df7 100644 --- a/pkg/common-controller/snapshot_controller.go +++ b/pkg/common-controller/snapshot_controller.go @@ -32,7 +32,7 @@ import ( ref "k8s.io/client-go/tools/reference" klog "k8s.io/klog/v2" - crdv1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" "github.com/kubernetes-csi/external-snapshotter/v2/pkg/utils" ) diff --git a/pkg/common-controller/snapshot_controller_base.go b/pkg/common-controller/snapshot_controller_base.go index a37a8489..6f6e3e59 100644 --- a/pkg/common-controller/snapshot_controller_base.go +++ b/pkg/common-controller/snapshot_controller_base.go @@ -20,10 +20,10 @@ import ( "fmt" "time" - crdv1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" - clientset "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned" - storageinformers "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/informers/externalversions/volumesnapshot/v1beta1" - storagelisters "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/listers/volumesnapshot/v1beta1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + clientset "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned" + storageinformers "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot/v1beta1" + storagelisters "github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1" "github.com/kubernetes-csi/external-snapshotter/v2/pkg/utils" v1 "k8s.io/api/core/v1" diff --git a/pkg/common-controller/snapshot_controller_test.go b/pkg/common-controller/snapshot_controller_test.go index 12a206c0..92a7c270 100644 --- a/pkg/common-controller/snapshot_controller_test.go +++ b/pkg/common-controller/snapshot_controller_test.go @@ -19,7 +19,7 @@ package common_controller import ( "testing" - crdv1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" "github.com/kubernetes-csi/external-snapshotter/v2/pkg/utils" "k8s.io/client-go/tools/cache" ) diff --git a/pkg/common-controller/snapshot_create_test.go b/pkg/common-controller/snapshot_create_test.go index 95ea75d9..48375cb7 100644 --- a/pkg/common-controller/snapshot_create_test.go +++ b/pkg/common-controller/snapshot_create_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - crdv1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" v1 "k8s.io/api/core/v1" storage "k8s.io/api/storage/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/common-controller/snapshot_delete_test.go b/pkg/common-controller/snapshot_delete_test.go index 76a7fb8b..e62d6886 100644 --- a/pkg/common-controller/snapshot_delete_test.go +++ b/pkg/common-controller/snapshot_delete_test.go @@ -20,7 +20,7 @@ import ( "errors" "testing" - crdv1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" "github.com/kubernetes-csi/external-snapshotter/v2/pkg/utils" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/common-controller/snapshot_update_test.go b/pkg/common-controller/snapshot_update_test.go index 3aa8f2ee..0b7f0d41 100644 --- a/pkg/common-controller/snapshot_update_test.go +++ b/pkg/common-controller/snapshot_update_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - crdv1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" "github.com/kubernetes-csi/external-snapshotter/v2/pkg/utils" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/sidecar-controller/content_create_test.go b/pkg/sidecar-controller/content_create_test.go index c211c51d..1c567153 100644 --- a/pkg/sidecar-controller/content_create_test.go +++ b/pkg/sidecar-controller/content_create_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - crdv1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" "github.com/kubernetes-csi/external-snapshotter/v2/pkg/utils" v1 "k8s.io/api/core/v1" ) diff --git a/pkg/sidecar-controller/csi_handler.go b/pkg/sidecar-controller/csi_handler.go index ac6a38f8..75adeedb 100644 --- a/pkg/sidecar-controller/csi_handler.go +++ b/pkg/sidecar-controller/csi_handler.go @@ -22,7 +22,7 @@ import ( "strings" "time" - crdv1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" "github.com/kubernetes-csi/external-snapshotter/v2/pkg/snapshotter" "github.com/kubernetes-csi/external-snapshotter/v2/pkg/utils" ) diff --git a/pkg/sidecar-controller/framework_test.go b/pkg/sidecar-controller/framework_test.go index 9e043141..ff72aa07 100644 --- a/pkg/sidecar-controller/framework_test.go +++ b/pkg/sidecar-controller/framework_test.go @@ -25,12 +25,12 @@ import ( "testing" "time" - crdv1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" - clientset "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned" - "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned/fake" - snapshotscheme "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned/scheme" - informers "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/informers/externalversions" - storagelisters "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/listers/volumesnapshot/v1beta1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + clientset "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned" + "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/fake" + snapshotscheme "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/scheme" + informers "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions" + storagelisters "github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1" "github.com/kubernetes-csi/external-snapshotter/v2/pkg/utils" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" diff --git a/pkg/sidecar-controller/snapshot_controller.go b/pkg/sidecar-controller/snapshot_controller.go index ff1abf11..d0e0f39c 100644 --- a/pkg/sidecar-controller/snapshot_controller.go +++ b/pkg/sidecar-controller/snapshot_controller.go @@ -22,7 +22,7 @@ import ( "strings" "time" - crdv1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" "github.com/kubernetes-csi/external-snapshotter/v2/pkg/utils" codes "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/pkg/sidecar-controller/snapshot_controller_base.go b/pkg/sidecar-controller/snapshot_controller_base.go index 74b28ef8..1740ce82 100644 --- a/pkg/sidecar-controller/snapshot_controller_base.go +++ b/pkg/sidecar-controller/snapshot_controller_base.go @@ -20,10 +20,10 @@ import ( "fmt" "time" - crdv1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" - clientset "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/clientset/versioned" - storageinformers "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/informers/externalversions/volumesnapshot/v1beta1" - storagelisters "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/listers/volumesnapshot/v1beta1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + clientset "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned" + storageinformers "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot/v1beta1" + storagelisters "github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1" "github.com/kubernetes-csi/external-snapshotter/v2/pkg/snapshotter" "k8s.io/api/core/v1" diff --git a/pkg/sidecar-controller/snapshot_controller_test.go b/pkg/sidecar-controller/snapshot_controller_test.go index 71e86eb4..e5388985 100644 --- a/pkg/sidecar-controller/snapshot_controller_test.go +++ b/pkg/sidecar-controller/snapshot_controller_test.go @@ -16,7 +16,7 @@ package sidecar_controller import ( "testing" - crdv1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" "github.com/kubernetes-csi/external-snapshotter/v2/pkg/utils" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/cache" diff --git a/pkg/sidecar-controller/snapshot_delete_test.go b/pkg/sidecar-controller/snapshot_delete_test.go index 58113c85..4350cecb 100644 --- a/pkg/sidecar-controller/snapshot_delete_test.go +++ b/pkg/sidecar-controller/snapshot_delete_test.go @@ -23,7 +23,7 @@ import ( "errors" - crdv1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" "github.com/kubernetes-csi/external-snapshotter/v2/pkg/utils" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/utils/util.go b/pkg/utils/util.go index 6cdbd8f3..5dd85884 100644 --- a/pkg/utils/util.go +++ b/pkg/utils/util.go @@ -24,7 +24,7 @@ import ( "strings" "time" - crdv1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/utils/util_test.go b/pkg/utils/util_test.go index 84ba5f05..6f936f8e 100644 --- a/pkg/utils/util_test.go +++ b/pkg/utils/util_test.go @@ -20,7 +20,7 @@ import ( "reflect" "testing" - crdv1 "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" + crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/v2/README.md b/v2/README.md deleted file mode 100644 index 1888d006..00000000 --- a/v2/README.md +++ /dev/null @@ -1,18 +0,0 @@ -This directory mirrors the source code via symlinks. -This makes it possible to vendor v2.x releases of -external-snapshotter with `dep` versions that do not -support semantic imports. Support for that is currently -[pending in dep](https://github.com/golang/dep/pull/1963). - -If users of dep have enabled pruning, they must disable if -for external-snapshotter in their Gopk.toml, like this: - -```toml -[prune] - go-tests = true - unused-packages = true - - [[prune.project]] - name = "github.com/kubernetes-csi/external-snapshotter" - unused-packages = false -``` diff --git a/v2/cmd/csi-snapshotter/main.go b/v2/cmd/csi-snapshotter/main.go deleted file mode 120000 index cd776b4c..00000000 --- a/v2/cmd/csi-snapshotter/main.go +++ /dev/null @@ -1 +0,0 @@ -../../../cmd/csi-snapshotter/main.go \ No newline at end of file diff --git a/v2/cmd/csi-snapshotter/main_test.go b/v2/cmd/csi-snapshotter/main_test.go deleted file mode 120000 index 3fedc316..00000000 --- a/v2/cmd/csi-snapshotter/main_test.go +++ /dev/null @@ -1 +0,0 @@ -../../../cmd/csi-snapshotter/main_test.go \ No newline at end of file diff --git a/v2/cmd/snapshot-controller/main.go b/v2/cmd/snapshot-controller/main.go deleted file mode 120000 index 4d9ee57d..00000000 --- a/v2/cmd/snapshot-controller/main.go +++ /dev/null @@ -1 +0,0 @@ -../../../cmd/snapshot-controller/main.go \ No newline at end of file diff --git a/v2/pkg/apis/volumesnapshot/v1beta1/doc.go b/v2/pkg/apis/volumesnapshot/v1beta1/doc.go deleted file mode 120000 index 10a7247f..00000000 --- a/v2/pkg/apis/volumesnapshot/v1beta1/doc.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../pkg/apis/volumesnapshot/v1beta1/doc.go \ No newline at end of file diff --git a/v2/pkg/apis/volumesnapshot/v1beta1/register.go b/v2/pkg/apis/volumesnapshot/v1beta1/register.go deleted file mode 120000 index f1348d2b..00000000 --- a/v2/pkg/apis/volumesnapshot/v1beta1/register.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../pkg/apis/volumesnapshot/v1beta1/register.go \ No newline at end of file diff --git a/v2/pkg/apis/volumesnapshot/v1beta1/types.go b/v2/pkg/apis/volumesnapshot/v1beta1/types.go deleted file mode 120000 index b249fc62..00000000 --- a/v2/pkg/apis/volumesnapshot/v1beta1/types.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../pkg/apis/volumesnapshot/v1beta1/types.go \ No newline at end of file diff --git a/v2/pkg/apis/volumesnapshot/v1beta1/zz_generated.deepcopy.go b/v2/pkg/apis/volumesnapshot/v1beta1/zz_generated.deepcopy.go deleted file mode 120000 index 30372a30..00000000 --- a/v2/pkg/apis/volumesnapshot/v1beta1/zz_generated.deepcopy.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../pkg/apis/volumesnapshot/v1beta1/zz_generated.deepcopy.go \ No newline at end of file diff --git a/v2/pkg/client/clientset/versioned/clientset.go b/v2/pkg/client/clientset/versioned/clientset.go deleted file mode 120000 index 5c44ba91..00000000 --- a/v2/pkg/client/clientset/versioned/clientset.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../pkg/client/clientset/versioned/clientset.go \ No newline at end of file diff --git a/v2/pkg/client/clientset/versioned/doc.go b/v2/pkg/client/clientset/versioned/doc.go deleted file mode 120000 index e8e682ee..00000000 --- a/v2/pkg/client/clientset/versioned/doc.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../pkg/client/clientset/versioned/doc.go \ No newline at end of file diff --git a/v2/pkg/client/clientset/versioned/fake/clientset_generated.go b/v2/pkg/client/clientset/versioned/fake/clientset_generated.go deleted file mode 120000 index fc0afbeb..00000000 --- a/v2/pkg/client/clientset/versioned/fake/clientset_generated.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../pkg/client/clientset/versioned/fake/clientset_generated.go \ No newline at end of file diff --git a/v2/pkg/client/clientset/versioned/fake/doc.go b/v2/pkg/client/clientset/versioned/fake/doc.go deleted file mode 120000 index f2079c15..00000000 --- a/v2/pkg/client/clientset/versioned/fake/doc.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../pkg/client/clientset/versioned/fake/doc.go \ No newline at end of file diff --git a/v2/pkg/client/clientset/versioned/fake/register.go b/v2/pkg/client/clientset/versioned/fake/register.go deleted file mode 120000 index 33e497a4..00000000 --- a/v2/pkg/client/clientset/versioned/fake/register.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../pkg/client/clientset/versioned/fake/register.go \ No newline at end of file diff --git a/v2/pkg/client/clientset/versioned/scheme/doc.go b/v2/pkg/client/clientset/versioned/scheme/doc.go deleted file mode 120000 index 472b1755..00000000 --- a/v2/pkg/client/clientset/versioned/scheme/doc.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../pkg/client/clientset/versioned/scheme/doc.go \ No newline at end of file diff --git a/v2/pkg/client/clientset/versioned/scheme/register.go b/v2/pkg/client/clientset/versioned/scheme/register.go deleted file mode 120000 index f2a9ed29..00000000 --- a/v2/pkg/client/clientset/versioned/scheme/register.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../pkg/client/clientset/versioned/scheme/register.go \ No newline at end of file diff --git a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/doc.go b/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/doc.go deleted file mode 120000 index ea1f3f45..00000000 --- a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/doc.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../../pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/doc.go \ No newline at end of file diff --git a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/doc.go b/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/doc.go deleted file mode 120000 index 436ed904..00000000 --- a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/doc.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../../../pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/doc.go \ No newline at end of file diff --git a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot.go b/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot.go deleted file mode 120000 index 56d5866d..00000000 --- a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../../../pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot.go \ No newline at end of file diff --git a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot_client.go b/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot_client.go deleted file mode 120000 index 051fc033..00000000 --- a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot_client.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../../../pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot_client.go \ No newline at end of file diff --git a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotclass.go b/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotclass.go deleted file mode 120000 index 9069924a..00000000 --- a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotclass.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../../../pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotclass.go \ No newline at end of file diff --git a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotcontent.go b/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotcontent.go deleted file mode 120000 index ab59e49a..00000000 --- a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotcontent.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../../../pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotcontent.go \ No newline at end of file diff --git a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/generated_expansion.go b/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/generated_expansion.go deleted file mode 120000 index dacace3b..00000000 --- a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/generated_expansion.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../../pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/generated_expansion.go \ No newline at end of file diff --git a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot.go b/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot.go deleted file mode 120000 index c4e57e87..00000000 --- a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../../pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot.go \ No newline at end of file diff --git a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot_client.go b/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot_client.go deleted file mode 120000 index 2203e9c9..00000000 --- a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot_client.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../../pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot_client.go \ No newline at end of file diff --git a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotclass.go b/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotclass.go deleted file mode 120000 index 1012e7e3..00000000 --- a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotclass.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../../pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotclass.go \ No newline at end of file diff --git a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotcontent.go b/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotcontent.go deleted file mode 120000 index c6ccc321..00000000 --- a/v2/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotcontent.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../../pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotcontent.go \ No newline at end of file diff --git a/v2/pkg/client/informers/externalversions/factory.go b/v2/pkg/client/informers/externalversions/factory.go deleted file mode 120000 index 34d51598..00000000 --- a/v2/pkg/client/informers/externalversions/factory.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../pkg/client/informers/externalversions/factory.go \ No newline at end of file diff --git a/v2/pkg/client/informers/externalversions/generic.go b/v2/pkg/client/informers/externalversions/generic.go deleted file mode 120000 index 3e2aa68d..00000000 --- a/v2/pkg/client/informers/externalversions/generic.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../pkg/client/informers/externalversions/generic.go \ No newline at end of file diff --git a/v2/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go b/v2/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go deleted file mode 120000 index b6faa161..00000000 --- a/v2/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go \ No newline at end of file diff --git a/v2/pkg/client/informers/externalversions/volumesnapshot/interface.go b/v2/pkg/client/informers/externalversions/volumesnapshot/interface.go deleted file mode 120000 index 781cb65c..00000000 --- a/v2/pkg/client/informers/externalversions/volumesnapshot/interface.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../pkg/client/informers/externalversions/volumesnapshot/interface.go \ No newline at end of file diff --git a/v2/pkg/client/informers/externalversions/volumesnapshot/v1beta1/interface.go b/v2/pkg/client/informers/externalversions/volumesnapshot/v1beta1/interface.go deleted file mode 120000 index 33d8b66c..00000000 --- a/v2/pkg/client/informers/externalversions/volumesnapshot/v1beta1/interface.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../pkg/client/informers/externalversions/volumesnapshot/v1beta1/interface.go \ No newline at end of file diff --git a/v2/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshot.go b/v2/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshot.go deleted file mode 120000 index a0d08885..00000000 --- a/v2/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshot.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshot.go \ No newline at end of file diff --git a/v2/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotclass.go b/v2/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotclass.go deleted file mode 120000 index 24668d5d..00000000 --- a/v2/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotclass.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotclass.go \ No newline at end of file diff --git a/v2/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotcontent.go b/v2/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotcontent.go deleted file mode 120000 index af01ac1c..00000000 --- a/v2/pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotcontent.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../pkg/client/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotcontent.go \ No newline at end of file diff --git a/v2/pkg/client/listers/volumesnapshot/v1beta1/expansion_generated.go b/v2/pkg/client/listers/volumesnapshot/v1beta1/expansion_generated.go deleted file mode 120000 index 7566209c..00000000 --- a/v2/pkg/client/listers/volumesnapshot/v1beta1/expansion_generated.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../pkg/client/listers/volumesnapshot/v1beta1/expansion_generated.go \ No newline at end of file diff --git a/v2/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshot.go b/v2/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshot.go deleted file mode 120000 index 7f49c118..00000000 --- a/v2/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshot.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../pkg/client/listers/volumesnapshot/v1beta1/volumesnapshot.go \ No newline at end of file diff --git a/v2/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshotclass.go b/v2/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshotclass.go deleted file mode 120000 index 91279ccc..00000000 --- a/v2/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshotclass.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../pkg/client/listers/volumesnapshot/v1beta1/volumesnapshotclass.go \ No newline at end of file diff --git a/v2/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshotcontent.go b/v2/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshotcontent.go deleted file mode 120000 index 0559700b..00000000 --- a/v2/pkg/client/listers/volumesnapshot/v1beta1/volumesnapshotcontent.go +++ /dev/null @@ -1 +0,0 @@ -../../../../../../pkg/client/listers/volumesnapshot/v1beta1/volumesnapshotcontent.go \ No newline at end of file diff --git a/v2/pkg/common-controller/framework_test.go b/v2/pkg/common-controller/framework_test.go deleted file mode 120000 index 2a2153e6..00000000 --- a/v2/pkg/common-controller/framework_test.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/common-controller/framework_test.go \ No newline at end of file diff --git a/v2/pkg/common-controller/snapshot_controller.go b/v2/pkg/common-controller/snapshot_controller.go deleted file mode 120000 index aa9a5f65..00000000 --- a/v2/pkg/common-controller/snapshot_controller.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/common-controller/snapshot_controller.go \ No newline at end of file diff --git a/v2/pkg/common-controller/snapshot_controller_base.go b/v2/pkg/common-controller/snapshot_controller_base.go deleted file mode 120000 index fe5c5106..00000000 --- a/v2/pkg/common-controller/snapshot_controller_base.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/common-controller/snapshot_controller_base.go \ No newline at end of file diff --git a/v2/pkg/common-controller/snapshot_controller_test.go b/v2/pkg/common-controller/snapshot_controller_test.go deleted file mode 120000 index 7cbca01b..00000000 --- a/v2/pkg/common-controller/snapshot_controller_test.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/common-controller/snapshot_controller_test.go \ No newline at end of file diff --git a/v2/pkg/common-controller/snapshot_create_test.go b/v2/pkg/common-controller/snapshot_create_test.go deleted file mode 120000 index b664b222..00000000 --- a/v2/pkg/common-controller/snapshot_create_test.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/common-controller/snapshot_create_test.go \ No newline at end of file diff --git a/v2/pkg/common-controller/snapshot_delete_test.go b/v2/pkg/common-controller/snapshot_delete_test.go deleted file mode 120000 index f05e3719..00000000 --- a/v2/pkg/common-controller/snapshot_delete_test.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/common-controller/snapshot_delete_test.go \ No newline at end of file diff --git a/v2/pkg/common-controller/snapshot_finalizer_test.go b/v2/pkg/common-controller/snapshot_finalizer_test.go deleted file mode 120000 index 339a8b5a..00000000 --- a/v2/pkg/common-controller/snapshot_finalizer_test.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/common-controller/snapshot_finalizer_test.go \ No newline at end of file diff --git a/v2/pkg/common-controller/snapshot_update_test.go b/v2/pkg/common-controller/snapshot_update_test.go deleted file mode 120000 index 165dc2a9..00000000 --- a/v2/pkg/common-controller/snapshot_update_test.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/common-controller/snapshot_update_test.go \ No newline at end of file diff --git a/v2/pkg/common-controller/snapshotclass_test.go b/v2/pkg/common-controller/snapshotclass_test.go deleted file mode 120000 index 55ea44e8..00000000 --- a/v2/pkg/common-controller/snapshotclass_test.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/common-controller/snapshotclass_test.go \ No newline at end of file diff --git a/v2/pkg/metrics/metrics.go b/v2/pkg/metrics/metrics.go deleted file mode 120000 index c4e81841..00000000 --- a/v2/pkg/metrics/metrics.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/metrics/metrics.go \ No newline at end of file diff --git a/v2/pkg/metrics/metrics_test.go b/v2/pkg/metrics/metrics_test.go deleted file mode 120000 index 6ea3cea3..00000000 --- a/v2/pkg/metrics/metrics_test.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/metrics/metrics_test.go \ No newline at end of file diff --git a/v2/pkg/sidecar-controller/content_create_test.go b/v2/pkg/sidecar-controller/content_create_test.go deleted file mode 120000 index c4e8af08..00000000 --- a/v2/pkg/sidecar-controller/content_create_test.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/sidecar-controller/content_create_test.go \ No newline at end of file diff --git a/v2/pkg/sidecar-controller/csi_handler.go b/v2/pkg/sidecar-controller/csi_handler.go deleted file mode 120000 index 5051fca5..00000000 --- a/v2/pkg/sidecar-controller/csi_handler.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/sidecar-controller/csi_handler.go \ No newline at end of file diff --git a/v2/pkg/sidecar-controller/framework_test.go b/v2/pkg/sidecar-controller/framework_test.go deleted file mode 120000 index cd794243..00000000 --- a/v2/pkg/sidecar-controller/framework_test.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/sidecar-controller/framework_test.go \ No newline at end of file diff --git a/v2/pkg/sidecar-controller/snapshot_controller.go b/v2/pkg/sidecar-controller/snapshot_controller.go deleted file mode 120000 index dd90969c..00000000 --- a/v2/pkg/sidecar-controller/snapshot_controller.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/sidecar-controller/snapshot_controller.go \ No newline at end of file diff --git a/v2/pkg/sidecar-controller/snapshot_controller_base.go b/v2/pkg/sidecar-controller/snapshot_controller_base.go deleted file mode 120000 index c1b8d0b3..00000000 --- a/v2/pkg/sidecar-controller/snapshot_controller_base.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/sidecar-controller/snapshot_controller_base.go \ No newline at end of file diff --git a/v2/pkg/sidecar-controller/snapshot_controller_test.go b/v2/pkg/sidecar-controller/snapshot_controller_test.go deleted file mode 120000 index 3f74ada0..00000000 --- a/v2/pkg/sidecar-controller/snapshot_controller_test.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/sidecar-controller/snapshot_controller_test.go \ No newline at end of file diff --git a/v2/pkg/sidecar-controller/snapshot_delete_test.go b/v2/pkg/sidecar-controller/snapshot_delete_test.go deleted file mode 120000 index cbdf5610..00000000 --- a/v2/pkg/sidecar-controller/snapshot_delete_test.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/sidecar-controller/snapshot_delete_test.go \ No newline at end of file diff --git a/v2/pkg/sidecar-controller/snapshot_finalizer_test.go b/v2/pkg/sidecar-controller/snapshot_finalizer_test.go deleted file mode 120000 index 724b4c81..00000000 --- a/v2/pkg/sidecar-controller/snapshot_finalizer_test.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/sidecar-controller/snapshot_finalizer_test.go \ No newline at end of file diff --git a/v2/pkg/snapshotter/snapshotter.go b/v2/pkg/snapshotter/snapshotter.go deleted file mode 120000 index 30012fbd..00000000 --- a/v2/pkg/snapshotter/snapshotter.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/snapshotter/snapshotter.go \ No newline at end of file diff --git a/v2/pkg/snapshotter/snapshotter_test.go b/v2/pkg/snapshotter/snapshotter_test.go deleted file mode 120000 index d090b6ed..00000000 --- a/v2/pkg/snapshotter/snapshotter_test.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/snapshotter/snapshotter_test.go \ No newline at end of file diff --git a/v2/pkg/utils/util.go b/v2/pkg/utils/util.go deleted file mode 120000 index 0b6944af..00000000 --- a/v2/pkg/utils/util.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/utils/util.go \ No newline at end of file diff --git a/v2/pkg/utils/util_test.go b/v2/pkg/utils/util_test.go deleted file mode 120000 index a616b09c..00000000 --- a/v2/pkg/utils/util_test.go +++ /dev/null @@ -1 +0,0 @@ -../../../pkg/utils/util_test.go \ No newline at end of file diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1/doc.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1/doc.go new file mode 100644 index 00000000..d8a1f5da --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +k8s:deepcopy-gen=package +// +groupName=snapshot.storage.k8s.io + +package v1beta1 diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1/register.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1/register.go new file mode 100644 index 00000000..91f45142 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1/register.go @@ -0,0 +1,58 @@ +/* +Copyright 2018 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package. +const GroupName = "snapshot.storage.k8s.io" + +var ( + // SchemeBuilder is the new scheme builder + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + // AddToScheme adds to scheme + AddToScheme = SchemeBuilder.AddToScheme + // SchemeGroupVersion is the group version used to register these objects. + SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} +) + +// Resource takes an unqualified resource and returns a Group-qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + SchemeBuilder.Register(addKnownTypes) +} + +// addKnownTypes adds the set of types defined in this package to the supplied scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &VolumeSnapshotClass{}, + &VolumeSnapshotClassList{}, + &VolumeSnapshot{}, + &VolumeSnapshotList{}, + &VolumeSnapshotContent{}, + &VolumeSnapshotContentList{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1/types.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1/types.go new file mode 100644 index 00000000..1299d365 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1/types.go @@ -0,0 +1,395 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +kubebuilder:object:generate=true +package v1beta1 + +import ( + core_v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VolumeSnapshot is a user's request for either creating a point-in-time +// snapshot of a persistent volume, or binding to a pre-existing snapshot. +// +kubebuilder:object:root=true +// +kubebuilder:resource:scope=Namespaced +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ReadyToUse",type=boolean,JSONPath=`.status.readyToUse`,description="Indicates if a snapshot is ready to be used to restore a volume." +// +kubebuilder:printcolumn:name="SourcePVC",type=string,JSONPath=`.spec.source.persistentVolumeClaimName`,description="Name of the source PVC from where a dynamically taken snapshot will be created." +// +kubebuilder:printcolumn:name="SourceSnapshotContent",type=string,JSONPath=`.spec.source.volumeSnapshotContentName`,description="Name of the VolumeSnapshotContent which represents a pre-provisioned snapshot." +// +kubebuilder:printcolumn:name="RestoreSize",type=string,JSONPath=`.status.restoreSize`,description="Represents the complete size of the snapshot." +// +kubebuilder:printcolumn:name="SnapshotClass",type=string,JSONPath=`.spec.volumeSnapshotClassName`,description="The name of the VolumeSnapshotClass requested by the VolumeSnapshot." +// +kubebuilder:printcolumn:name="SnapshotContent",type=string,JSONPath=`.status.boundVolumeSnapshotContentName`,description="The name of the VolumeSnapshotContent to which this VolumeSnapshot is bound." +// +kubebuilder:printcolumn:name="CreationTime",type=date,JSONPath=`.status.creationTime`,description="Timestamp when the point-in-time snapshot is taken by the underlying storage system." +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +type VolumeSnapshot struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // spec defines the desired characteristics of a snapshot requested by a user. + // More info: https://kubernetes.io/docs/concepts/storage/volume-snapshots#volumesnapshots + // Required. + Spec VolumeSnapshotSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` + + // status represents the current information of a snapshot. + // NOTE: status can be modified by sources other than system controllers, + // and must not be depended upon for accuracy. + // Controllers should only use information from the VolumeSnapshotContent object + // after verifying that the binding is accurate and complete. + // +optional + Status *VolumeSnapshotStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// VolumeSnapshotList is a list of VolumeSnapshot objects +type VolumeSnapshotList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // List of VolumeSnapshots + Items []VolumeSnapshot `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// VolumeSnapshotSpec describes the common attributes of a volume snapshot. +type VolumeSnapshotSpec struct { + // source specifies where a snapshot will be created from. + // This field is immutable after creation. + // Required. + Source VolumeSnapshotSource `json:"source" protobuf:"bytes,1,opt,name=source"` + + // volumeSnapshotClassName is the name of the VolumeSnapshotClass requested by the VolumeSnapshot. + // If not specified, the default snapshot class will be used if one exists. + // If not specified, and there is no default snapshot class, dynamic snapshot creation will fail. + // Empty string is not allowed for this field. + // TODO(xiangqian): a webhook validation on empty string. + // More info: https://kubernetes.io/docs/concepts/storage/volume-snapshot-classes + // +optional + VolumeSnapshotClassName *string `json:"volumeSnapshotClassName,omitempty" protobuf:"bytes,2,opt,name=volumeSnapshotClassName"` +} + +// VolumeSnapshotSource specifies whether the underlying snapshot should be +// dynamically taken upon creation or if a pre-existing VolumeSnapshotContent +// object should be used. +// Exactly one of its members must be set. +// Members in VolumeSnapshotSource are immutable. +// TODO(xiangqian): Add a webhook to ensure that VolumeSnapshotSource members +// will not be updated once specified. +type VolumeSnapshotSource struct { + // persistentVolumeClaimName specifies the name of the PersistentVolumeClaim + // object in the same namespace as the VolumeSnapshot object where the + // snapshot should be dynamically taken from. + // This field is immutable. + // +optional + PersistentVolumeClaimName *string `json:"persistentVolumeClaimName,omitempty" protobuf:"bytes,1,opt,name=persistentVolumeClaimName"` + + // volumeSnapshotContentName specifies the name of a pre-existing VolumeSnapshotContent + // object. + // This field is immutable. + // +optional + VolumeSnapshotContentName *string `json:"volumeSnapshotContentName,omitempty" protobuf:"bytes,2,opt,name=volumeSnapshotContentName"` +} + +// VolumeSnapshotStatus is the status of the VolumeSnapshot +type VolumeSnapshotStatus struct { + // boundVolumeSnapshotContentName represents the name of the VolumeSnapshotContent + // object to which the VolumeSnapshot object is bound. + // If not specified, it indicates that the VolumeSnapshot object has not been + // successfully bound to a VolumeSnapshotContent object yet. + // NOTE: Specified boundVolumeSnapshotContentName alone does not mean binding + // is valid. Controllers MUST always verify bidirectional binding between + // VolumeSnapshot and VolumeSnapshotContent to avoid possible security issues. + // +optional + BoundVolumeSnapshotContentName *string `json:"boundVolumeSnapshotContentName,omitempty" protobuf:"bytes,1,opt,name=boundVolumeSnapshotContentName"` + + // creationTime is the timestamp when the point-in-time snapshot is taken + // by the underlying storage system. + // In dynamic snapshot creation case, this field will be filled in with the + // "creation_time" value returned from CSI "CreateSnapshotRequest" gRPC call. + // For a pre-existing snapshot, this field will be filled with the "creation_time" + // value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. + // If not specified, it indicates that the creation time of the snapshot is unknown. + // +optional + CreationTime *metav1.Time `json:"creationTime,omitempty" protobuf:"bytes,2,opt,name=creationTime"` + + // readyToUse indicates if a snapshot is ready to be used to restore a volume. + // In dynamic snapshot creation case, this field will be filled in with the + // "ready_to_use" value returned from CSI "CreateSnapshotRequest" gRPC call. + // For a pre-existing snapshot, this field will be filled with the "ready_to_use" + // value returned from the CSI "ListSnapshots" gRPC call if the driver supports it, + // otherwise, this field will be set to "True". + // If not specified, it means the readiness of a snapshot is unknown. + // +optional + ReadyToUse *bool `json:"readyToUse,omitempty" protobuf:"varint,3,opt,name=readyToUse"` + + // restoreSize represents the complete size of the snapshot in bytes. + // In dynamic snapshot creation case, this field will be filled in with the + // "size_bytes" value returned from CSI "CreateSnapshotRequest" gRPC call. + // For a pre-existing snapshot, this field will be filled with the "size_bytes" + // value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. + // When restoring a volume from this snapshot, the size of the volume MUST NOT + // be smaller than the restoreSize if it is specified, otherwise the restoration will fail. + // If not specified, it indicates that the size is unknown. + // +optional + RestoreSize *resource.Quantity `json:"restoreSize,omitempty" protobuf:"bytes,4,opt,name=restoreSize"` + + // error is the last observed error during snapshot creation, if any. + // This field could be helpful to upper level controllers(i.e., application controller) + // to decide whether they should continue on waiting for the snapshot to be created + // based on the type of error reported. + // +optional + Error *VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,5,opt,name=error,casttype=VolumeSnapshotError"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VolumeSnapshotClass specifies parameters that a underlying storage system uses when +// creating a volume snapshot. A specific VolumeSnapshotClass is used by specifying its +// name in a VolumeSnapshot object. +// VolumeSnapshotClasses are non-namespaced +// +kubebuilder:object:root=true +// +kubebuilder:resource:scope=Cluster +// +kubebuilder:printcolumn:name="Driver",type=string,JSONPath=`.driver` +// +kubebuilder:printcolumn:name="DeletionPolicy",type=string,JSONPath=`.deletionPolicy`,description="Determines whether a VolumeSnapshotContent created through the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted." +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +type VolumeSnapshotClass struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // driver is the name of the storage driver that handles this VolumeSnapshotClass. + // Required. + Driver string `json:"driver" protobuf:"bytes,2,opt,name=driver"` + + // parameters is a key-value map with storage driver specific parameters for creating snapshots. + // These values are opaque to Kubernetes. + // +optional + Parameters map[string]string `json:"parameters,omitempty" protobuf:"bytes,3,rep,name=parameters"` + + // deletionPolicy determines whether a VolumeSnapshotContent created through + // the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted. + // Supported values are "Retain" and "Delete". + // "Retain" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are kept. + // "Delete" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are deleted. + // Required. + DeletionPolicy DeletionPolicy `json:"deletionPolicy" protobuf:"bytes,4,opt,name=deletionPolicy"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VolumeSnapshotClassList is a collection of VolumeSnapshotClasses. +// +kubebuilder:object:root=true +type VolumeSnapshotClassList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // items is the list of VolumeSnapshotClasses + Items []VolumeSnapshotClass `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VolumeSnapshotContent represents the actual "on-disk" snapshot object in the +// underlying storage system +// +kubebuilder:object:root=true +// +kubebuilder:resource:scope=Cluster +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ReadyToUse",type=boolean,JSONPath=`.status.readyToUse`,description="Indicates if a snapshot is ready to be used to restore a volume." +// +kubebuilder:printcolumn:name="RestoreSize",type=integer,JSONPath=`.status.restoreSize`,description="Represents the complete size of the snapshot in bytes" +// +kubebuilder:printcolumn:name="DeletionPolicy",type=string,JSONPath=`.spec.deletionPolicy`,description="Determines whether this VolumeSnapshotContent and its physical snapshot on the underlying storage system should be deleted when its bound VolumeSnapshot is deleted." +// +kubebuilder:printcolumn:name="Driver",type=string,JSONPath=`.spec.driver`,description="Name of the CSI driver used to create the physical snapshot on the underlying storage system." +// +kubebuilder:printcolumn:name="VolumeSnapshotClass",type=string,JSONPath=`.spec.volumeSnapshotClassName`,description="Name of the VolumeSnapshotClass to which this snapshot belongs." +// +kubebuilder:printcolumn:name="VolumeSnapshot",type=string,JSONPath=`.spec.volumeSnapshotRef.name`,description="Name of the VolumeSnapshot object to which this VolumeSnapshotContent object is bound." +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +type VolumeSnapshotContent struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // spec defines properties of a VolumeSnapshotContent created by the underlying storage system. + // Required. + Spec VolumeSnapshotContentSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` + + // status represents the current information of a snapshot. + // +optional + Status *VolumeSnapshotContentStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VolumeSnapshotContentList is a list of VolumeSnapshotContent objects +// +kubebuilder:object:root=true +type VolumeSnapshotContentList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // items is the list of VolumeSnapshotContents + Items []VolumeSnapshotContent `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// VolumeSnapshotContentSpec is the specification of a VolumeSnapshotContent +type VolumeSnapshotContentSpec struct { + // volumeSnapshotRef specifies the VolumeSnapshot object to which this + // VolumeSnapshotContent object is bound. + // VolumeSnapshot.Spec.VolumeSnapshotContentName field must reference to + // this VolumeSnapshotContent's name for the bidirectional binding to be valid. + // For a pre-existing VolumeSnapshotContent object, name and namespace of the + // VolumeSnapshot object MUST be provided for binding to happen. + // This field is immutable after creation. + // Required. + VolumeSnapshotRef core_v1.ObjectReference `json:"volumeSnapshotRef" protobuf:"bytes,1,opt,name=volumeSnapshotRef"` + + // deletionPolicy determines whether this VolumeSnapshotContent and its physical snapshot on + // the underlying storage system should be deleted when its bound VolumeSnapshot is deleted. + // Supported values are "Retain" and "Delete". + // "Retain" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are kept. + // "Delete" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are deleted. + // In dynamic snapshot creation case, this field will be filled in with the "DeletionPolicy" field defined in the + // VolumeSnapshotClass the VolumeSnapshot refers to. + // For pre-existing snapshots, users MUST specify this field when creating the VolumeSnapshotContent object. + // Required. + DeletionPolicy DeletionPolicy `json:"deletionPolicy" protobuf:"bytes,2,opt,name=deletionPolicy"` + + // driver is the name of the CSI driver used to create the physical snapshot on + // the underlying storage system. + // This MUST be the same as the name returned by the CSI GetPluginName() call for + // that driver. + // Required. + Driver string `json:"driver" protobuf:"bytes,3,opt,name=driver"` + + // name of the VolumeSnapshotClass to which this snapshot belongs. + // +optional + VolumeSnapshotClassName *string `json:"volumeSnapshotClassName,omitempty" protobuf:"bytes,4,opt,name=volumeSnapshotClassName"` + + // source specifies from where a snapshot will be created. + // This field is immutable after creation. + // Required. + Source VolumeSnapshotContentSource `json:"source" protobuf:"bytes,5,opt,name=source"` +} + +// VolumeSnapshotContentSource represents the CSI source of a snapshot. +// Exactly one of its members must be set. +// Members in VolumeSnapshotContentSource are immutable. +// TODO(xiangqian): Add a webhook to ensure that VolumeSnapshotContentSource members +// will be immutable once specified. +type VolumeSnapshotContentSource struct { + // volumeHandle specifies the CSI "volume_id" of the volume from which a snapshot + // should be dynamically taken from. + // This field is immutable. + // +optional + VolumeHandle *string `json:"volumeHandle,omitempty" protobuf:"bytes,1,opt,name=volumeHandle"` + + // snapshotHandle specifies the CSI "snapshot_id" of a pre-existing snapshot on + // the underlying storage system. + // This field is immutable. + // +optional + SnapshotHandle *string `json:"snapshotHandle,omitempty" protobuf:"bytes,2,opt,name=snapshotHandle"` +} + +// VolumeSnapshotContentStatus is the status of a VolumeSnapshotContent object +type VolumeSnapshotContentStatus struct { + // snapshotHandle is the CSI "snapshot_id" of a snapshot on the underlying storage system. + // If not specified, it indicates that dynamic snapshot creation has either failed + // or it is still in progress. + // +optional + SnapshotHandle *string `json:"snapshotHandle,omitempty" protobuf:"bytes,1,opt,name=snapshotHandle"` + + // creationTime is the timestamp when the point-in-time snapshot is taken + // by the underlying storage system. + // In dynamic snapshot creation case, this field will be filled in with the + // "creation_time" value returned from CSI "CreateSnapshotRequest" gRPC call. + // For a pre-existing snapshot, this field will be filled with the "creation_time" + // value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. + // If not specified, it indicates the creation time is unknown. + // The format of this field is a Unix nanoseconds time encoded as an int64. + // On Unix, the command `date +%s%N` returns the current time in nanoseconds + // since 1970-01-01 00:00:00 UTC. + // +optional + CreationTime *int64 `json:"creationTime,omitempty" protobuf:"varint,2,opt,name=creationTime"` + + // restoreSize represents the complete size of the snapshot in bytes. + // In dynamic snapshot creation case, this field will be filled in with the + // "size_bytes" value returned from CSI "CreateSnapshotRequest" gRPC call. + // For a pre-existing snapshot, this field will be filled with the "size_bytes" + // value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. + // When restoring a volume from this snapshot, the size of the volume MUST NOT + // be smaller than the restoreSize if it is specified, otherwise the restoration will fail. + // If not specified, it indicates that the size is unknown. + // +kubebuilder:validation:Minimum=0 + // +optional + RestoreSize *int64 `json:"restoreSize,omitempty" protobuf:"bytes,3,opt,name=restoreSize"` + + // readyToUse indicates if a snapshot is ready to be used to restore a volume. + // In dynamic snapshot creation case, this field will be filled in with the + // "ready_to_use" value returned from CSI "CreateSnapshotRequest" gRPC call. + // For a pre-existing snapshot, this field will be filled with the "ready_to_use" + // value returned from the CSI "ListSnapshots" gRPC call if the driver supports it, + // otherwise, this field will be set to "True". + // If not specified, it means the readiness of a snapshot is unknown. + // +optional. + ReadyToUse *bool `json:"readyToUse,omitempty" protobuf:"varint,4,opt,name=readyToUse"` + + // error is the latest observed error during snapshot creation, if any. + // +optional + Error *VolumeSnapshotError `json:"error,omitempty" protobuf:"bytes,5,opt,name=error,casttype=VolumeSnapshotError"` +} + +// DeletionPolicy describes a policy for end-of-life maintenance of volume snapshot contents +// +kubebuilder:validation:Enum=Delete;Retain +type DeletionPolicy string + +const ( + // volumeSnapshotContentDelete means the snapshot will be deleted from the + // underlying storage system on release from its volume snapshot. + VolumeSnapshotContentDelete DeletionPolicy = "Delete" + + // volumeSnapshotContentRetain means the snapshot will be left in its current + // state on release from its volume snapshot. + VolumeSnapshotContentRetain DeletionPolicy = "Retain" +) + +// VolumeSnapshotError describes an error encountered during snapshot creation. +type VolumeSnapshotError struct { + // time is the timestamp when the error was encountered. + // +optional + Time *metav1.Time `json:"time,omitempty" protobuf:"bytes,1,opt,name=time"` + + // message is a string detailing the encountered error during snapshot + // creation if specified. + // NOTE: message may be logged, and it should not contain sensitive + // information. + // +optional + Message *string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 00000000..550ff57f --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,424 @@ +// +build !ignore_autogenerated + +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1beta1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeSnapshot) DeepCopyInto(out *VolumeSnapshot) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(VolumeSnapshotStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshot. +func (in *VolumeSnapshot) DeepCopy() *VolumeSnapshot { + if in == nil { + return nil + } + out := new(VolumeSnapshot) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VolumeSnapshot) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeSnapshotClass) DeepCopyInto(out *VolumeSnapshotClass) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Parameters != nil { + in, out := &in.Parameters, &out.Parameters + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotClass. +func (in *VolumeSnapshotClass) DeepCopy() *VolumeSnapshotClass { + if in == nil { + return nil + } + out := new(VolumeSnapshotClass) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VolumeSnapshotClass) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeSnapshotClassList) DeepCopyInto(out *VolumeSnapshotClassList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VolumeSnapshotClass, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotClassList. +func (in *VolumeSnapshotClassList) DeepCopy() *VolumeSnapshotClassList { + if in == nil { + return nil + } + out := new(VolumeSnapshotClassList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VolumeSnapshotClassList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeSnapshotContent) DeepCopyInto(out *VolumeSnapshotContent) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(VolumeSnapshotContentStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotContent. +func (in *VolumeSnapshotContent) DeepCopy() *VolumeSnapshotContent { + if in == nil { + return nil + } + out := new(VolumeSnapshotContent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VolumeSnapshotContent) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeSnapshotContentList) DeepCopyInto(out *VolumeSnapshotContentList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VolumeSnapshotContent, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotContentList. +func (in *VolumeSnapshotContentList) DeepCopy() *VolumeSnapshotContentList { + if in == nil { + return nil + } + out := new(VolumeSnapshotContentList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VolumeSnapshotContentList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeSnapshotContentSource) DeepCopyInto(out *VolumeSnapshotContentSource) { + *out = *in + if in.VolumeHandle != nil { + in, out := &in.VolumeHandle, &out.VolumeHandle + *out = new(string) + **out = **in + } + if in.SnapshotHandle != nil { + in, out := &in.SnapshotHandle, &out.SnapshotHandle + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotContentSource. +func (in *VolumeSnapshotContentSource) DeepCopy() *VolumeSnapshotContentSource { + if in == nil { + return nil + } + out := new(VolumeSnapshotContentSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeSnapshotContentSpec) DeepCopyInto(out *VolumeSnapshotContentSpec) { + *out = *in + out.VolumeSnapshotRef = in.VolumeSnapshotRef + if in.VolumeSnapshotClassName != nil { + in, out := &in.VolumeSnapshotClassName, &out.VolumeSnapshotClassName + *out = new(string) + **out = **in + } + in.Source.DeepCopyInto(&out.Source) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotContentSpec. +func (in *VolumeSnapshotContentSpec) DeepCopy() *VolumeSnapshotContentSpec { + if in == nil { + return nil + } + out := new(VolumeSnapshotContentSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeSnapshotContentStatus) DeepCopyInto(out *VolumeSnapshotContentStatus) { + *out = *in + if in.SnapshotHandle != nil { + in, out := &in.SnapshotHandle, &out.SnapshotHandle + *out = new(string) + **out = **in + } + if in.CreationTime != nil { + in, out := &in.CreationTime, &out.CreationTime + *out = new(int64) + **out = **in + } + if in.RestoreSize != nil { + in, out := &in.RestoreSize, &out.RestoreSize + *out = new(int64) + **out = **in + } + if in.ReadyToUse != nil { + in, out := &in.ReadyToUse, &out.ReadyToUse + *out = new(bool) + **out = **in + } + if in.Error != nil { + in, out := &in.Error, &out.Error + *out = new(VolumeSnapshotError) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotContentStatus. +func (in *VolumeSnapshotContentStatus) DeepCopy() *VolumeSnapshotContentStatus { + if in == nil { + return nil + } + out := new(VolumeSnapshotContentStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeSnapshotError) DeepCopyInto(out *VolumeSnapshotError) { + *out = *in + if in.Time != nil { + in, out := &in.Time, &out.Time + *out = (*in).DeepCopy() + } + if in.Message != nil { + in, out := &in.Message, &out.Message + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotError. +func (in *VolumeSnapshotError) DeepCopy() *VolumeSnapshotError { + if in == nil { + return nil + } + out := new(VolumeSnapshotError) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeSnapshotList) DeepCopyInto(out *VolumeSnapshotList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VolumeSnapshot, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotList. +func (in *VolumeSnapshotList) DeepCopy() *VolumeSnapshotList { + if in == nil { + return nil + } + out := new(VolumeSnapshotList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VolumeSnapshotList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeSnapshotSource) DeepCopyInto(out *VolumeSnapshotSource) { + *out = *in + if in.PersistentVolumeClaimName != nil { + in, out := &in.PersistentVolumeClaimName, &out.PersistentVolumeClaimName + *out = new(string) + **out = **in + } + if in.VolumeSnapshotContentName != nil { + in, out := &in.VolumeSnapshotContentName, &out.VolumeSnapshotContentName + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotSource. +func (in *VolumeSnapshotSource) DeepCopy() *VolumeSnapshotSource { + if in == nil { + return nil + } + out := new(VolumeSnapshotSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeSnapshotSpec) DeepCopyInto(out *VolumeSnapshotSpec) { + *out = *in + in.Source.DeepCopyInto(&out.Source) + if in.VolumeSnapshotClassName != nil { + in, out := &in.VolumeSnapshotClassName, &out.VolumeSnapshotClassName + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotSpec. +func (in *VolumeSnapshotSpec) DeepCopy() *VolumeSnapshotSpec { + if in == nil { + return nil + } + out := new(VolumeSnapshotSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeSnapshotStatus) DeepCopyInto(out *VolumeSnapshotStatus) { + *out = *in + if in.BoundVolumeSnapshotContentName != nil { + in, out := &in.BoundVolumeSnapshotContentName, &out.BoundVolumeSnapshotContentName + *out = new(string) + **out = **in + } + if in.CreationTime != nil { + in, out := &in.CreationTime, &out.CreationTime + *out = (*in).DeepCopy() + } + if in.ReadyToUse != nil { + in, out := &in.ReadyToUse, &out.ReadyToUse + *out = new(bool) + **out = **in + } + if in.RestoreSize != nil { + in, out := &in.RestoreSize, &out.RestoreSize + x := (*in).DeepCopy() + *out = &x + } + if in.Error != nil { + in, out := &in.Error, &out.Error + *out = new(VolumeSnapshotError) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotStatus. +func (in *VolumeSnapshotStatus) DeepCopy() *VolumeSnapshotStatus { + if in == nil { + return nil + } + out := new(VolumeSnapshotStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/clientset.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/clientset.go new file mode 100644 index 00000000..8ac6951d --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/clientset.go @@ -0,0 +1,97 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + "fmt" + + snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + SnapshotV1beta1() snapshotv1beta1.SnapshotV1beta1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + snapshotV1beta1 *snapshotv1beta1.SnapshotV1beta1Client +} + +// SnapshotV1beta1 retrieves the SnapshotV1beta1Client +func (c *Clientset) SnapshotV1beta1() snapshotv1beta1.SnapshotV1beta1Interface { + return c.snapshotV1beta1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.snapshotV1beta1, err = snapshotv1beta1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.snapshotV1beta1 = snapshotv1beta1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.snapshotV1beta1 = snapshotv1beta1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/doc.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/doc.go new file mode 100644 index 00000000..6ee812fc --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated clientset. +package versioned diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/fake/clientset_generated.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 00000000..92c2fa21 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/fake/clientset_generated.go @@ -0,0 +1,82 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + clientset "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned" + snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1" + fakesnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/fake" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/discovery" + fakediscovery "k8s.io/client-go/discovery/fake" + "k8s.io/client-go/testing" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +var _ clientset.Interface = &Clientset{} + +// SnapshotV1beta1 retrieves the SnapshotV1beta1Client +func (c *Clientset) SnapshotV1beta1() snapshotv1beta1.SnapshotV1beta1Interface { + return &fakesnapshotv1beta1.FakeSnapshotV1beta1{Fake: &c.Fake} +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/fake/doc.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/fake/doc.go new file mode 100644 index 00000000..d6baf01a --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated fake clientset. +package fake diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/fake/register.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/fake/register.go new file mode 100644 index 00000000..a1e3e518 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/fake/register.go @@ -0,0 +1,56 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) +var parameterCodec = runtime.NewParameterCodec(scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + snapshotv1beta1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/scheme/doc.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/scheme/doc.go new file mode 100644 index 00000000..7d06c940 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/scheme/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/scheme/register.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/scheme/register.go new file mode 100644 index 00000000..c0c02d70 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/scheme/register.go @@ -0,0 +1,56 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + snapshotv1beta1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/doc.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/doc.go new file mode 100644 index 00000000..68f9a55b --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1beta1 diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/fake/doc.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/fake/doc.go new file mode 100644 index 00000000..0243e68f --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot.go new file mode 100644 index 00000000..48429885 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot.go @@ -0,0 +1,142 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeVolumeSnapshots implements VolumeSnapshotInterface +type FakeVolumeSnapshots struct { + Fake *FakeSnapshotV1beta1 + ns string +} + +var volumesnapshotsResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1beta1", Resource: "volumesnapshots"} + +var volumesnapshotsKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1beta1", Kind: "VolumeSnapshot"} + +// Get takes name of the volumeSnapshot, and returns the corresponding volumeSnapshot object, and an error if there is any. +func (c *FakeVolumeSnapshots) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeSnapshot, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(volumesnapshotsResource, c.ns, name), &v1beta1.VolumeSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeSnapshot), err +} + +// List takes label and field selectors, and returns the list of VolumeSnapshots that match those selectors. +func (c *FakeVolumeSnapshots) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VolumeSnapshotList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(volumesnapshotsResource, volumesnapshotsKind, c.ns, opts), &v1beta1.VolumeSnapshotList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.VolumeSnapshotList{ListMeta: obj.(*v1beta1.VolumeSnapshotList).ListMeta} + for _, item := range obj.(*v1beta1.VolumeSnapshotList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested volumeSnapshots. +func (c *FakeVolumeSnapshots) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(volumesnapshotsResource, c.ns, opts)) + +} + +// Create takes the representation of a volumeSnapshot and creates it. Returns the server's representation of the volumeSnapshot, and an error, if there is any. +func (c *FakeVolumeSnapshots) Create(ctx context.Context, volumeSnapshot *v1beta1.VolumeSnapshot, opts v1.CreateOptions) (result *v1beta1.VolumeSnapshot, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(volumesnapshotsResource, c.ns, volumeSnapshot), &v1beta1.VolumeSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeSnapshot), err +} + +// Update takes the representation of a volumeSnapshot and updates it. Returns the server's representation of the volumeSnapshot, and an error, if there is any. +func (c *FakeVolumeSnapshots) Update(ctx context.Context, volumeSnapshot *v1beta1.VolumeSnapshot, opts v1.UpdateOptions) (result *v1beta1.VolumeSnapshot, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(volumesnapshotsResource, c.ns, volumeSnapshot), &v1beta1.VolumeSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeSnapshot), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeVolumeSnapshots) UpdateStatus(ctx context.Context, volumeSnapshot *v1beta1.VolumeSnapshot, opts v1.UpdateOptions) (*v1beta1.VolumeSnapshot, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(volumesnapshotsResource, "status", c.ns, volumeSnapshot), &v1beta1.VolumeSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeSnapshot), err +} + +// Delete takes name of the volumeSnapshot and deletes it. Returns an error if one occurs. +func (c *FakeVolumeSnapshots) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(volumesnapshotsResource, c.ns, name), &v1beta1.VolumeSnapshot{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVolumeSnapshots) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(volumesnapshotsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.VolumeSnapshotList{}) + return err +} + +// Patch applies the patch and returns the patched volumeSnapshot. +func (c *FakeVolumeSnapshots) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeSnapshot, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(volumesnapshotsResource, c.ns, name, pt, data, subresources...), &v1beta1.VolumeSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeSnapshot), err +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot_client.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot_client.go new file mode 100644 index 00000000..743f500c --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshot_client.go @@ -0,0 +1,48 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeSnapshotV1beta1 struct { + *testing.Fake +} + +func (c *FakeSnapshotV1beta1) VolumeSnapshots(namespace string) v1beta1.VolumeSnapshotInterface { + return &FakeVolumeSnapshots{c, namespace} +} + +func (c *FakeSnapshotV1beta1) VolumeSnapshotClasses() v1beta1.VolumeSnapshotClassInterface { + return &FakeVolumeSnapshotClasses{c} +} + +func (c *FakeSnapshotV1beta1) VolumeSnapshotContents() v1beta1.VolumeSnapshotContentInterface { + return &FakeVolumeSnapshotContents{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeSnapshotV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotclass.go new file mode 100644 index 00000000..f341fbd2 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotclass.go @@ -0,0 +1,122 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeVolumeSnapshotClasses implements VolumeSnapshotClassInterface +type FakeVolumeSnapshotClasses struct { + Fake *FakeSnapshotV1beta1 +} + +var volumesnapshotclassesResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1beta1", Resource: "volumesnapshotclasses"} + +var volumesnapshotclassesKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1beta1", Kind: "VolumeSnapshotClass"} + +// Get takes name of the volumeSnapshotClass, and returns the corresponding volumeSnapshotClass object, and an error if there is any. +func (c *FakeVolumeSnapshotClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeSnapshotClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(volumesnapshotclassesResource, name), &v1beta1.VolumeSnapshotClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeSnapshotClass), err +} + +// List takes label and field selectors, and returns the list of VolumeSnapshotClasses that match those selectors. +func (c *FakeVolumeSnapshotClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VolumeSnapshotClassList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(volumesnapshotclassesResource, volumesnapshotclassesKind, opts), &v1beta1.VolumeSnapshotClassList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.VolumeSnapshotClassList{ListMeta: obj.(*v1beta1.VolumeSnapshotClassList).ListMeta} + for _, item := range obj.(*v1beta1.VolumeSnapshotClassList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested volumeSnapshotClasses. +func (c *FakeVolumeSnapshotClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(volumesnapshotclassesResource, opts)) +} + +// Create takes the representation of a volumeSnapshotClass and creates it. Returns the server's representation of the volumeSnapshotClass, and an error, if there is any. +func (c *FakeVolumeSnapshotClasses) Create(ctx context.Context, volumeSnapshotClass *v1beta1.VolumeSnapshotClass, opts v1.CreateOptions) (result *v1beta1.VolumeSnapshotClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(volumesnapshotclassesResource, volumeSnapshotClass), &v1beta1.VolumeSnapshotClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeSnapshotClass), err +} + +// Update takes the representation of a volumeSnapshotClass and updates it. Returns the server's representation of the volumeSnapshotClass, and an error, if there is any. +func (c *FakeVolumeSnapshotClasses) Update(ctx context.Context, volumeSnapshotClass *v1beta1.VolumeSnapshotClass, opts v1.UpdateOptions) (result *v1beta1.VolumeSnapshotClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(volumesnapshotclassesResource, volumeSnapshotClass), &v1beta1.VolumeSnapshotClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeSnapshotClass), err +} + +// Delete takes name of the volumeSnapshotClass and deletes it. Returns an error if one occurs. +func (c *FakeVolumeSnapshotClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(volumesnapshotclassesResource, name), &v1beta1.VolumeSnapshotClass{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVolumeSnapshotClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(volumesnapshotclassesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.VolumeSnapshotClassList{}) + return err +} + +// Patch applies the patch and returns the patched volumeSnapshotClass. +func (c *FakeVolumeSnapshotClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeSnapshotClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(volumesnapshotclassesResource, name, pt, data, subresources...), &v1beta1.VolumeSnapshotClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeSnapshotClass), err +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotcontent.go new file mode 100644 index 00000000..6ac2ef07 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/fake/fake_volumesnapshotcontent.go @@ -0,0 +1,133 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeVolumeSnapshotContents implements VolumeSnapshotContentInterface +type FakeVolumeSnapshotContents struct { + Fake *FakeSnapshotV1beta1 +} + +var volumesnapshotcontentsResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1beta1", Resource: "volumesnapshotcontents"} + +var volumesnapshotcontentsKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1beta1", Kind: "VolumeSnapshotContent"} + +// Get takes name of the volumeSnapshotContent, and returns the corresponding volumeSnapshotContent object, and an error if there is any. +func (c *FakeVolumeSnapshotContents) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeSnapshotContent, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(volumesnapshotcontentsResource, name), &v1beta1.VolumeSnapshotContent{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeSnapshotContent), err +} + +// List takes label and field selectors, and returns the list of VolumeSnapshotContents that match those selectors. +func (c *FakeVolumeSnapshotContents) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VolumeSnapshotContentList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(volumesnapshotcontentsResource, volumesnapshotcontentsKind, opts), &v1beta1.VolumeSnapshotContentList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.VolumeSnapshotContentList{ListMeta: obj.(*v1beta1.VolumeSnapshotContentList).ListMeta} + for _, item := range obj.(*v1beta1.VolumeSnapshotContentList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested volumeSnapshotContents. +func (c *FakeVolumeSnapshotContents) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(volumesnapshotcontentsResource, opts)) +} + +// Create takes the representation of a volumeSnapshotContent and creates it. Returns the server's representation of the volumeSnapshotContent, and an error, if there is any. +func (c *FakeVolumeSnapshotContents) Create(ctx context.Context, volumeSnapshotContent *v1beta1.VolumeSnapshotContent, opts v1.CreateOptions) (result *v1beta1.VolumeSnapshotContent, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(volumesnapshotcontentsResource, volumeSnapshotContent), &v1beta1.VolumeSnapshotContent{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeSnapshotContent), err +} + +// Update takes the representation of a volumeSnapshotContent and updates it. Returns the server's representation of the volumeSnapshotContent, and an error, if there is any. +func (c *FakeVolumeSnapshotContents) Update(ctx context.Context, volumeSnapshotContent *v1beta1.VolumeSnapshotContent, opts v1.UpdateOptions) (result *v1beta1.VolumeSnapshotContent, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(volumesnapshotcontentsResource, volumeSnapshotContent), &v1beta1.VolumeSnapshotContent{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeSnapshotContent), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeVolumeSnapshotContents) UpdateStatus(ctx context.Context, volumeSnapshotContent *v1beta1.VolumeSnapshotContent, opts v1.UpdateOptions) (*v1beta1.VolumeSnapshotContent, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(volumesnapshotcontentsResource, "status", volumeSnapshotContent), &v1beta1.VolumeSnapshotContent{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeSnapshotContent), err +} + +// Delete takes name of the volumeSnapshotContent and deletes it. Returns an error if one occurs. +func (c *FakeVolumeSnapshotContents) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(volumesnapshotcontentsResource, name), &v1beta1.VolumeSnapshotContent{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVolumeSnapshotContents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(volumesnapshotcontentsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.VolumeSnapshotContentList{}) + return err +} + +// Patch applies the patch and returns the patched volumeSnapshotContent. +func (c *FakeVolumeSnapshotContents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeSnapshotContent, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(volumesnapshotcontentsResource, name, pt, data, subresources...), &v1beta1.VolumeSnapshotContent{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeSnapshotContent), err +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/generated_expansion.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/generated_expansion.go new file mode 100644 index 00000000..181fe994 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/generated_expansion.go @@ -0,0 +1,25 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +type VolumeSnapshotExpansion interface{} + +type VolumeSnapshotClassExpansion interface{} + +type VolumeSnapshotContentExpansion interface{} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot.go new file mode 100644 index 00000000..161d35e3 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot.go @@ -0,0 +1,195 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + "time" + + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + scheme "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// VolumeSnapshotsGetter has a method to return a VolumeSnapshotInterface. +// A group's client should implement this interface. +type VolumeSnapshotsGetter interface { + VolumeSnapshots(namespace string) VolumeSnapshotInterface +} + +// VolumeSnapshotInterface has methods to work with VolumeSnapshot resources. +type VolumeSnapshotInterface interface { + Create(ctx context.Context, volumeSnapshot *v1beta1.VolumeSnapshot, opts v1.CreateOptions) (*v1beta1.VolumeSnapshot, error) + Update(ctx context.Context, volumeSnapshot *v1beta1.VolumeSnapshot, opts v1.UpdateOptions) (*v1beta1.VolumeSnapshot, error) + UpdateStatus(ctx context.Context, volumeSnapshot *v1beta1.VolumeSnapshot, opts v1.UpdateOptions) (*v1beta1.VolumeSnapshot, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.VolumeSnapshot, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.VolumeSnapshotList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeSnapshot, err error) + VolumeSnapshotExpansion +} + +// volumeSnapshots implements VolumeSnapshotInterface +type volumeSnapshots struct { + client rest.Interface + ns string +} + +// newVolumeSnapshots returns a VolumeSnapshots +func newVolumeSnapshots(c *SnapshotV1beta1Client, namespace string) *volumeSnapshots { + return &volumeSnapshots{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the volumeSnapshot, and returns the corresponding volumeSnapshot object, and an error if there is any. +func (c *volumeSnapshots) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeSnapshot, err error) { + result = &v1beta1.VolumeSnapshot{} + err = c.client.Get(). + Namespace(c.ns). + Resource("volumesnapshots"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VolumeSnapshots that match those selectors. +func (c *volumeSnapshots) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VolumeSnapshotList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.VolumeSnapshotList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("volumesnapshots"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested volumeSnapshots. +func (c *volumeSnapshots) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("volumesnapshots"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a volumeSnapshot and creates it. Returns the server's representation of the volumeSnapshot, and an error, if there is any. +func (c *volumeSnapshots) Create(ctx context.Context, volumeSnapshot *v1beta1.VolumeSnapshot, opts v1.CreateOptions) (result *v1beta1.VolumeSnapshot, err error) { + result = &v1beta1.VolumeSnapshot{} + err = c.client.Post(). + Namespace(c.ns). + Resource("volumesnapshots"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeSnapshot). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a volumeSnapshot and updates it. Returns the server's representation of the volumeSnapshot, and an error, if there is any. +func (c *volumeSnapshots) Update(ctx context.Context, volumeSnapshot *v1beta1.VolumeSnapshot, opts v1.UpdateOptions) (result *v1beta1.VolumeSnapshot, err error) { + result = &v1beta1.VolumeSnapshot{} + err = c.client.Put(). + Namespace(c.ns). + Resource("volumesnapshots"). + Name(volumeSnapshot.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeSnapshot). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *volumeSnapshots) UpdateStatus(ctx context.Context, volumeSnapshot *v1beta1.VolumeSnapshot, opts v1.UpdateOptions) (result *v1beta1.VolumeSnapshot, err error) { + result = &v1beta1.VolumeSnapshot{} + err = c.client.Put(). + Namespace(c.ns). + Resource("volumesnapshots"). + Name(volumeSnapshot.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeSnapshot). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the volumeSnapshot and deletes it. Returns an error if one occurs. +func (c *volumeSnapshots) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("volumesnapshots"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *volumeSnapshots) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("volumesnapshots"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched volumeSnapshot. +func (c *volumeSnapshots) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeSnapshot, err error) { + result = &v1beta1.VolumeSnapshot{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("volumesnapshots"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot_client.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot_client.go new file mode 100644 index 00000000..eaebb134 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshot_client.go @@ -0,0 +1,99 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type SnapshotV1beta1Interface interface { + RESTClient() rest.Interface + VolumeSnapshotsGetter + VolumeSnapshotClassesGetter + VolumeSnapshotContentsGetter +} + +// SnapshotV1beta1Client is used to interact with features provided by the snapshot.storage.k8s.io group. +type SnapshotV1beta1Client struct { + restClient rest.Interface +} + +func (c *SnapshotV1beta1Client) VolumeSnapshots(namespace string) VolumeSnapshotInterface { + return newVolumeSnapshots(c, namespace) +} + +func (c *SnapshotV1beta1Client) VolumeSnapshotClasses() VolumeSnapshotClassInterface { + return newVolumeSnapshotClasses(c) +} + +func (c *SnapshotV1beta1Client) VolumeSnapshotContents() VolumeSnapshotContentInterface { + return newVolumeSnapshotContents(c) +} + +// NewForConfig creates a new SnapshotV1beta1Client for the given config. +func NewForConfig(c *rest.Config) (*SnapshotV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &SnapshotV1beta1Client{client}, nil +} + +// NewForConfigOrDie creates a new SnapshotV1beta1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *SnapshotV1beta1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new SnapshotV1beta1Client for the given RESTClient. +func New(c rest.Interface) *SnapshotV1beta1Client { + return &SnapshotV1beta1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1beta1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *SnapshotV1beta1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotclass.go new file mode 100644 index 00000000..38cb15a3 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotclass.go @@ -0,0 +1,168 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + "time" + + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + scheme "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// VolumeSnapshotClassesGetter has a method to return a VolumeSnapshotClassInterface. +// A group's client should implement this interface. +type VolumeSnapshotClassesGetter interface { + VolumeSnapshotClasses() VolumeSnapshotClassInterface +} + +// VolumeSnapshotClassInterface has methods to work with VolumeSnapshotClass resources. +type VolumeSnapshotClassInterface interface { + Create(ctx context.Context, volumeSnapshotClass *v1beta1.VolumeSnapshotClass, opts v1.CreateOptions) (*v1beta1.VolumeSnapshotClass, error) + Update(ctx context.Context, volumeSnapshotClass *v1beta1.VolumeSnapshotClass, opts v1.UpdateOptions) (*v1beta1.VolumeSnapshotClass, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.VolumeSnapshotClass, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.VolumeSnapshotClassList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeSnapshotClass, err error) + VolumeSnapshotClassExpansion +} + +// volumeSnapshotClasses implements VolumeSnapshotClassInterface +type volumeSnapshotClasses struct { + client rest.Interface +} + +// newVolumeSnapshotClasses returns a VolumeSnapshotClasses +func newVolumeSnapshotClasses(c *SnapshotV1beta1Client) *volumeSnapshotClasses { + return &volumeSnapshotClasses{ + client: c.RESTClient(), + } +} + +// Get takes name of the volumeSnapshotClass, and returns the corresponding volumeSnapshotClass object, and an error if there is any. +func (c *volumeSnapshotClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeSnapshotClass, err error) { + result = &v1beta1.VolumeSnapshotClass{} + err = c.client.Get(). + Resource("volumesnapshotclasses"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VolumeSnapshotClasses that match those selectors. +func (c *volumeSnapshotClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VolumeSnapshotClassList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.VolumeSnapshotClassList{} + err = c.client.Get(). + Resource("volumesnapshotclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested volumeSnapshotClasses. +func (c *volumeSnapshotClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("volumesnapshotclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a volumeSnapshotClass and creates it. Returns the server's representation of the volumeSnapshotClass, and an error, if there is any. +func (c *volumeSnapshotClasses) Create(ctx context.Context, volumeSnapshotClass *v1beta1.VolumeSnapshotClass, opts v1.CreateOptions) (result *v1beta1.VolumeSnapshotClass, err error) { + result = &v1beta1.VolumeSnapshotClass{} + err = c.client.Post(). + Resource("volumesnapshotclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeSnapshotClass). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a volumeSnapshotClass and updates it. Returns the server's representation of the volumeSnapshotClass, and an error, if there is any. +func (c *volumeSnapshotClasses) Update(ctx context.Context, volumeSnapshotClass *v1beta1.VolumeSnapshotClass, opts v1.UpdateOptions) (result *v1beta1.VolumeSnapshotClass, err error) { + result = &v1beta1.VolumeSnapshotClass{} + err = c.client.Put(). + Resource("volumesnapshotclasses"). + Name(volumeSnapshotClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeSnapshotClass). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the volumeSnapshotClass and deletes it. Returns an error if one occurs. +func (c *volumeSnapshotClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("volumesnapshotclasses"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *volumeSnapshotClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("volumesnapshotclasses"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched volumeSnapshotClass. +func (c *volumeSnapshotClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeSnapshotClass, err error) { + result = &v1beta1.VolumeSnapshotClass{} + err = c.client.Patch(pt). + Resource("volumesnapshotclasses"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotcontent.go new file mode 100644 index 00000000..d32060c1 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/volumesnapshotcontent.go @@ -0,0 +1,184 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + "time" + + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + scheme "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// VolumeSnapshotContentsGetter has a method to return a VolumeSnapshotContentInterface. +// A group's client should implement this interface. +type VolumeSnapshotContentsGetter interface { + VolumeSnapshotContents() VolumeSnapshotContentInterface +} + +// VolumeSnapshotContentInterface has methods to work with VolumeSnapshotContent resources. +type VolumeSnapshotContentInterface interface { + Create(ctx context.Context, volumeSnapshotContent *v1beta1.VolumeSnapshotContent, opts v1.CreateOptions) (*v1beta1.VolumeSnapshotContent, error) + Update(ctx context.Context, volumeSnapshotContent *v1beta1.VolumeSnapshotContent, opts v1.UpdateOptions) (*v1beta1.VolumeSnapshotContent, error) + UpdateStatus(ctx context.Context, volumeSnapshotContent *v1beta1.VolumeSnapshotContent, opts v1.UpdateOptions) (*v1beta1.VolumeSnapshotContent, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.VolumeSnapshotContent, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.VolumeSnapshotContentList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeSnapshotContent, err error) + VolumeSnapshotContentExpansion +} + +// volumeSnapshotContents implements VolumeSnapshotContentInterface +type volumeSnapshotContents struct { + client rest.Interface +} + +// newVolumeSnapshotContents returns a VolumeSnapshotContents +func newVolumeSnapshotContents(c *SnapshotV1beta1Client) *volumeSnapshotContents { + return &volumeSnapshotContents{ + client: c.RESTClient(), + } +} + +// Get takes name of the volumeSnapshotContent, and returns the corresponding volumeSnapshotContent object, and an error if there is any. +func (c *volumeSnapshotContents) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeSnapshotContent, err error) { + result = &v1beta1.VolumeSnapshotContent{} + err = c.client.Get(). + Resource("volumesnapshotcontents"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VolumeSnapshotContents that match those selectors. +func (c *volumeSnapshotContents) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VolumeSnapshotContentList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.VolumeSnapshotContentList{} + err = c.client.Get(). + Resource("volumesnapshotcontents"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested volumeSnapshotContents. +func (c *volumeSnapshotContents) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("volumesnapshotcontents"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a volumeSnapshotContent and creates it. Returns the server's representation of the volumeSnapshotContent, and an error, if there is any. +func (c *volumeSnapshotContents) Create(ctx context.Context, volumeSnapshotContent *v1beta1.VolumeSnapshotContent, opts v1.CreateOptions) (result *v1beta1.VolumeSnapshotContent, err error) { + result = &v1beta1.VolumeSnapshotContent{} + err = c.client.Post(). + Resource("volumesnapshotcontents"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeSnapshotContent). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a volumeSnapshotContent and updates it. Returns the server's representation of the volumeSnapshotContent, and an error, if there is any. +func (c *volumeSnapshotContents) Update(ctx context.Context, volumeSnapshotContent *v1beta1.VolumeSnapshotContent, opts v1.UpdateOptions) (result *v1beta1.VolumeSnapshotContent, err error) { + result = &v1beta1.VolumeSnapshotContent{} + err = c.client.Put(). + Resource("volumesnapshotcontents"). + Name(volumeSnapshotContent.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeSnapshotContent). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *volumeSnapshotContents) UpdateStatus(ctx context.Context, volumeSnapshotContent *v1beta1.VolumeSnapshotContent, opts v1.UpdateOptions) (result *v1beta1.VolumeSnapshotContent, err error) { + result = &v1beta1.VolumeSnapshotContent{} + err = c.client.Put(). + Resource("volumesnapshotcontents"). + Name(volumeSnapshotContent.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeSnapshotContent). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the volumeSnapshotContent and deletes it. Returns an error if one occurs. +func (c *volumeSnapshotContents) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("volumesnapshotcontents"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *volumeSnapshotContents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("volumesnapshotcontents"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched volumeSnapshotContent. +func (c *volumeSnapshotContents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeSnapshotContent, err error) { + result = &v1beta1.VolumeSnapshotContent{} + err = c.client.Patch(pt). + Resource("volumesnapshotcontents"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/factory.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/factory.go new file mode 100644 index 00000000..641c1b96 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/factory.go @@ -0,0 +1,180 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package externalversions + +import ( + reflect "reflect" + sync "sync" + time "time" + + versioned "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned" + internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/internalinterfaces" + volumesnapshot "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + cache "k8s.io/client-go/tools/cache" +) + +// SharedInformerOption defines the functional option type for SharedInformerFactory. +type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory + +type sharedInformerFactory struct { + client versioned.Interface + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc + lock sync.Mutex + defaultResync time.Duration + customResync map[reflect.Type]time.Duration + + informers map[reflect.Type]cache.SharedIndexInformer + // startedInformers is used for tracking which informers have been started. + // This allows Start() to be called multiple times safely. + startedInformers map[reflect.Type]bool +} + +// WithCustomResyncConfig sets a custom resync period for the specified informer types. +func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + for k, v := range resyncConfig { + factory.customResync[reflect.TypeOf(k)] = v + } + return factory + } +} + +// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory. +func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.tweakListOptions = tweakListOptions + return factory + } +} + +// WithNamespace limits the SharedInformerFactory to the specified namespace. +func WithNamespace(namespace string) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.namespace = namespace + return factory + } +} + +// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. +func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory { + return NewSharedInformerFactoryWithOptions(client, defaultResync) +} + +// NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. +// Listers obtained via this SharedInformerFactory will be subject to the same filters +// as specified here. +// Deprecated: Please use NewSharedInformerFactoryWithOptions instead +func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { + return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) +} + +// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. +func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory { + factory := &sharedInformerFactory{ + client: client, + namespace: v1.NamespaceAll, + defaultResync: defaultResync, + informers: make(map[reflect.Type]cache.SharedIndexInformer), + startedInformers: make(map[reflect.Type]bool), + customResync: make(map[reflect.Type]time.Duration), + } + + // Apply all options + for _, opt := range options { + factory = opt(factory) + } + + return factory +} + +// Start initializes all requested informers. +func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { + f.lock.Lock() + defer f.lock.Unlock() + + for informerType, informer := range f.informers { + if !f.startedInformers[informerType] { + go informer.Run(stopCh) + f.startedInformers[informerType] = true + } + } +} + +// WaitForCacheSync waits for all started informers' cache were synced. +func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { + informers := func() map[reflect.Type]cache.SharedIndexInformer { + f.lock.Lock() + defer f.lock.Unlock() + + informers := map[reflect.Type]cache.SharedIndexInformer{} + for informerType, informer := range f.informers { + if f.startedInformers[informerType] { + informers[informerType] = informer + } + } + return informers + }() + + res := map[reflect.Type]bool{} + for informType, informer := range informers { + res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced) + } + return res +} + +// InternalInformerFor returns the SharedIndexInformer for obj using an internal +// client. +func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { + f.lock.Lock() + defer f.lock.Unlock() + + informerType := reflect.TypeOf(obj) + informer, exists := f.informers[informerType] + if exists { + return informer + } + + resyncPeriod, exists := f.customResync[informerType] + if !exists { + resyncPeriod = f.defaultResync + } + + informer = newFunc(f.client, resyncPeriod) + f.informers[informerType] = informer + + return informer +} + +// SharedInformerFactory provides shared informers for resources in all known +// API group versions. +type SharedInformerFactory interface { + internalinterfaces.SharedInformerFactory + ForResource(resource schema.GroupVersionResource) (GenericInformer, error) + WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool + + Snapshot() volumesnapshot.Interface +} + +func (f *sharedInformerFactory) Snapshot() volumesnapshot.Interface { + return volumesnapshot.New(f, f.namespace, f.tweakListOptions) +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/generic.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/generic.go new file mode 100644 index 00000000..51f7844b --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/generic.go @@ -0,0 +1,66 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package externalversions + +import ( + "fmt" + + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + cache "k8s.io/client-go/tools/cache" +) + +// GenericInformer is type of SharedIndexInformer which will locate and delegate to other +// sharedInformers based on type +type GenericInformer interface { + Informer() cache.SharedIndexInformer + Lister() cache.GenericLister +} + +type genericInformer struct { + informer cache.SharedIndexInformer + resource schema.GroupResource +} + +// Informer returns the SharedIndexInformer. +func (f *genericInformer) Informer() cache.SharedIndexInformer { + return f.informer +} + +// Lister returns the GenericLister. +func (f *genericInformer) Lister() cache.GenericLister { + return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource) +} + +// ForResource gives generic access to a shared informer of the matching type +// TODO extend this to unknown resources with a client pool +func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { + switch resource { + // Group=snapshot.storage.k8s.io, Version=v1beta1 + case v1beta1.SchemeGroupVersion.WithResource("volumesnapshots"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Snapshot().V1beta1().VolumeSnapshots().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("volumesnapshotclasses"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Snapshot().V1beta1().VolumeSnapshotClasses().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("volumesnapshotcontents"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Snapshot().V1beta1().VolumeSnapshotContents().Informer()}, nil + + } + + return nil, fmt.Errorf("no informer found for %v", resource) +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/internalinterfaces/factory_interfaces.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/internalinterfaces/factory_interfaces.go new file mode 100644 index 00000000..c38bcfd2 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -0,0 +1,40 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package internalinterfaces + +import ( + time "time" + + versioned "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + cache "k8s.io/client-go/tools/cache" +) + +// NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer. +type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer + +// SharedInformerFactory a small interface to allow for adding an informer without an import cycle +type SharedInformerFactory interface { + Start(stopCh <-chan struct{}) + InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer +} + +// TweakListOptionsFunc is a function that transforms a v1.ListOptions. +type TweakListOptionsFunc func(*v1.ListOptions) diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot/interface.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot/interface.go new file mode 100644 index 00000000..f8202685 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot/interface.go @@ -0,0 +1,46 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package volumesnapshot + +import ( + internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/internalinterfaces" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot/v1beta1" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1beta1 provides access to shared informers for resources in V1beta1. + V1beta1() v1beta1.Interface +} + +type group struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// V1beta1 returns a new v1beta1.Interface. +func (g *group) V1beta1() v1beta1.Interface { + return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot/v1beta1/interface.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot/v1beta1/interface.go new file mode 100644 index 00000000..93b8a246 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot/v1beta1/interface.go @@ -0,0 +1,59 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // VolumeSnapshots returns a VolumeSnapshotInformer. + VolumeSnapshots() VolumeSnapshotInformer + // VolumeSnapshotClasses returns a VolumeSnapshotClassInformer. + VolumeSnapshotClasses() VolumeSnapshotClassInformer + // VolumeSnapshotContents returns a VolumeSnapshotContentInformer. + VolumeSnapshotContents() VolumeSnapshotContentInformer +} + +type version struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// VolumeSnapshots returns a VolumeSnapshotInformer. +func (v *version) VolumeSnapshots() VolumeSnapshotInformer { + return &volumeSnapshotInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// VolumeSnapshotClasses returns a VolumeSnapshotClassInformer. +func (v *version) VolumeSnapshotClasses() VolumeSnapshotClassInformer { + return &volumeSnapshotClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + +// VolumeSnapshotContents returns a VolumeSnapshotContentInformer. +func (v *version) VolumeSnapshotContents() VolumeSnapshotContentInformer { + return &volumeSnapshotContentInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot/v1beta1/volumesnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot/v1beta1/volumesnapshot.go new file mode 100644 index 00000000..fe16773d --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot/v1beta1/volumesnapshot.go @@ -0,0 +1,90 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + time "time" + + volumesnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + versioned "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned" + internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/internalinterfaces" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// VolumeSnapshotInformer provides access to a shared informer and lister for +// VolumeSnapshots. +type VolumeSnapshotInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.VolumeSnapshotLister +} + +type volumeSnapshotInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewVolumeSnapshotInformer constructs a new informer for VolumeSnapshot type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewVolumeSnapshotInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredVolumeSnapshotInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredVolumeSnapshotInformer constructs a new informer for VolumeSnapshot type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredVolumeSnapshotInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SnapshotV1beta1().VolumeSnapshots(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SnapshotV1beta1().VolumeSnapshots(namespace).Watch(context.TODO(), options) + }, + }, + &volumesnapshotv1beta1.VolumeSnapshot{}, + resyncPeriod, + indexers, + ) +} + +func (f *volumeSnapshotInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredVolumeSnapshotInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *volumeSnapshotInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&volumesnapshotv1beta1.VolumeSnapshot{}, f.defaultInformer) +} + +func (f *volumeSnapshotInformer) Lister() v1beta1.VolumeSnapshotLister { + return v1beta1.NewVolumeSnapshotLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotclass.go new file mode 100644 index 00000000..02c7e588 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotclass.go @@ -0,0 +1,89 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + time "time" + + volumesnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + versioned "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned" + internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/internalinterfaces" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// VolumeSnapshotClassInformer provides access to a shared informer and lister for +// VolumeSnapshotClasses. +type VolumeSnapshotClassInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.VolumeSnapshotClassLister +} + +type volumeSnapshotClassInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewVolumeSnapshotClassInformer constructs a new informer for VolumeSnapshotClass type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewVolumeSnapshotClassInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredVolumeSnapshotClassInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredVolumeSnapshotClassInformer constructs a new informer for VolumeSnapshotClass type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredVolumeSnapshotClassInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SnapshotV1beta1().VolumeSnapshotClasses().List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SnapshotV1beta1().VolumeSnapshotClasses().Watch(context.TODO(), options) + }, + }, + &volumesnapshotv1beta1.VolumeSnapshotClass{}, + resyncPeriod, + indexers, + ) +} + +func (f *volumeSnapshotClassInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredVolumeSnapshotClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *volumeSnapshotClassInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&volumesnapshotv1beta1.VolumeSnapshotClass{}, f.defaultInformer) +} + +func (f *volumeSnapshotClassInformer) Lister() v1beta1.VolumeSnapshotClassLister { + return v1beta1.NewVolumeSnapshotClassLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotcontent.go new file mode 100644 index 00000000..5d1d0809 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot/v1beta1/volumesnapshotcontent.go @@ -0,0 +1,89 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + time "time" + + volumesnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + versioned "github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned" + internalinterfaces "github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/internalinterfaces" + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// VolumeSnapshotContentInformer provides access to a shared informer and lister for +// VolumeSnapshotContents. +type VolumeSnapshotContentInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.VolumeSnapshotContentLister +} + +type volumeSnapshotContentInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewVolumeSnapshotContentInformer constructs a new informer for VolumeSnapshotContent type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewVolumeSnapshotContentInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredVolumeSnapshotContentInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredVolumeSnapshotContentInformer constructs a new informer for VolumeSnapshotContent type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredVolumeSnapshotContentInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SnapshotV1beta1().VolumeSnapshotContents().List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SnapshotV1beta1().VolumeSnapshotContents().Watch(context.TODO(), options) + }, + }, + &volumesnapshotv1beta1.VolumeSnapshotContent{}, + resyncPeriod, + indexers, + ) +} + +func (f *volumeSnapshotContentInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredVolumeSnapshotContentInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *volumeSnapshotContentInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&volumesnapshotv1beta1.VolumeSnapshotContent{}, f.defaultInformer) +} + +func (f *volumeSnapshotContentInformer) Lister() v1beta1.VolumeSnapshotContentLister { + return v1beta1.NewVolumeSnapshotContentLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1/expansion_generated.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1/expansion_generated.go new file mode 100644 index 00000000..bf276021 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1/expansion_generated.go @@ -0,0 +1,35 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +// VolumeSnapshotListerExpansion allows custom methods to be added to +// VolumeSnapshotLister. +type VolumeSnapshotListerExpansion interface{} + +// VolumeSnapshotNamespaceListerExpansion allows custom methods to be added to +// VolumeSnapshotNamespaceLister. +type VolumeSnapshotNamespaceListerExpansion interface{} + +// VolumeSnapshotClassListerExpansion allows custom methods to be added to +// VolumeSnapshotClassLister. +type VolumeSnapshotClassListerExpansion interface{} + +// VolumeSnapshotContentListerExpansion allows custom methods to be added to +// VolumeSnapshotContentLister. +type VolumeSnapshotContentListerExpansion interface{} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1/volumesnapshot.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1/volumesnapshot.go new file mode 100644 index 00000000..d449ae4d --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1/volumesnapshot.go @@ -0,0 +1,94 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// VolumeSnapshotLister helps list VolumeSnapshots. +type VolumeSnapshotLister interface { + // List lists all VolumeSnapshots in the indexer. + List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshot, err error) + // VolumeSnapshots returns an object that can list and get VolumeSnapshots. + VolumeSnapshots(namespace string) VolumeSnapshotNamespaceLister + VolumeSnapshotListerExpansion +} + +// volumeSnapshotLister implements the VolumeSnapshotLister interface. +type volumeSnapshotLister struct { + indexer cache.Indexer +} + +// NewVolumeSnapshotLister returns a new VolumeSnapshotLister. +func NewVolumeSnapshotLister(indexer cache.Indexer) VolumeSnapshotLister { + return &volumeSnapshotLister{indexer: indexer} +} + +// List lists all VolumeSnapshots in the indexer. +func (s *volumeSnapshotLister) List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshot, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.VolumeSnapshot)) + }) + return ret, err +} + +// VolumeSnapshots returns an object that can list and get VolumeSnapshots. +func (s *volumeSnapshotLister) VolumeSnapshots(namespace string) VolumeSnapshotNamespaceLister { + return volumeSnapshotNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// VolumeSnapshotNamespaceLister helps list and get VolumeSnapshots. +type VolumeSnapshotNamespaceLister interface { + // List lists all VolumeSnapshots in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshot, err error) + // Get retrieves the VolumeSnapshot from the indexer for a given namespace and name. + Get(name string) (*v1beta1.VolumeSnapshot, error) + VolumeSnapshotNamespaceListerExpansion +} + +// volumeSnapshotNamespaceLister implements the VolumeSnapshotNamespaceLister +// interface. +type volumeSnapshotNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all VolumeSnapshots in the indexer for a given namespace. +func (s volumeSnapshotNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshot, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.VolumeSnapshot)) + }) + return ret, err +} + +// Get retrieves the VolumeSnapshot from the indexer for a given namespace and name. +func (s volumeSnapshotNamespaceLister) Get(name string) (*v1beta1.VolumeSnapshot, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("volumesnapshot"), name) + } + return obj.(*v1beta1.VolumeSnapshot), nil +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1/volumesnapshotclass.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1/volumesnapshotclass.go new file mode 100644 index 00000000..26d5d8fa --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1/volumesnapshotclass.go @@ -0,0 +1,65 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// VolumeSnapshotClassLister helps list VolumeSnapshotClasses. +type VolumeSnapshotClassLister interface { + // List lists all VolumeSnapshotClasses in the indexer. + List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshotClass, err error) + // Get retrieves the VolumeSnapshotClass from the index for a given name. + Get(name string) (*v1beta1.VolumeSnapshotClass, error) + VolumeSnapshotClassListerExpansion +} + +// volumeSnapshotClassLister implements the VolumeSnapshotClassLister interface. +type volumeSnapshotClassLister struct { + indexer cache.Indexer +} + +// NewVolumeSnapshotClassLister returns a new VolumeSnapshotClassLister. +func NewVolumeSnapshotClassLister(indexer cache.Indexer) VolumeSnapshotClassLister { + return &volumeSnapshotClassLister{indexer: indexer} +} + +// List lists all VolumeSnapshotClasses in the indexer. +func (s *volumeSnapshotClassLister) List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshotClass, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.VolumeSnapshotClass)) + }) + return ret, err +} + +// Get retrieves the VolumeSnapshotClass from the index for a given name. +func (s *volumeSnapshotClassLister) Get(name string) (*v1beta1.VolumeSnapshotClass, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("volumesnapshotclass"), name) + } + return obj.(*v1beta1.VolumeSnapshotClass), nil +} diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1/volumesnapshotcontent.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1/volumesnapshotcontent.go new file mode 100644 index 00000000..2d516d85 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1/volumesnapshotcontent.go @@ -0,0 +1,65 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// VolumeSnapshotContentLister helps list VolumeSnapshotContents. +type VolumeSnapshotContentLister interface { + // List lists all VolumeSnapshotContents in the indexer. + List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshotContent, err error) + // Get retrieves the VolumeSnapshotContent from the index for a given name. + Get(name string) (*v1beta1.VolumeSnapshotContent, error) + VolumeSnapshotContentListerExpansion +} + +// volumeSnapshotContentLister implements the VolumeSnapshotContentLister interface. +type volumeSnapshotContentLister struct { + indexer cache.Indexer +} + +// NewVolumeSnapshotContentLister returns a new VolumeSnapshotContentLister. +func NewVolumeSnapshotContentLister(indexer cache.Indexer) VolumeSnapshotContentLister { + return &volumeSnapshotContentLister{indexer: indexer} +} + +// List lists all VolumeSnapshotContents in the indexer. +func (s *volumeSnapshotContentLister) List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshotContent, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.VolumeSnapshotContent)) + }) + return ret, err +} + +// Get retrieves the VolumeSnapshotContent from the index for a given name. +func (s *volumeSnapshotContentLister) Get(name string) (*v1beta1.VolumeSnapshotContent, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("volumesnapshotcontent"), name) + } + return obj.(*v1beta1.VolumeSnapshotContent), nil +} diff --git a/vendor/golang.org/x/oauth2/README.md b/vendor/golang.org/x/oauth2/README.md index 0f443e69..8cfd6063 100644 --- a/vendor/golang.org/x/oauth2/README.md +++ b/vendor/golang.org/x/oauth2/README.md @@ -16,15 +16,16 @@ Or you can manually git clone the repository to See godoc for further documentation and examples. -* [godoc.org/golang.org/x/oauth2](http://godoc.org/golang.org/x/oauth2) -* [godoc.org/golang.org/x/oauth2/google](http://godoc.org/golang.org/x/oauth2/google) +* [godoc.org/golang.org/x/oauth2](https://godoc.org/golang.org/x/oauth2) +* [godoc.org/golang.org/x/oauth2/google](https://godoc.org/golang.org/x/oauth2/google) ## Policy for new packages -We no longer accept new provider-specific packages in this repo. For -defining provider endpoints and provider-specific OAuth2 behavior, we -encourage you to create packages elsewhere. We'll keep the existing -packages for compatibility. +We no longer accept new provider-specific packages in this repo if all +they do is add a single endpoint variable. If you just want to add a +single endpoint, add it to the +[godoc.org/golang.org/x/oauth2/endpoints](https://godoc.org/golang.org/x/oauth2/endpoints) +package. ## Report Issues / Send Patches diff --git a/vendor/golang.org/x/time/rate/rate.go b/vendor/golang.org/x/time/rate/rate.go index 563f7042..a114b1aa 100644 --- a/vendor/golang.org/x/time/rate/rate.go +++ b/vendor/golang.org/x/time/rate/rate.go @@ -196,7 +196,7 @@ func (lim *Limiter) Reserve() *Reservation { // ReserveN returns a Reservation that indicates how long the caller must wait before n events happen. // The Limiter takes this Reservation into account when allowing future events. -// ReserveN returns false if n exceeds the Limiter's burst size. +// The returned Reservation’s OK() method returns false if n exceeds the Limiter's burst size. // Usage example: // r := lim.ReserveN(time.Now(), 1) // if !r.OK() { diff --git a/vendor/modules.txt b/vendor/modules.txt index 15fa3917..a88ffd01 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -71,6 +71,18 @@ github.com/kubernetes-csi/csi-lib-utils/rpc # github.com/kubernetes-csi/csi-test v2.0.0+incompatible github.com/kubernetes-csi/csi-test/driver github.com/kubernetes-csi/csi-test/utils +# github.com/kubernetes-csi/external-snapshotter/client/v2 v2.0.0-00010101000000-000000000000 => ./client +github.com/kubernetes-csi/external-snapshotter/client/v2/apis/volumesnapshot/v1beta1 +github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned +github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/fake +github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/scheme +github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1 +github.com/kubernetes-csi/external-snapshotter/client/v2/clientset/versioned/typed/volumesnapshot/v1beta1/fake +github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions +github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/internalinterfaces +github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot +github.com/kubernetes-csi/external-snapshotter/client/v2/informers/externalversions/volumesnapshot/v1beta1 +github.com/kubernetes-csi/external-snapshotter/client/v2/listers/volumesnapshot/v1beta1 # github.com/mailru/easyjson v0.7.0 github.com/mailru/easyjson/buffer github.com/mailru/easyjson/jlexer @@ -110,7 +122,7 @@ golang.org/x/net/http2/hpack golang.org/x/net/idna golang.org/x/net/internal/timeseries golang.org/x/net/trace -# golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 +# golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d golang.org/x/oauth2 golang.org/x/oauth2/internal # golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 @@ -123,7 +135,7 @@ golang.org/x/text/transform golang.org/x/text/unicode/bidi golang.org/x/text/unicode/norm golang.org/x/text/width -# golang.org/x/time v0.0.0-20191024005414-555d28b269f0 +# golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 golang.org/x/time/rate # golang.org/x/tools v0.0.0-20200602230032-c00d67ef29d0 golang.org/x/tools/go/ast/astutil