diff --git a/cmd/csi-attacher/main.go b/cmd/csi-attacher/main.go index ce5b1a4d79..1a5c69c3e6 100644 --- a/cmd/csi-attacher/main.go +++ b/cmd/csi-attacher/main.go @@ -36,8 +36,8 @@ import ( "github.com/kubernetes-csi/csi-lib-utils/leaderelection" "github.com/kubernetes-csi/csi-lib-utils/metrics" "github.com/kubernetes-csi/csi-lib-utils/rpc" - "github.com/kubernetes-csi/external-attacher/pkg/attacher" - "github.com/kubernetes-csi/external-attacher/pkg/controller" + "github.com/kubernetes-csi/external-attacher/v2/pkg/attacher" + "github.com/kubernetes-csi/external-attacher/v2/pkg/controller" "google.golang.org/grpc" ) diff --git a/go.mod b/go.mod index fb949a672d..5e1d74366c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ -module github.com/kubernetes-csi/external-attacher +module github.com/kubernetes-csi/external-attacher/v2 -go 1.12 +go 1.13 require ( github.com/container-storage-interface/spec v1.2.0 diff --git a/pkg/controller/csi_handler.go b/pkg/controller/csi_handler.go index 6e93a19529..2fc88d5d84 100644 --- a/pkg/controller/csi_handler.go +++ b/pkg/controller/csi_handler.go @@ -25,7 +25,7 @@ import ( "k8s.io/klog" - "github.com/kubernetes-csi/external-attacher/pkg/attacher" + "github.com/kubernetes-csi/external-attacher/v2/pkg/attacher" v1 "k8s.io/api/core/v1" storage "k8s.io/api/storage/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/controller/csi_handler_test.go b/pkg/controller/csi_handler_test.go index 00461f2c93..8f2d06ee70 100644 --- a/pkg/controller/csi_handler_test.go +++ b/pkg/controller/csi_handler_test.go @@ -22,7 +22,7 @@ import ( "testing" "time" - "github.com/kubernetes-csi/external-attacher/pkg/attacher" + "github.com/kubernetes-csi/external-attacher/v2/pkg/attacher" v1 "k8s.io/api/core/v1" storage "k8s.io/api/storage/v1beta1" diff --git a/pkg/controller/framework_test.go b/pkg/controller/framework_test.go index cc167327c9..3fe6aaf650 100644 --- a/pkg/controller/framework_test.go +++ b/pkg/controller/framework_test.go @@ -27,7 +27,7 @@ import ( "github.com/container-storage-interface/spec/lib/go/csi" "github.com/davecgh/go-spew/spew" - "github.com/kubernetes-csi/external-attacher/pkg/attacher" + "github.com/kubernetes-csi/external-attacher/v2/pkg/attacher" v1 "k8s.io/api/core/v1" storage "k8s.io/api/storage/v1beta1" diff --git a/pkg/controller/trivial_handler_test.go b/pkg/controller/trivial_handler_test.go index f21f2e05eb..dfdcfeecd3 100644 --- a/pkg/controller/trivial_handler_test.go +++ b/pkg/controller/trivial_handler_test.go @@ -20,7 +20,7 @@ import ( "errors" "testing" - "github.com/kubernetes-csi/external-attacher/pkg/attacher" + "github.com/kubernetes-csi/external-attacher/v2/pkg/attacher" storage "k8s.io/api/storage/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" diff --git a/v2/README.md b/v2/README.md new file mode 100644 index 0000000000..ebfe2544bf --- /dev/null +++ b/v2/README.md @@ -0,0 +1,18 @@ +This directory mirrors the source code via symlinks. +This makes it possible to vendor v2.x releases of +external-attacher 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-attacher in their Gopk.toml, like this: + +```toml +[prune] + go-tests = true + unused-packages = true + + [[prune.project]] + name = "github.com/kubernetes-csi/external-attacher" + unused-packages = false +``` diff --git a/v2/cmd/csi-attacher/main.go b/v2/cmd/csi-attacher/main.go new file mode 120000 index 0000000000..8b0581700e --- /dev/null +++ b/v2/cmd/csi-attacher/main.go @@ -0,0 +1 @@ +../../../cmd/csi-attacher/main.go \ No newline at end of file diff --git a/v2/pkg/attacher/attacher.go b/v2/pkg/attacher/attacher.go new file mode 120000 index 0000000000..41bfec0b98 --- /dev/null +++ b/v2/pkg/attacher/attacher.go @@ -0,0 +1 @@ +../../../pkg/attacher/attacher.go \ No newline at end of file diff --git a/v2/pkg/attacher/attacher_test.go b/v2/pkg/attacher/attacher_test.go new file mode 120000 index 0000000000..f03251c04c --- /dev/null +++ b/v2/pkg/attacher/attacher_test.go @@ -0,0 +1 @@ +../../../pkg/attacher/attacher_test.go \ No newline at end of file diff --git a/v2/pkg/attacher/lister.go b/v2/pkg/attacher/lister.go new file mode 120000 index 0000000000..c7d85ed385 --- /dev/null +++ b/v2/pkg/attacher/lister.go @@ -0,0 +1 @@ +../../../pkg/attacher/lister.go \ No newline at end of file diff --git a/v2/pkg/controller/controller.go b/v2/pkg/controller/controller.go new file mode 120000 index 0000000000..29bb71b727 --- /dev/null +++ b/v2/pkg/controller/controller.go @@ -0,0 +1 @@ +../../../pkg/controller/controller.go \ No newline at end of file diff --git a/v2/pkg/controller/controller_test.go b/v2/pkg/controller/controller_test.go new file mode 120000 index 0000000000..26f818ca0d --- /dev/null +++ b/v2/pkg/controller/controller_test.go @@ -0,0 +1 @@ +../../../pkg/controller/controller_test.go \ No newline at end of file diff --git a/v2/pkg/controller/csi_handler.go b/v2/pkg/controller/csi_handler.go new file mode 120000 index 0000000000..b0847b473a --- /dev/null +++ b/v2/pkg/controller/csi_handler.go @@ -0,0 +1 @@ +../../../pkg/controller/csi_handler.go \ No newline at end of file diff --git a/v2/pkg/controller/csi_handler_test.go b/v2/pkg/controller/csi_handler_test.go new file mode 120000 index 0000000000..caca87dda7 --- /dev/null +++ b/v2/pkg/controller/csi_handler_test.go @@ -0,0 +1 @@ +../../../pkg/controller/csi_handler_test.go \ No newline at end of file diff --git a/v2/pkg/controller/framework_test.go b/v2/pkg/controller/framework_test.go new file mode 120000 index 0000000000..5494f31869 --- /dev/null +++ b/v2/pkg/controller/framework_test.go @@ -0,0 +1 @@ +../../../pkg/controller/framework_test.go \ No newline at end of file diff --git a/v2/pkg/controller/trivial_handler.go b/v2/pkg/controller/trivial_handler.go new file mode 120000 index 0000000000..ac11b861a3 --- /dev/null +++ b/v2/pkg/controller/trivial_handler.go @@ -0,0 +1 @@ +../../../pkg/controller/trivial_handler.go \ No newline at end of file diff --git a/v2/pkg/controller/trivial_handler_test.go b/v2/pkg/controller/trivial_handler_test.go new file mode 120000 index 0000000000..32960d0f16 --- /dev/null +++ b/v2/pkg/controller/trivial_handler_test.go @@ -0,0 +1 @@ +../../../pkg/controller/trivial_handler_test.go \ No newline at end of file diff --git a/v2/pkg/controller/util.go b/v2/pkg/controller/util.go new file mode 120000 index 0000000000..1d7316a35b --- /dev/null +++ b/v2/pkg/controller/util.go @@ -0,0 +1 @@ +../../../pkg/controller/util.go \ No newline at end of file diff --git a/v2/pkg/controller/util_test.go b/v2/pkg/controller/util_test.go new file mode 120000 index 0000000000..3003fba62b --- /dev/null +++ b/v2/pkg/controller/util_test.go @@ -0,0 +1 @@ +../../../pkg/controller/util_test.go \ No newline at end of file