From 3f6ce817f73e5eda8ff12c832bf3ce19fed02659 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Tue, 7 May 2024 09:37:22 +0200 Subject: [PATCH] Move project under `sigs.k8s.io` namespace Projects from Kubernetes SIGs should live under to `sigs.k8s.io` go module namespace. We now apply that to cri-tools and adapt the import paths. Signed-off-by: Sascha Grunert --- Makefile | 2 +- cmd/crictl/config.go | 2 +- cmd/crictl/main.go | 6 +++--- cmd/critest/cri_test.go | 10 +++++----- docs/developer-guide.md | 2 +- go.mod | 2 +- hack/release.sh | 2 +- pkg/benchmark/container.go | 2 +- pkg/benchmark/image.go | 2 +- pkg/benchmark/pod.go | 4 ++-- pkg/benchmark/pod_container.go | 4 ++-- pkg/framework/util.go | 2 +- pkg/validate/apparmor_linux.go | 2 +- pkg/validate/consts.go | 2 +- pkg/validate/container.go | 2 +- pkg/validate/container_linux.go | 2 +- pkg/validate/image.go | 2 +- pkg/validate/multi_container_linux.go | 4 ++-- pkg/validate/networking.go | 4 ++-- pkg/validate/pod.go | 4 ++-- pkg/validate/pod_linux.go | 4 ++-- pkg/validate/runtime_info.go | 2 +- pkg/validate/security_context_linux.go | 4 ++-- pkg/validate/selinux_linux.go | 2 +- pkg/validate/streaming.go | 2 +- pkg/validate/streaming_linux.go | 2 +- test/e2e/suite_test.go | 2 +- 27 files changed, 40 insertions(+), 40 deletions(-) diff --git a/Makefile b/Makefile index 18dc4ba6ff..f877fda07c 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ export GO_BUILD=GOARCH=$(GOARCH) GOOS=$(GOOS) $(GO) build export GO_TEST=GOARCH=$(GOARCH) GOOS=$(GOOS) $(GO) test endif -PROJECT := github.com/kubernetes-sigs/cri-tools +PROJECT := sigs.k8s.io/cri-tools BINDIR ?= /usr/local/bin VERSION ?= $(shell git describe --tags --dirty --always | sed 's/^v//') diff --git a/cmd/crictl/config.go b/cmd/crictl/config.go index 1c3d2859eb..227b166187 100644 --- a/cmd/crictl/config.go +++ b/cmd/crictl/config.go @@ -24,7 +24,7 @@ import ( "github.com/urfave/cli/v2" - "github.com/kubernetes-sigs/cri-tools/pkg/common" + "sigs.k8s.io/cri-tools/pkg/common" ) var configCommand = &cli.Command{ diff --git a/cmd/crictl/main.go b/cmd/crictl/main.go index 1c68d35017..506b34db96 100644 --- a/cmd/crictl/main.go +++ b/cmd/crictl/main.go @@ -34,9 +34,9 @@ import ( internalapi "k8s.io/cri-api/pkg/apis" "k8s.io/kubernetes/pkg/kubelet/cri/remote" - "github.com/kubernetes-sigs/cri-tools/pkg/common" - "github.com/kubernetes-sigs/cri-tools/pkg/tracing" - "github.com/kubernetes-sigs/cri-tools/pkg/version" + "sigs.k8s.io/cri-tools/pkg/common" + "sigs.k8s.io/cri-tools/pkg/tracing" + "sigs.k8s.io/cri-tools/pkg/version" ) const defaultTimeout = 2 * time.Second diff --git a/cmd/critest/cri_test.go b/cmd/critest/cri_test.go index 078787d25a..82a4dbc0cd 100644 --- a/cmd/critest/cri_test.go +++ b/cmd/critest/cri_test.go @@ -30,11 +30,11 @@ import ( ginkgotypes "github.com/onsi/ginkgo/v2/types" "github.com/onsi/gomega" - _ "github.com/kubernetes-sigs/cri-tools/pkg/benchmark" - "github.com/kubernetes-sigs/cri-tools/pkg/common" - "github.com/kubernetes-sigs/cri-tools/pkg/framework" - _ "github.com/kubernetes-sigs/cri-tools/pkg/validate" - versionconst "github.com/kubernetes-sigs/cri-tools/pkg/version" + _ "sigs.k8s.io/cri-tools/pkg/benchmark" + "sigs.k8s.io/cri-tools/pkg/common" + "sigs.k8s.io/cri-tools/pkg/framework" + _ "sigs.k8s.io/cri-tools/pkg/validate" + versionconst "sigs.k8s.io/cri-tools/pkg/version" ) const ( diff --git a/docs/developer-guide.md b/docs/developer-guide.md index 3f25739bdb..81da8d170c 100644 --- a/docs/developer-guide.md +++ b/docs/developer-guide.md @@ -13,7 +13,7 @@ Start with the following guide to setup pre-requisites: - [Go](https://golang.org/doc/install) - [Build tools](https://github.com/containerd/cri#install-dependencies) -_**Important Note**: `Go` dependencies tend to follow the GitHub project URL path structure, i.e. when installing and trying to use `cri-tools` locally, it should be installed under a folder structure as follows `go/src/github.com/kubernetes-sigs/cri-tools`. Kubernetes is the only exception which does not follow this structure for legacy reasons._ +_**Important Note**: `Go` dependencies tend to follow the GitHub project URL path structure, i.e. when installing and trying to use `cri-tools` locally, it should be installed under a folder structure as follows `go/src/sigs.k8s.io/cri-tools`. Kubernetes is the only exception which does not follow this structure for legacy reasons._ Ensure the following after following the setup: diff --git a/go.mod b/go.mod index ceca3a1546..15365d793c 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/kubernetes-sigs/cri-tools +module sigs.k8s.io/cri-tools go 1.22.0 diff --git a/hack/release.sh b/hack/release.sh index 3e3e581537..e5d00f3e32 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -46,7 +46,7 @@ CRI_TEST_PLATFORMS=( ) # Create releases output directory. -PROJECT="github.com/kubernetes-sigs/cri-tools" +PROJECT="sigs.k8s.io/cri-tools" CRI_TOOLS_ROOT="$GOPATH/src/$PROJECT" OUTPUTDIR=$CRI_TOOLS_ROOT/_output/releases mkdir -p "$OUTPUTDIR" diff --git a/pkg/benchmark/container.go b/pkg/benchmark/container.go index 104536cc91..4be2e72714 100644 --- a/pkg/benchmark/container.go +++ b/pkg/benchmark/container.go @@ -22,10 +22,10 @@ import ( "path" "time" - "github.com/kubernetes-sigs/cri-tools/pkg/framework" "github.com/sirupsen/logrus" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "sigs.k8s.io/cri-tools/pkg/framework" . "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega/gmeasure" diff --git a/pkg/benchmark/image.go b/pkg/benchmark/image.go index b4f49c2938..c0d85f071b 100644 --- a/pkg/benchmark/image.go +++ b/pkg/benchmark/image.go @@ -23,10 +23,10 @@ import ( "runtime" "time" - "github.com/kubernetes-sigs/cri-tools/pkg/framework" "github.com/sirupsen/logrus" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "sigs.k8s.io/cri-tools/pkg/framework" . "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega/gmeasure" diff --git a/pkg/benchmark/pod.go b/pkg/benchmark/pod.go index 913cbfc360..bc9bede969 100644 --- a/pkg/benchmark/pod.go +++ b/pkg/benchmark/pod.go @@ -22,11 +22,11 @@ import ( "path" "time" - "github.com/kubernetes-sigs/cri-tools/pkg/common" - "github.com/kubernetes-sigs/cri-tools/pkg/framework" "github.com/sirupsen/logrus" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "sigs.k8s.io/cri-tools/pkg/common" + "sigs.k8s.io/cri-tools/pkg/framework" . "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega/gmeasure" diff --git a/pkg/benchmark/pod_container.go b/pkg/benchmark/pod_container.go index 0160225ebb..5444b768e7 100644 --- a/pkg/benchmark/pod_container.go +++ b/pkg/benchmark/pod_container.go @@ -19,10 +19,10 @@ package benchmark import ( "context" - "github.com/kubernetes-sigs/cri-tools/pkg/common" - "github.com/kubernetes-sigs/cri-tools/pkg/framework" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "sigs.k8s.io/cri-tools/pkg/common" + "sigs.k8s.io/cri-tools/pkg/framework" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/pkg/framework/util.go b/pkg/framework/util.go index 9e7213915f..5db5cfab35 100644 --- a/pkg/framework/util.go +++ b/pkg/framework/util.go @@ -26,11 +26,11 @@ import ( "github.com/distribution/reference" "github.com/google/uuid" - "github.com/kubernetes-sigs/cri-tools/pkg/common" "gopkg.in/yaml.v3" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" "k8s.io/kubernetes/pkg/kubelet/cri/remote" + "sigs.k8s.io/cri-tools/pkg/common" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/pkg/validate/apparmor_linux.go b/pkg/validate/apparmor_linux.go index c63d891d46..339ac6dd68 100644 --- a/pkg/validate/apparmor_linux.go +++ b/pkg/validate/apparmor_linux.go @@ -24,11 +24,11 @@ import ( "os/exec" "time" - "github.com/kubernetes-sigs/cri-tools/pkg/framework" "github.com/opencontainers/runc/libcontainer/apparmor" "github.com/sirupsen/logrus" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "sigs.k8s.io/cri-tools/pkg/framework" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/pkg/validate/consts.go b/pkg/validate/consts.go index 8df1d0a6eb..6a04b3b94f 100644 --- a/pkg/validate/consts.go +++ b/pkg/validate/consts.go @@ -19,8 +19,8 @@ package validate import ( "runtime" - "github.com/kubernetes-sigs/cri-tools/pkg/framework" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "sigs.k8s.io/cri-tools/pkg/framework" ) // Container test constants diff --git a/pkg/validate/container.go b/pkg/validate/container.go index 81a752e40b..9c33a8a1ed 100644 --- a/pkg/validate/container.go +++ b/pkg/validate/container.go @@ -27,9 +27,9 @@ import ( "strings" "time" - "github.com/kubernetes-sigs/cri-tools/pkg/framework" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "sigs.k8s.io/cri-tools/pkg/framework" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/pkg/validate/container_linux.go b/pkg/validate/container_linux.go index 69253d9903..fcf6171465 100644 --- a/pkg/validate/container_linux.go +++ b/pkg/validate/container_linux.go @@ -23,10 +23,10 @@ import ( "path/filepath" "time" - "github.com/kubernetes-sigs/cri-tools/pkg/framework" "golang.org/x/sys/unix" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "sigs.k8s.io/cri-tools/pkg/framework" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/pkg/validate/image.go b/pkg/validate/image.go index 84e8d0ea89..68b02f3193 100644 --- a/pkg/validate/image.go +++ b/pkg/validate/image.go @@ -22,9 +22,9 @@ import ( "runtime" "sort" - "github.com/kubernetes-sigs/cri-tools/pkg/framework" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "sigs.k8s.io/cri-tools/pkg/framework" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/pkg/validate/multi_container_linux.go b/pkg/validate/multi_container_linux.go index 671e630695..3a7331e454 100644 --- a/pkg/validate/multi_container_linux.go +++ b/pkg/validate/multi_container_linux.go @@ -23,10 +23,10 @@ import ( "strings" "time" - "github.com/kubernetes-sigs/cri-tools/pkg/common" - "github.com/kubernetes-sigs/cri-tools/pkg/framework" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "sigs.k8s.io/cri-tools/pkg/common" + "sigs.k8s.io/cri-tools/pkg/framework" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/pkg/validate/networking.go b/pkg/validate/networking.go index fba7359a91..eb5c9447a3 100644 --- a/pkg/validate/networking.go +++ b/pkg/validate/networking.go @@ -23,10 +23,10 @@ import ( "strings" "time" - "github.com/kubernetes-sigs/cri-tools/pkg/common" - "github.com/kubernetes-sigs/cri-tools/pkg/framework" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "sigs.k8s.io/cri-tools/pkg/common" + "sigs.k8s.io/cri-tools/pkg/framework" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/pkg/validate/pod.go b/pkg/validate/pod.go index 5c66e583a8..1d610455a0 100644 --- a/pkg/validate/pod.go +++ b/pkg/validate/pod.go @@ -21,10 +21,10 @@ import ( "os" "path/filepath" - "github.com/kubernetes-sigs/cri-tools/pkg/common" - "github.com/kubernetes-sigs/cri-tools/pkg/framework" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "sigs.k8s.io/cri-tools/pkg/common" + "sigs.k8s.io/cri-tools/pkg/framework" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/pkg/validate/pod_linux.go b/pkg/validate/pod_linux.go index 2c1b2149b0..84c3dedf05 100644 --- a/pkg/validate/pod_linux.go +++ b/pkg/validate/pod_linux.go @@ -21,10 +21,10 @@ import ( "strings" "time" - "github.com/kubernetes-sigs/cri-tools/pkg/common" - "github.com/kubernetes-sigs/cri-tools/pkg/framework" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "sigs.k8s.io/cri-tools/pkg/common" + "sigs.k8s.io/cri-tools/pkg/framework" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/pkg/validate/runtime_info.go b/pkg/validate/runtime_info.go index 4717db5ab3..719d8591e6 100644 --- a/pkg/validate/runtime_info.go +++ b/pkg/validate/runtime_info.go @@ -19,9 +19,9 @@ package validate import ( "context" - "github.com/kubernetes-sigs/cri-tools/pkg/framework" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "sigs.k8s.io/cri-tools/pkg/framework" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/pkg/validate/security_context_linux.go b/pkg/validate/security_context_linux.go index b46387d02c..2fc786a970 100644 --- a/pkg/validate/security_context_linux.go +++ b/pkg/validate/security_context_linux.go @@ -26,10 +26,10 @@ import ( "strings" "time" - "github.com/kubernetes-sigs/cri-tools/pkg/common" - "github.com/kubernetes-sigs/cri-tools/pkg/framework" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "sigs.k8s.io/cri-tools/pkg/common" + "sigs.k8s.io/cri-tools/pkg/framework" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/pkg/validate/selinux_linux.go b/pkg/validate/selinux_linux.go index 9c9eb1b088..fae6385d0e 100644 --- a/pkg/validate/selinux_linux.go +++ b/pkg/validate/selinux_linux.go @@ -22,10 +22,10 @@ import ( "strings" "time" - "github.com/kubernetes-sigs/cri-tools/pkg/framework" selinux "github.com/opencontainers/selinux/go-selinux" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "sigs.k8s.io/cri-tools/pkg/framework" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/pkg/validate/streaming.go b/pkg/validate/streaming.go index 0c86b98e21..8a7f50f4cc 100644 --- a/pkg/validate/streaming.go +++ b/pkg/validate/streaming.go @@ -28,13 +28,13 @@ import ( "sync" "time" - "github.com/kubernetes-sigs/cri-tools/pkg/framework" "k8s.io/client-go/rest" "k8s.io/client-go/tools/portforward" remoteclient "k8s.io/client-go/tools/remotecommand" "k8s.io/client-go/transport/spdy" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "sigs.k8s.io/cri-tools/pkg/framework" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/pkg/validate/streaming_linux.go b/pkg/validate/streaming_linux.go index 6ead0b4928..81a3d2ba5d 100644 --- a/pkg/validate/streaming_linux.go +++ b/pkg/validate/streaming_linux.go @@ -19,9 +19,9 @@ package validate import ( "context" - "github.com/kubernetes-sigs/cri-tools/pkg/framework" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" + "sigs.k8s.io/cri-tools/pkg/framework" . "github.com/onsi/ginkgo/v2" ) diff --git a/test/e2e/suite_test.go b/test/e2e/suite_test.go index 02ab87ebbc..069b146f84 100644 --- a/test/e2e/suite_test.go +++ b/test/e2e/suite_test.go @@ -19,9 +19,9 @@ package e2e import ( "testing" - . "github.com/kubernetes-sigs/cri-tools/test/framework" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" + . "sigs.k8s.io/cri-tools/test/framework" ) // TestE2E runs the created specs