From 76d90478f5cb4f125c8e0a6b33092b3b047468ce Mon Sep 17 00:00:00 2001 From: iwilltry42 Date: Thu, 18 Jun 2020 07:35:00 +0200 Subject: [PATCH] Go Module: use v3 for go module compatibility --- Makefile | 2 +- README.md | 2 +- cmd/create/createCluster.go | 12 ++++++------ cmd/create/createNode.go | 10 +++++----- cmd/delete/deleteCluster.go | 8 ++++---- cmd/delete/deleteNode.go | 8 ++++---- cmd/get/getCluster.go | 8 ++++---- cmd/get/getKubeconfig.go | 8 ++++---- cmd/get/getNode.go | 8 ++++---- cmd/load/loadImage.go | 8 ++++---- cmd/root.go | 16 ++++++++-------- cmd/start/startCluster.go | 10 +++++----- cmd/start/startNode.go | 6 +++--- cmd/stop/stopCluster.go | 8 ++++---- cmd/stop/stopNode.go | 6 +++--- cmd/util/completion.go | 6 +++--- cmd/util/filter.go | 2 +- cmd/util/ports.go | 2 +- cmd/util/volumes.go | 2 +- go.mod | 2 +- main.go | 2 +- pkg/cluster/cluster.go | 10 +++++----- pkg/cluster/clusterName.go | 2 +- pkg/cluster/kubeconfig.go | 4 ++-- pkg/cluster/loadbalancer.go | 4 ++-- pkg/cluster/node.go | 4 ++-- pkg/runtimes/containerd/kubeconfig.go | 2 +- pkg/runtimes/containerd/node.go | 2 +- pkg/runtimes/containerd/util.go | 2 +- pkg/runtimes/docker/container.go | 2 +- pkg/runtimes/docker/kubeconfig.go | 2 +- pkg/runtimes/docker/network.go | 2 +- pkg/runtimes/docker/node.go | 2 +- pkg/runtimes/docker/translate.go | 2 +- pkg/runtimes/docker/translate_test.go | 2 +- pkg/runtimes/docker/util.go | 2 +- pkg/runtimes/docker/volume.go | 2 +- pkg/runtimes/runtime.go | 6 +++--- pkg/tools/tools.go | 6 +++--- pkg/types/types.go | 4 ++-- 40 files changed, 99 insertions(+), 99 deletions(-) diff --git a/Makefile b/Makefile index 37dfb147..c9b5f677 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,7 @@ PKG := $(shell go mod vendor) TAGS := TESTS := . TESTFLAGS := -LDFLAGS := -w -s -X github.com/rancher/k3d/version.Version=${GIT_TAG} -X github.com/rancher/k3d/version.K3sVersion=${K3S_TAG} +LDFLAGS := -w -s -X github.com/rancher/k3d/v3/version.Version=${GIT_TAG} -X github.com/rancher/k3d/v3/version.K3sVersion=${K3S_TAG} GCFLAGS := GOFLAGS := BINDIR := $(CURDIR)/bin diff --git a/README.md b/README.md index f6f074f3..1bbdab6d 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ or... ## Build -1. Clone this repo, e.g. via `go get -u github.com/rancher/k3d` +1. Clone this repo, e.g. via `git clone git@github.com:rancher/k3d.git` or `go get github.com/rancher/k3d/v3@master` 2. Inside the repo run - 'make install-tools' to make sure required go packages are installed 3. Inside the repo run one of the following commands diff --git a/cmd/create/createCluster.go b/cmd/create/createCluster.go index 006fa877..39134de0 100644 --- a/cmd/create/createCluster.go +++ b/cmd/create/createCluster.go @@ -30,12 +30,12 @@ import ( "github.com/spf13/cobra" - cliutil "github.com/rancher/k3d/cmd/util" - "github.com/rancher/k3d/pkg/cluster" - k3dCluster "github.com/rancher/k3d/pkg/cluster" - "github.com/rancher/k3d/pkg/runtimes" - k3d "github.com/rancher/k3d/pkg/types" - "github.com/rancher/k3d/version" + cliutil "github.com/rancher/k3d/v3/cmd/util" + "github.com/rancher/k3d/v3/pkg/cluster" + k3dCluster "github.com/rancher/k3d/v3/pkg/cluster" + "github.com/rancher/k3d/v3/pkg/runtimes" + k3d "github.com/rancher/k3d/v3/pkg/types" + "github.com/rancher/k3d/v3/version" log "github.com/sirupsen/logrus" ) diff --git a/cmd/create/createNode.go b/cmd/create/createNode.go index 1326de44..9bdb8e47 100644 --- a/cmd/create/createNode.go +++ b/cmd/create/createNode.go @@ -27,11 +27,11 @@ import ( "github.com/spf13/cobra" - "github.com/rancher/k3d/cmd/util" - k3dc "github.com/rancher/k3d/pkg/cluster" - "github.com/rancher/k3d/pkg/runtimes" - k3d "github.com/rancher/k3d/pkg/types" - "github.com/rancher/k3d/version" + "github.com/rancher/k3d/v3/cmd/util" + k3dc "github.com/rancher/k3d/v3/pkg/cluster" + "github.com/rancher/k3d/v3/pkg/runtimes" + k3d "github.com/rancher/k3d/v3/pkg/types" + "github.com/rancher/k3d/v3/version" log "github.com/sirupsen/logrus" ) diff --git a/cmd/delete/deleteCluster.go b/cmd/delete/deleteCluster.go index 9edf42a4..ed7bb73f 100644 --- a/cmd/delete/deleteCluster.go +++ b/cmd/delete/deleteCluster.go @@ -22,10 +22,10 @@ THE SOFTWARE. package delete import ( - "github.com/rancher/k3d/cmd/util" - "github.com/rancher/k3d/pkg/cluster" - "github.com/rancher/k3d/pkg/runtimes" - k3d "github.com/rancher/k3d/pkg/types" + "github.com/rancher/k3d/v3/cmd/util" + "github.com/rancher/k3d/v3/pkg/cluster" + "github.com/rancher/k3d/v3/pkg/runtimes" + k3d "github.com/rancher/k3d/v3/pkg/types" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" diff --git a/cmd/delete/deleteNode.go b/cmd/delete/deleteNode.go index 783080c2..6fa443f7 100644 --- a/cmd/delete/deleteNode.go +++ b/cmd/delete/deleteNode.go @@ -22,10 +22,10 @@ THE SOFTWARE. package delete import ( - "github.com/rancher/k3d/cmd/util" - "github.com/rancher/k3d/pkg/cluster" - "github.com/rancher/k3d/pkg/runtimes" - k3d "github.com/rancher/k3d/pkg/types" + "github.com/rancher/k3d/v3/cmd/util" + "github.com/rancher/k3d/v3/pkg/cluster" + "github.com/rancher/k3d/v3/pkg/runtimes" + k3d "github.com/rancher/k3d/v3/pkg/types" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) diff --git a/cmd/get/getCluster.go b/cmd/get/getCluster.go index 0249c1bd..c838b134 100644 --- a/cmd/get/getCluster.go +++ b/cmd/get/getCluster.go @@ -27,10 +27,10 @@ import ( "os" "strings" - "github.com/rancher/k3d/cmd/util" - k3cluster "github.com/rancher/k3d/pkg/cluster" - "github.com/rancher/k3d/pkg/runtimes" - k3d "github.com/rancher/k3d/pkg/types" + "github.com/rancher/k3d/v3/cmd/util" + k3cluster "github.com/rancher/k3d/v3/pkg/cluster" + "github.com/rancher/k3d/v3/pkg/runtimes" + k3d "github.com/rancher/k3d/v3/pkg/types" "github.com/spf13/cobra" log "github.com/sirupsen/logrus" diff --git a/cmd/get/getKubeconfig.go b/cmd/get/getKubeconfig.go index 29287801..8865c217 100644 --- a/cmd/get/getKubeconfig.go +++ b/cmd/get/getKubeconfig.go @@ -25,10 +25,10 @@ import ( "fmt" "os" - "github.com/rancher/k3d/cmd/util" - "github.com/rancher/k3d/pkg/cluster" - "github.com/rancher/k3d/pkg/runtimes" - k3d "github.com/rancher/k3d/pkg/types" + "github.com/rancher/k3d/v3/cmd/util" + "github.com/rancher/k3d/v3/pkg/cluster" + "github.com/rancher/k3d/v3/pkg/runtimes" + k3d "github.com/rancher/k3d/v3/pkg/types" "github.com/spf13/cobra" "k8s.io/client-go/tools/clientcmd" diff --git a/cmd/get/getNode.go b/cmd/get/getNode.go index 35db3bb3..811b4354 100644 --- a/cmd/get/getNode.go +++ b/cmd/get/getNode.go @@ -28,10 +28,10 @@ import ( "strings" "github.com/liggitt/tabwriter" - "github.com/rancher/k3d/cmd/util" - "github.com/rancher/k3d/pkg/cluster" - "github.com/rancher/k3d/pkg/runtimes" - k3d "github.com/rancher/k3d/pkg/types" + "github.com/rancher/k3d/v3/cmd/util" + "github.com/rancher/k3d/v3/pkg/cluster" + "github.com/rancher/k3d/v3/pkg/runtimes" + k3d "github.com/rancher/k3d/v3/pkg/types" "github.com/spf13/cobra" log "github.com/sirupsen/logrus" diff --git a/cmd/load/loadImage.go b/cmd/load/loadImage.go index c89fcaaa..213aa841 100644 --- a/cmd/load/loadImage.go +++ b/cmd/load/loadImage.go @@ -24,10 +24,10 @@ package load import ( "github.com/spf13/cobra" - "github.com/rancher/k3d/cmd/util" - "github.com/rancher/k3d/pkg/runtimes" - "github.com/rancher/k3d/pkg/tools" - k3d "github.com/rancher/k3d/pkg/types" + "github.com/rancher/k3d/v3/cmd/util" + "github.com/rancher/k3d/v3/pkg/runtimes" + "github.com/rancher/k3d/v3/pkg/tools" + k3d "github.com/rancher/k3d/v3/pkg/types" log "github.com/sirupsen/logrus" ) diff --git a/cmd/root.go b/cmd/root.go index dd742a3a..5c357718 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -30,14 +30,14 @@ import ( "github.com/spf13/cobra" - "github.com/rancher/k3d/cmd/create" - "github.com/rancher/k3d/cmd/delete" - "github.com/rancher/k3d/cmd/get" - "github.com/rancher/k3d/cmd/load" - "github.com/rancher/k3d/cmd/start" - "github.com/rancher/k3d/cmd/stop" - "github.com/rancher/k3d/pkg/runtimes" - "github.com/rancher/k3d/version" + "github.com/rancher/k3d/v3/cmd/create" + "github.com/rancher/k3d/v3/cmd/delete" + "github.com/rancher/k3d/v3/cmd/get" + "github.com/rancher/k3d/v3/cmd/load" + "github.com/rancher/k3d/v3/cmd/start" + "github.com/rancher/k3d/v3/cmd/stop" + "github.com/rancher/k3d/v3/pkg/runtimes" + "github.com/rancher/k3d/v3/version" log "github.com/sirupsen/logrus" "github.com/sirupsen/logrus/hooks/writer" diff --git a/cmd/start/startCluster.go b/cmd/start/startCluster.go index b55646ac..6c50faba 100644 --- a/cmd/start/startCluster.go +++ b/cmd/start/startCluster.go @@ -24,13 +24,13 @@ package start import ( "time" - "github.com/rancher/k3d/cmd/util" - "github.com/rancher/k3d/pkg/cluster" - "github.com/rancher/k3d/pkg/runtimes" - "github.com/rancher/k3d/pkg/types" + "github.com/rancher/k3d/v3/cmd/util" + "github.com/rancher/k3d/v3/pkg/cluster" + "github.com/rancher/k3d/v3/pkg/runtimes" + "github.com/rancher/k3d/v3/pkg/types" "github.com/spf13/cobra" - k3d "github.com/rancher/k3d/pkg/types" + k3d "github.com/rancher/k3d/v3/pkg/types" log "github.com/sirupsen/logrus" ) diff --git a/cmd/start/startNode.go b/cmd/start/startNode.go index 365898ca..2ee474d0 100644 --- a/cmd/start/startNode.go +++ b/cmd/start/startNode.go @@ -22,9 +22,9 @@ THE SOFTWARE. package start import ( - "github.com/rancher/k3d/cmd/util" - "github.com/rancher/k3d/pkg/runtimes" - k3d "github.com/rancher/k3d/pkg/types" + "github.com/rancher/k3d/v3/cmd/util" + "github.com/rancher/k3d/v3/pkg/runtimes" + k3d "github.com/rancher/k3d/v3/pkg/types" "github.com/spf13/cobra" log "github.com/sirupsen/logrus" diff --git a/cmd/stop/stopCluster.go b/cmd/stop/stopCluster.go index 3bbd9314..5a91fb9f 100644 --- a/cmd/stop/stopCluster.go +++ b/cmd/stop/stopCluster.go @@ -24,10 +24,10 @@ package stop import ( "github.com/spf13/cobra" - "github.com/rancher/k3d/cmd/util" - "github.com/rancher/k3d/pkg/cluster" - "github.com/rancher/k3d/pkg/runtimes" - k3d "github.com/rancher/k3d/pkg/types" + "github.com/rancher/k3d/v3/cmd/util" + "github.com/rancher/k3d/v3/pkg/cluster" + "github.com/rancher/k3d/v3/pkg/runtimes" + k3d "github.com/rancher/k3d/v3/pkg/types" log "github.com/sirupsen/logrus" ) diff --git a/cmd/stop/stopNode.go b/cmd/stop/stopNode.go index 91581e3a..3d9938a6 100644 --- a/cmd/stop/stopNode.go +++ b/cmd/stop/stopNode.go @@ -22,11 +22,11 @@ THE SOFTWARE. package stop import ( - "github.com/rancher/k3d/cmd/util" - "github.com/rancher/k3d/pkg/runtimes" + "github.com/rancher/k3d/v3/cmd/util" + "github.com/rancher/k3d/v3/pkg/runtimes" "github.com/spf13/cobra" - k3d "github.com/rancher/k3d/pkg/types" + k3d "github.com/rancher/k3d/v3/pkg/types" log "github.com/sirupsen/logrus" ) diff --git a/cmd/util/completion.go b/cmd/util/completion.go index ae13f447..02e536dc 100644 --- a/cmd/util/completion.go +++ b/cmd/util/completion.go @@ -25,9 +25,9 @@ import ( "context" "strings" - k3dcluster "github.com/rancher/k3d/pkg/cluster" - "github.com/rancher/k3d/pkg/runtimes" - k3d "github.com/rancher/k3d/pkg/types" + k3dcluster "github.com/rancher/k3d/v3/pkg/cluster" + "github.com/rancher/k3d/v3/pkg/runtimes" + k3d "github.com/rancher/k3d/v3/pkg/types" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) diff --git a/cmd/util/filter.go b/cmd/util/filter.go index 5f62091e..d4c8b275 100644 --- a/cmd/util/filter.go +++ b/cmd/util/filter.go @@ -28,7 +28,7 @@ import ( log "github.com/sirupsen/logrus" - k3d "github.com/rancher/k3d/pkg/types" + k3d "github.com/rancher/k3d/v3/pkg/types" "regexp" ) diff --git a/cmd/util/ports.go b/cmd/util/ports.go index 1728b784..db87ea41 100644 --- a/cmd/util/ports.go +++ b/cmd/util/ports.go @@ -27,7 +27,7 @@ import ( "strconv" "strings" - k3d "github.com/rancher/k3d/pkg/types" + k3d "github.com/rancher/k3d/v3/pkg/types" log "github.com/sirupsen/logrus" ) diff --git a/cmd/util/volumes.go b/cmd/util/volumes.go index 874c4d5f..1cc1956e 100644 --- a/cmd/util/volumes.go +++ b/cmd/util/volumes.go @@ -26,7 +26,7 @@ import ( "os" "strings" - "github.com/rancher/k3d/pkg/runtimes" + "github.com/rancher/k3d/v3/pkg/runtimes" log "github.com/sirupsen/logrus" ) diff --git a/go.mod b/go.mod index 0d502a95..24423b2f 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/rancher/k3d +module github.com/rancher/k3d/v3 go 1.14 diff --git a/main.go b/main.go index 9f66edf7..c4a3e25f 100644 --- a/main.go +++ b/main.go @@ -21,7 +21,7 @@ THE SOFTWARE. */ package main -import "github.com/rancher/k3d/cmd" +import "github.com/rancher/k3d/v3/cmd" func main() { cmd.Execute() diff --git a/pkg/cluster/cluster.go b/pkg/cluster/cluster.go index c4f4bfbc..8d9003e9 100644 --- a/pkg/cluster/cluster.go +++ b/pkg/cluster/cluster.go @@ -31,10 +31,10 @@ import ( "time" "github.com/imdario/mergo" - k3drt "github.com/rancher/k3d/pkg/runtimes" - "github.com/rancher/k3d/pkg/types" - k3d "github.com/rancher/k3d/pkg/types" - "github.com/rancher/k3d/pkg/util" + k3drt "github.com/rancher/k3d/v3/pkg/runtimes" + "github.com/rancher/k3d/v3/pkg/types" + k3d "github.com/rancher/k3d/v3/pkg/types" + "github.com/rancher/k3d/v3/pkg/util" log "github.com/sirupsen/logrus" "golang.org/x/sync/errgroup" ) @@ -290,7 +290,7 @@ func CreateCluster(ctx context.Context, runtime k3drt.Runtime, cluster *k3d.Clus // Create LB as a modified node with loadbalancerRole lbNode := &k3d.Node{ Name: fmt.Sprintf("%s-%s-masterlb", k3d.DefaultObjectNamePrefix, cluster.Name), - Image: k3d.DefaultLBImage, + Image: k3d.DefaultLBImageRepo, Ports: append(cluster.MasterLoadBalancer.Ports, fmt.Sprintf("%s:%s:%s/tcp", cluster.ExposeAPI.Host, cluster.ExposeAPI.Port, k3d.DefaultAPIPort)), Env: []string{ fmt.Sprintf("SERVERS=%s", servers), diff --git a/pkg/cluster/clusterName.go b/pkg/cluster/clusterName.go index b191ee45..bbb26a76 100644 --- a/pkg/cluster/clusterName.go +++ b/pkg/cluster/clusterName.go @@ -24,7 +24,7 @@ package cluster import ( "fmt" - "github.com/rancher/k3d/pkg/types" + "github.com/rancher/k3d/v3/pkg/types" ) // CheckName ensures that a cluster name is also a valid host name according to RFC 1123. diff --git a/pkg/cluster/kubeconfig.go b/pkg/cluster/kubeconfig.go index c0c2d9bc..ce59d5f5 100644 --- a/pkg/cluster/kubeconfig.go +++ b/pkg/cluster/kubeconfig.go @@ -30,8 +30,8 @@ import ( "path" "time" - "github.com/rancher/k3d/pkg/runtimes" - k3d "github.com/rancher/k3d/pkg/types" + "github.com/rancher/k3d/v3/pkg/runtimes" + k3d "github.com/rancher/k3d/v3/pkg/types" log "github.com/sirupsen/logrus" "k8s.io/client-go/tools/clientcmd" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" diff --git a/pkg/cluster/loadbalancer.go b/pkg/cluster/loadbalancer.go index 75c4ecb6..081a9720 100644 --- a/pkg/cluster/loadbalancer.go +++ b/pkg/cluster/loadbalancer.go @@ -26,8 +26,8 @@ import ( "fmt" "strings" - "github.com/rancher/k3d/pkg/runtimes" - k3d "github.com/rancher/k3d/pkg/types" + "github.com/rancher/k3d/v3/pkg/runtimes" + k3d "github.com/rancher/k3d/v3/pkg/types" log "github.com/sirupsen/logrus" ) diff --git a/pkg/cluster/node.go b/pkg/cluster/node.go index ea3b8913..24cc5a96 100644 --- a/pkg/cluster/node.go +++ b/pkg/cluster/node.go @@ -30,8 +30,8 @@ import ( "time" "github.com/imdario/mergo" - "github.com/rancher/k3d/pkg/runtimes" - k3d "github.com/rancher/k3d/pkg/types" + "github.com/rancher/k3d/v3/pkg/runtimes" + k3d "github.com/rancher/k3d/v3/pkg/types" log "github.com/sirupsen/logrus" "golang.org/x/sync/errgroup" ) diff --git a/pkg/runtimes/containerd/kubeconfig.go b/pkg/runtimes/containerd/kubeconfig.go index 2faa3e96..683a0810 100644 --- a/pkg/runtimes/containerd/kubeconfig.go +++ b/pkg/runtimes/containerd/kubeconfig.go @@ -26,7 +26,7 @@ import ( "context" "io" - k3d "github.com/rancher/k3d/pkg/types" + k3d "github.com/rancher/k3d/v3/pkg/types" ) // GetKubeconfig grabs the kubeconfig from inside a k3d node diff --git a/pkg/runtimes/containerd/node.go b/pkg/runtimes/containerd/node.go index 582fc0bc..c947c08c 100644 --- a/pkg/runtimes/containerd/node.go +++ b/pkg/runtimes/containerd/node.go @@ -29,7 +29,7 @@ import ( "github.com/containerd/containerd" "github.com/containerd/containerd/containers" - k3d "github.com/rancher/k3d/pkg/types" + k3d "github.com/rancher/k3d/v3/pkg/types" log "github.com/sirupsen/logrus" ) diff --git a/pkg/runtimes/containerd/util.go b/pkg/runtimes/containerd/util.go index c5ab228d..db7ff8d8 100644 --- a/pkg/runtimes/containerd/util.go +++ b/pkg/runtimes/containerd/util.go @@ -24,7 +24,7 @@ package containerd import ( "context" - k3d "github.com/rancher/k3d/pkg/types" + k3d "github.com/rancher/k3d/v3/pkg/types" ) // CopyToNode copies a file from the local FS to the selected node diff --git a/pkg/runtimes/docker/container.go b/pkg/runtimes/docker/container.go index 3c18e73c..593ef41d 100644 --- a/pkg/runtimes/docker/container.go +++ b/pkg/runtimes/docker/container.go @@ -33,7 +33,7 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/client" - k3d "github.com/rancher/k3d/pkg/types" + k3d "github.com/rancher/k3d/v3/pkg/types" log "github.com/sirupsen/logrus" ) diff --git a/pkg/runtimes/docker/kubeconfig.go b/pkg/runtimes/docker/kubeconfig.go index 8d6ff606..361384cd 100644 --- a/pkg/runtimes/docker/kubeconfig.go +++ b/pkg/runtimes/docker/kubeconfig.go @@ -27,7 +27,7 @@ import ( "io" "github.com/docker/docker/client" - k3d "github.com/rancher/k3d/pkg/types" + k3d "github.com/rancher/k3d/v3/pkg/types" log "github.com/sirupsen/logrus" ) diff --git a/pkg/runtimes/docker/network.go b/pkg/runtimes/docker/network.go index 63ccd6e7..7815aa93 100644 --- a/pkg/runtimes/docker/network.go +++ b/pkg/runtimes/docker/network.go @@ -28,7 +28,7 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/docker/docker/client" - k3d "github.com/rancher/k3d/pkg/types" + k3d "github.com/rancher/k3d/v3/pkg/types" log "github.com/sirupsen/logrus" ) diff --git a/pkg/runtimes/docker/node.go b/pkg/runtimes/docker/node.go index 46fdb009..0321a5cf 100644 --- a/pkg/runtimes/docker/node.go +++ b/pkg/runtimes/docker/node.go @@ -32,7 +32,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/client" - k3d "github.com/rancher/k3d/pkg/types" + k3d "github.com/rancher/k3d/v3/pkg/types" log "github.com/sirupsen/logrus" ) diff --git a/pkg/runtimes/docker/translate.go b/pkg/runtimes/docker/translate.go index 881dd781..273e7c17 100644 --- a/pkg/runtimes/docker/translate.go +++ b/pkg/runtimes/docker/translate.go @@ -31,7 +31,7 @@ import ( docker "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/network" "github.com/docker/go-connections/nat" - k3d "github.com/rancher/k3d/pkg/types" + k3d "github.com/rancher/k3d/v3/pkg/types" log "github.com/sirupsen/logrus" ) diff --git a/pkg/runtimes/docker/translate_test.go b/pkg/runtimes/docker/translate_test.go index 31184def..7ba900a4 100644 --- a/pkg/runtimes/docker/translate_test.go +++ b/pkg/runtimes/docker/translate_test.go @@ -30,7 +30,7 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/network" "github.com/docker/go-connections/nat" - k3d "github.com/rancher/k3d/pkg/types" + k3d "github.com/rancher/k3d/v3/pkg/types" ) func TestTranslateNodeToContainer(t *testing.T) { diff --git a/pkg/runtimes/docker/util.go b/pkg/runtimes/docker/util.go index 026f858c..757b27a2 100644 --- a/pkg/runtimes/docker/util.go +++ b/pkg/runtimes/docker/util.go @@ -29,7 +29,7 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/docker/docker/client" "github.com/docker/docker/pkg/archive" - k3d "github.com/rancher/k3d/pkg/types" + k3d "github.com/rancher/k3d/v3/pkg/types" log "github.com/sirupsen/logrus" ) diff --git a/pkg/runtimes/docker/volume.go b/pkg/runtimes/docker/volume.go index 4294c6b0..9203ad69 100644 --- a/pkg/runtimes/docker/volume.go +++ b/pkg/runtimes/docker/volume.go @@ -28,7 +28,7 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/volume" "github.com/docker/docker/client" - k3d "github.com/rancher/k3d/pkg/types" + k3d "github.com/rancher/k3d/v3/pkg/types" log "github.com/sirupsen/logrus" ) diff --git a/pkg/runtimes/runtime.go b/pkg/runtimes/runtime.go index 23d3820d..e7456dc8 100644 --- a/pkg/runtimes/runtime.go +++ b/pkg/runtimes/runtime.go @@ -27,9 +27,9 @@ import ( "io" "time" - "github.com/rancher/k3d/pkg/runtimes/containerd" - "github.com/rancher/k3d/pkg/runtimes/docker" - k3d "github.com/rancher/k3d/pkg/types" + "github.com/rancher/k3d/v3/pkg/runtimes/containerd" + "github.com/rancher/k3d/v3/pkg/runtimes/docker" + k3d "github.com/rancher/k3d/v3/pkg/types" ) // SelectedRuntime is a runtime (pun intended) variable determining the selected runtime diff --git a/pkg/tools/tools.go b/pkg/tools/tools.go index 62ddbcf6..e9774f91 100644 --- a/pkg/tools/tools.go +++ b/pkg/tools/tools.go @@ -30,9 +30,9 @@ import ( "sync" "time" - k3dc "github.com/rancher/k3d/pkg/cluster" - "github.com/rancher/k3d/pkg/runtimes" - k3d "github.com/rancher/k3d/pkg/types" + k3dc "github.com/rancher/k3d/v3/pkg/cluster" + "github.com/rancher/k3d/v3/pkg/runtimes" + k3d "github.com/rancher/k3d/v3/pkg/types" log "github.com/sirupsen/logrus" ) diff --git a/pkg/types/types.go b/pkg/types/types.go index ef9f6b92..984e4e1c 100644 --- a/pkg/types/types.go +++ b/pkg/types/types.go @@ -38,8 +38,8 @@ const DefaultClusterNameMaxLength = 32 // DefaultK3sImageRepo specifies the default image repository for the used k3s image const DefaultK3sImageRepo = "docker.io/rancher/k3s" -// DefaultLBImage defines the default cluster load balancer image -const DefaultLBImage = "docker.io/iwilltry42/k3d-proxy:v0.0.3" +// DefaultLBImageRepo defines the default cluster load balancer image +const DefaultLBImageRepo = "docker.io/iwilltry42/k3d-proxy:v0.0.3" // DefaultObjectNamePrefix defines the name prefix for every object created by k3d const DefaultObjectNamePrefix = "k3d"