diff --git a/Makefile b/Makefile index 98897a7f9..e01871d76 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ default: install .PHONY: test test: - go test ./v2/... + go test ./cmd/... ./pkg/... .PHONY: install install: build @@ -38,7 +38,7 @@ install: build @echo "GOOS: $(GOOS)" @echo "GOARCH: $(GOARCH)" @echo "ARCH: $(ARCH)" - go install ./v2/cmd/apiserver-boot + go install ./cmd/apiserver-boot .PHONY: clean clean: @@ -47,7 +47,7 @@ clean: .PHONY: build build: clean ## Create release artefacts for darwin:amd64, linux:amd64 and windows:amd64. Requires etcd, glide, hg. mkdir -p bin - go build -o bin/apiserver-boot ./v2/cmd/apiserver-boot + go build -o bin/apiserver-boot ./cmd/apiserver-boot release-binary: mkdir -p bin @@ -59,6 +59,6 @@ release-binary: -X 'sigs.k8s.io/apiserver-builder-alpha/cmd/apiserver-boot/boot/version.apiserverBuilderVersion=${VERSION}' \ -X 'sigs.k8s.io/apiserver-builder-alpha/cmd/apiserver-boot/boot/version.gitCommit=${COMMIT}' \ " \ - -o bin/apiserver-boot ./v2/cmd/apiserver-boot + -o bin/apiserver-boot ./cmd/apiserver-boot tar czvf apiserver-boot-${GOOS}-${GOARCH}.tar.gz bin/apiserver-boot diff --git a/v2/cmd/apiserver-boot/main.go b/cmd/apiserver-boot/main.go similarity index 87% rename from v2/cmd/apiserver-boot/main.go rename to cmd/apiserver-boot/main.go index 59ce7512b..8d2128fbe 100644 --- a/v2/cmd/apiserver-boot/main.go +++ b/cmd/apiserver-boot/main.go @@ -19,12 +19,12 @@ package main import ( "github.com/spf13/cobra" "k8s.io/klog/v2" - "sigs.k8s.io/apiserver-builder-alpha/v2/pkg/boot/build" - "sigs.k8s.io/apiserver-builder-alpha/v2/pkg/boot/create" - "sigs.k8s.io/apiserver-builder-alpha/v2/pkg/boot/init_repo" - "sigs.k8s.io/apiserver-builder-alpha/v2/pkg/boot/run" - "sigs.k8s.io/apiserver-builder-alpha/v2/pkg/boot/show" - "sigs.k8s.io/apiserver-builder-alpha/v2/pkg/boot/version" + "sigs.k8s.io/apiserver-builder-alpha/pkg/boot/build" + "sigs.k8s.io/apiserver-builder-alpha/pkg/boot/create" + "sigs.k8s.io/apiserver-builder-alpha/pkg/boot/init_repo" + "sigs.k8s.io/apiserver-builder-alpha/pkg/boot/run" + "sigs.k8s.io/apiserver-builder-alpha/pkg/boot/show" + "sigs.k8s.io/apiserver-builder-alpha/pkg/boot/version" ) func main() { diff --git a/v2/pkg/boot/build/build.go b/pkg/boot/build/build.go similarity index 100% rename from v2/pkg/boot/build/build.go rename to pkg/boot/build/build.go diff --git a/v2/pkg/boot/build/build_container.go b/pkg/boot/build/build_container.go similarity index 98% rename from v2/pkg/boot/build/build_container.go rename to pkg/boot/build/build_container.go index d91a39ecf..c009549ca 100644 --- a/v2/pkg/boot/build/build_container.go +++ b/pkg/boot/build/build_container.go @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" "io/ioutil" "k8s.io/klog/v2" - "sigs.k8s.io/apiserver-builder-alpha/v2/pkg/boot/util" + "sigs.k8s.io/apiserver-builder-alpha/pkg/boot/util" ) var Image string diff --git a/v2/pkg/boot/build/build_executables.go b/pkg/boot/build/build_executables.go similarity index 100% rename from v2/pkg/boot/build/build_executables.go rename to pkg/boot/build/build_executables.go diff --git a/v2/pkg/boot/build/build_resource_config.go b/pkg/boot/build/build_resource_config.go similarity index 99% rename from v2/pkg/boot/build/build_resource_config.go rename to pkg/boot/build/build_resource_config.go index c1dfd004d..b166f7486 100644 --- a/v2/pkg/boot/build/build_resource_config.go +++ b/pkg/boot/build/build_resource_config.go @@ -31,7 +31,7 @@ import ( "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/klog/v2" - "sigs.k8s.io/apiserver-builder-alpha/v2/pkg/boot/util" + "sigs.k8s.io/apiserver-builder-alpha/pkg/boot/util" ) var Name, Namespace string diff --git a/v2/pkg/boot/build/docs.go b/pkg/boot/build/docs.go similarity index 100% rename from v2/pkg/boot/build/docs.go rename to pkg/boot/build/docs.go diff --git a/v2/pkg/boot/build/util.go b/pkg/boot/build/util.go similarity index 100% rename from v2/pkg/boot/build/util.go rename to pkg/boot/build/util.go diff --git a/v2/pkg/boot/create/create.go b/pkg/boot/create/create.go similarity index 100% rename from v2/pkg/boot/create/create.go rename to pkg/boot/create/create.go diff --git a/v2/pkg/boot/create/group.go b/pkg/boot/create/group.go similarity index 97% rename from v2/pkg/boot/create/group.go rename to pkg/boot/create/group.go index 2e04d5b84..abdc9caf3 100644 --- a/v2/pkg/boot/create/group.go +++ b/pkg/boot/create/group.go @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" "k8s.io/klog/v2" - "sigs.k8s.io/apiserver-builder-alpha/v2/pkg/boot/util" + "sigs.k8s.io/apiserver-builder-alpha/pkg/boot/util" ) var createGroupCmd = &cobra.Command{ diff --git a/v2/pkg/boot/create/resource.go b/pkg/boot/create/resource.go similarity index 99% rename from v2/pkg/boot/create/resource.go rename to pkg/boot/create/resource.go index c4389ed00..c10bb39e8 100644 --- a/v2/pkg/boot/create/resource.go +++ b/pkg/boot/create/resource.go @@ -27,7 +27,7 @@ import ( "github.com/spf13/afero" "github.com/spf13/cobra" "k8s.io/klog/v2" - "sigs.k8s.io/apiserver-builder-alpha/v2/pkg/boot/util" + "sigs.k8s.io/apiserver-builder-alpha/pkg/boot/util" config "sigs.k8s.io/kubebuilder/v3/pkg/config/v3" "sigs.k8s.io/kubebuilder/v3/pkg/machinery" "sigs.k8s.io/kubebuilder/v3/pkg/model/resource" diff --git a/v2/pkg/boot/create/subresource.go b/pkg/boot/create/subresource.go similarity index 99% rename from v2/pkg/boot/create/subresource.go rename to pkg/boot/create/subresource.go index edf660cb0..16a65d297 100644 --- a/v2/pkg/boot/create/subresource.go +++ b/pkg/boot/create/subresource.go @@ -27,7 +27,7 @@ import ( "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/klog/v2" - "sigs.k8s.io/apiserver-builder-alpha/v2/pkg/boot/util" + "sigs.k8s.io/apiserver-builder-alpha/pkg/boot/util" ) var subresourceName string diff --git a/v2/pkg/boot/create/util.go b/pkg/boot/create/util.go similarity index 98% rename from v2/pkg/boot/create/util.go rename to pkg/boot/create/util.go index 6ba266634..91210234d 100644 --- a/v2/pkg/boot/create/util.go +++ b/pkg/boot/create/util.go @@ -29,7 +29,7 @@ import ( "github.com/spf13/cobra" utilvalidation "k8s.io/apimachinery/pkg/util/validation" "k8s.io/klog/v2" - "sigs.k8s.io/apiserver-builder-alpha/v2/pkg/boot/util" + "sigs.k8s.io/apiserver-builder-alpha/pkg/boot/util" ) func ValidateResourceFlags() { diff --git a/v2/pkg/boot/create/version.go b/pkg/boot/create/version.go similarity index 98% rename from v2/pkg/boot/create/version.go rename to pkg/boot/create/version.go index feaa4e3fd..f5146297d 100644 --- a/v2/pkg/boot/create/version.go +++ b/pkg/boot/create/version.go @@ -24,7 +24,7 @@ import ( "github.com/spf13/cobra" "k8s.io/klog/v2" - "sigs.k8s.io/apiserver-builder-alpha/v2/pkg/boot/util" + "sigs.k8s.io/apiserver-builder-alpha/pkg/boot/util" ) var versionName string diff --git a/v2/pkg/boot/init_repo/init.go b/pkg/boot/init_repo/init.go similarity index 100% rename from v2/pkg/boot/init_repo/init.go rename to pkg/boot/init_repo/init.go diff --git a/v2/pkg/boot/init_repo/repo.go b/pkg/boot/init_repo/repo.go similarity index 98% rename from v2/pkg/boot/init_repo/repo.go rename to pkg/boot/init_repo/repo.go index 6cc85fe4f..e6ae07732 100644 --- a/v2/pkg/boot/init_repo/repo.go +++ b/pkg/boot/init_repo/repo.go @@ -23,7 +23,7 @@ import ( "github.com/spf13/afero" "github.com/spf13/cobra" "k8s.io/klog/v2" - "sigs.k8s.io/apiserver-builder-alpha/v2/pkg/boot/util" + "sigs.k8s.io/apiserver-builder-alpha/pkg/boot/util" config "sigs.k8s.io/kubebuilder/v3/pkg/config/v3" "sigs.k8s.io/kubebuilder/v3/pkg/machinery" "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v3/scaffolds" diff --git a/v2/pkg/boot/init_repo/template.go b/pkg/boot/init_repo/template.go similarity index 100% rename from v2/pkg/boot/init_repo/template.go rename to pkg/boot/init_repo/template.go diff --git a/v2/pkg/boot/init_repo/templates/api.doc.tpl b/pkg/boot/init_repo/templates/api.doc.tpl similarity index 100% rename from v2/pkg/boot/init_repo/templates/api.doc.tpl rename to pkg/boot/init_repo/templates/api.doc.tpl diff --git a/v2/pkg/boot/init_repo/templates/apiserver.tpl b/pkg/boot/init_repo/templates/apiserver.tpl similarity index 100% rename from v2/pkg/boot/init_repo/templates/apiserver.tpl rename to pkg/boot/init_repo/templates/apiserver.tpl diff --git a/v2/pkg/boot/init_repo/templates/go.mod.tpl b/pkg/boot/init_repo/templates/go.mod.tpl similarity index 100% rename from v2/pkg/boot/init_repo/templates/go.mod.tpl rename to pkg/boot/init_repo/templates/go.mod.tpl diff --git a/v2/pkg/boot/init_repo/templates/package.doc.tpl b/pkg/boot/init_repo/templates/package.doc.tpl similarity index 100% rename from v2/pkg/boot/init_repo/templates/package.doc.tpl rename to pkg/boot/init_repo/templates/package.doc.tpl diff --git a/v2/pkg/boot/run/in_cluster.go b/pkg/boot/run/in_cluster.go similarity index 95% rename from v2/pkg/boot/run/in_cluster.go rename to pkg/boot/run/in_cluster.go index 4cf757537..a8526cad4 100644 --- a/v2/pkg/boot/run/in_cluster.go +++ b/pkg/boot/run/in_cluster.go @@ -21,8 +21,8 @@ import ( "github.com/spf13/cobra" - "sigs.k8s.io/apiserver-builder-alpha/v2/pkg/boot/build" - "sigs.k8s.io/apiserver-builder-alpha/v2/pkg/boot/util" + "sigs.k8s.io/apiserver-builder-alpha/pkg/boot/build" + "sigs.k8s.io/apiserver-builder-alpha/pkg/boot/util" ) var runInClusterCmd = &cobra.Command{ diff --git a/v2/pkg/boot/run/local.go b/pkg/boot/run/local.go similarity index 98% rename from v2/pkg/boot/run/local.go rename to pkg/boot/run/local.go index 925f8e7f0..d602c5481 100644 --- a/v2/pkg/boot/run/local.go +++ b/pkg/boot/run/local.go @@ -29,8 +29,8 @@ import ( "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/klog/v2" - "sigs.k8s.io/apiserver-builder-alpha/v2/pkg/boot/build" - "sigs.k8s.io/apiserver-builder-alpha/v2/pkg/boot/util" + "sigs.k8s.io/apiserver-builder-alpha/pkg/boot/build" + "sigs.k8s.io/apiserver-builder-alpha/pkg/boot/util" ) var localCmd = &cobra.Command{ diff --git a/v2/pkg/boot/run/run.go b/pkg/boot/run/run.go similarity index 100% rename from v2/pkg/boot/run/run.go rename to pkg/boot/run/run.go diff --git a/v2/pkg/boot/show/cmd.go b/pkg/boot/show/cmd.go similarity index 100% rename from v2/pkg/boot/show/cmd.go rename to pkg/boot/show/cmd.go diff --git a/v2/pkg/boot/show/cmd_apiserver.go b/pkg/boot/show/cmd_apiserver.go similarity index 99% rename from v2/pkg/boot/show/cmd_apiserver.go rename to pkg/boot/show/cmd_apiserver.go index a72297337..2c1af910a 100644 --- a/v2/pkg/boot/show/cmd_apiserver.go +++ b/pkg/boot/show/cmd_apiserver.go @@ -14,7 +14,7 @@ import ( "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" - "sigs.k8s.io/apiserver-builder-alpha/v2/pkg/utils" + "sigs.k8s.io/apiserver-builder-alpha/pkg/utils" ) var showApiserverCmd = &cobra.Command{ diff --git a/v2/pkg/boot/show/cmd_resource.go b/pkg/boot/show/cmd_resource.go similarity index 99% rename from v2/pkg/boot/show/cmd_resource.go rename to pkg/boot/show/cmd_resource.go index cc4950393..97bdd62e3 100644 --- a/v2/pkg/boot/show/cmd_resource.go +++ b/pkg/boot/show/cmd_resource.go @@ -20,7 +20,7 @@ import ( "k8s.io/client-go/kubernetes" apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset" - "sigs.k8s.io/apiserver-builder-alpha/v2/pkg/utils" + "sigs.k8s.io/apiserver-builder-alpha/pkg/utils" ) var showResourceCmd = &cobra.Command{ diff --git a/v2/pkg/boot/util/repo.go b/pkg/boot/util/repo.go similarity index 100% rename from v2/pkg/boot/util/repo.go rename to pkg/boot/util/repo.go diff --git a/v2/pkg/boot/util/untar.go b/pkg/boot/util/untar.go similarity index 100% rename from v2/pkg/boot/util/untar.go rename to pkg/boot/util/untar.go diff --git a/v2/pkg/boot/util/util.go b/pkg/boot/util/util.go similarity index 100% rename from v2/pkg/boot/util/util.go rename to pkg/boot/util/util.go diff --git a/v2/pkg/boot/util/x509.go b/pkg/boot/util/x509.go similarity index 100% rename from v2/pkg/boot/util/x509.go rename to pkg/boot/util/x509.go diff --git a/v2/pkg/boot/version/version.go b/pkg/boot/version/version.go similarity index 100% rename from v2/pkg/boot/version/version.go rename to pkg/boot/version/version.go diff --git a/v2/pkg/utils/portforward.go b/pkg/utils/portforward.go similarity index 100% rename from v2/pkg/utils/portforward.go rename to pkg/utils/portforward.go diff --git a/v2/pkg/utils/prefixwriter.go b/pkg/utils/prefixwriter.go similarity index 100% rename from v2/pkg/utils/prefixwriter.go rename to pkg/utils/prefixwriter.go