migrate to module rancher/k3d/v5
This commit is contained in:
parent
5aa1edfb73
commit
7073a8fad7
4
Makefile
4
Makefile
@ -65,7 +65,7 @@ PKG := $(shell go mod vendor)
|
||||
TAGS :=
|
||||
TESTS := ./...
|
||||
TESTFLAGS :=
|
||||
LDFLAGS := -w -s -X github.com/rancher/k3d/v4/version.Version=${GIT_TAG} -X github.com/rancher/k3d/v4/version.K3sVersion=${K3S_TAG}
|
||||
LDFLAGS := -w -s -X github.com/rancher/k3d/v5/version.Version=${GIT_TAG} -X github.com/rancher/k3d/v5/version.K3sVersion=${K3S_TAG}
|
||||
GCFLAGS :=
|
||||
GOFLAGS :=
|
||||
BINDIR := $(CURDIR)/bin
|
||||
@ -74,7 +74,7 @@ BINARIES := k3d
|
||||
# Set version of the k3d helper images for build
|
||||
ifneq ($(K3D_HELPER_VERSION),)
|
||||
$(info [INFO] Helper Image version set to ${K3D_HELPER_VERSION})
|
||||
LDFLAGS += -X github.com/rancher/k3d/v4/version.HelperVersionOverride=${K3D_HELPER_VERSION}
|
||||
LDFLAGS += -X github.com/rancher/k3d/v5/version.HelperVersionOverride=${K3D_HELPER_VERSION}
|
||||
endif
|
||||
|
||||
# Rules for finding all go source files using 'DIRS' and 'REC_DIRS'
|
||||
|
@ -4,7 +4,7 @@
|
||||
[](./LICENSE.md)
|
||||

|
||||
|
||||
[](https://pkg.go.dev/github.com/rancher/k3d/v4)
|
||||
[](https://pkg.go.dev/github.com/rancher/k3d/v5)
|
||||
[](./go.mod)
|
||||
[](https://goreportcard.com/report/github.com/rancher/k3d)
|
||||
|
||||
@ -69,7 +69,7 @@ or...
|
||||
|
||||
## Build
|
||||
|
||||
1. Clone this repo, e.g. via `git clone git@github.com:rancher/k3d.git` or `go get github.com/rancher/k3d/v4@main`
|
||||
1. Clone this repo, e.g. via `git clone git@github.com:rancher/k3d.git` or `go get github.com/rancher/k3d/v5@main`
|
||||
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
|
||||
|
@ -22,7 +22,7 @@ THE SOFTWARE.
|
||||
package cluster
|
||||
|
||||
import (
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -37,15 +37,15 @@ import (
|
||||
"github.com/spf13/viper"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
cliutil "github.com/rancher/k3d/v4/cmd/util"
|
||||
cliconfig "github.com/rancher/k3d/v4/cmd/util/config"
|
||||
k3dCluster "github.com/rancher/k3d/v4/pkg/client"
|
||||
"github.com/rancher/k3d/v4/pkg/config"
|
||||
conf "github.com/rancher/k3d/v4/pkg/config/v1alpha3"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v4/version"
|
||||
cliutil "github.com/rancher/k3d/v5/cmd/util"
|
||||
cliconfig "github.com/rancher/k3d/v5/cmd/util/config"
|
||||
k3dCluster "github.com/rancher/k3d/v5/pkg/client"
|
||||
"github.com/rancher/k3d/v5/pkg/config"
|
||||
conf "github.com/rancher/k3d/v5/pkg/config/v1alpha3"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/rancher/k3d/v5/version"
|
||||
)
|
||||
|
||||
var configFile string
|
||||
|
@ -26,13 +26,13 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"github.com/rancher/k3d/v4/cmd/util"
|
||||
cliconfig "github.com/rancher/k3d/v4/cmd/util/config"
|
||||
"github.com/rancher/k3d/v4/pkg/client"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
k3dutil "github.com/rancher/k3d/v4/pkg/util"
|
||||
"github.com/rancher/k3d/v5/cmd/util"
|
||||
cliconfig "github.com/rancher/k3d/v5/cmd/util/config"
|
||||
"github.com/rancher/k3d/v5/pkg/client"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
k3dutil "github.com/rancher/k3d/v5/pkg/util"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
@ -22,13 +22,13 @@ THE SOFTWARE.
|
||||
package cluster
|
||||
|
||||
import (
|
||||
"github.com/rancher/k3d/v4/cmd/util"
|
||||
cliutil "github.com/rancher/k3d/v4/cmd/util"
|
||||
"github.com/rancher/k3d/v4/pkg/client"
|
||||
conf "github.com/rancher/k3d/v4/pkg/config/v1alpha3"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v5/cmd/util"
|
||||
cliutil "github.com/rancher/k3d/v5/cmd/util"
|
||||
"github.com/rancher/k3d/v5/pkg/client"
|
||||
conf "github.com/rancher/k3d/v5/pkg/config/v1alpha3"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
@ -28,11 +28,11 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/rancher/k3d/v4/cmd/util"
|
||||
k3cluster "github.com/rancher/k3d/v4/pkg/client"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v5/cmd/util"
|
||||
k3cluster "github.com/rancher/k3d/v5/pkg/client"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/spf13/cobra"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
|
@ -24,14 +24,14 @@ package cluster
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/rancher/k3d/v4/cmd/util"
|
||||
"github.com/rancher/k3d/v4/pkg/client"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
"github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v5/cmd/util"
|
||||
"github.com/rancher/k3d/v5/pkg/client"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
"github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
)
|
||||
|
||||
// NewCmdClusterStart returns a new cobra command
|
||||
|
@ -24,11 +24,11 @@ package cluster
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/rancher/k3d/v4/cmd/util"
|
||||
"github.com/rancher/k3d/v4/pkg/client"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v5/cmd/util"
|
||||
"github.com/rancher/k3d/v5/pkg/client"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
)
|
||||
|
||||
// NewCmdClusterStop returns a new cobra command
|
||||
|
@ -22,7 +22,7 @@ THE SOFTWARE.
|
||||
package config
|
||||
|
||||
import (
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -25,8 +25,8 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
config "github.com/rancher/k3d/v4/pkg/config/v1alpha3"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
config "github.com/rancher/k3d/v5/pkg/config/v1alpha3"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
@ -25,8 +25,8 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/rancher/k3d/v4/pkg/config"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/config"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
@ -24,11 +24,11 @@ package debug
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/rancher/k3d/v4/cmd/util"
|
||||
"github.com/rancher/k3d/v4/pkg/client"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
"github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v5/cmd/util"
|
||||
"github.com/rancher/k3d/v5/pkg/client"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
"github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/spf13/cobra"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
@ -22,7 +22,7 @@ THE SOFTWARE.
|
||||
package image
|
||||
|
||||
import (
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
@ -26,11 +26,11 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/rancher/k3d/v4/cmd/util"
|
||||
"github.com/rancher/k3d/v4/pkg/client"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v5/cmd/util"
|
||||
"github.com/rancher/k3d/v5/pkg/client"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
)
|
||||
|
||||
// NewCmdImageImport returns a new cobra command
|
||||
|
@ -22,7 +22,7 @@ THE SOFTWARE.
|
||||
package kubeconfig
|
||||
|
||||
import (
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
@ -25,11 +25,11 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/rancher/k3d/v4/cmd/util"
|
||||
"github.com/rancher/k3d/v4/pkg/client"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v5/cmd/util"
|
||||
"github.com/rancher/k3d/v5/pkg/client"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
@ -27,12 +27,12 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/rancher/k3d/v4/cmd/util"
|
||||
"github.com/rancher/k3d/v4/pkg/client"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
k3dutil "github.com/rancher/k3d/v4/pkg/util"
|
||||
"github.com/rancher/k3d/v5/cmd/util"
|
||||
"github.com/rancher/k3d/v5/pkg/client"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
k3dutil "github.com/rancher/k3d/v5/pkg/util"
|
||||
"github.com/spf13/cobra"
|
||||
"k8s.io/client-go/tools/clientcmd"
|
||||
)
|
||||
|
@ -22,7 +22,7 @@ THE SOFTWARE.
|
||||
package node
|
||||
|
||||
import (
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
@ -29,13 +29,13 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
dockerunits "github.com/docker/go-units"
|
||||
"github.com/rancher/k3d/v4/cmd/util"
|
||||
cliutil "github.com/rancher/k3d/v4/cmd/util"
|
||||
k3dc "github.com/rancher/k3d/v4/pkg/client"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v4/version"
|
||||
"github.com/rancher/k3d/v5/cmd/util"
|
||||
cliutil "github.com/rancher/k3d/v5/cmd/util"
|
||||
k3dc "github.com/rancher/k3d/v5/pkg/client"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/rancher/k3d/v5/version"
|
||||
)
|
||||
|
||||
// NewCmdNodeCreate returns a new cobra command
|
||||
|
@ -22,11 +22,11 @@ THE SOFTWARE.
|
||||
package node
|
||||
|
||||
import (
|
||||
"github.com/rancher/k3d/v4/cmd/util"
|
||||
"github.com/rancher/k3d/v4/pkg/client"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v5/cmd/util"
|
||||
"github.com/rancher/k3d/v5/pkg/client"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
@ -23,11 +23,11 @@ package node
|
||||
|
||||
import (
|
||||
"github.com/docker/go-connections/nat"
|
||||
"github.com/rancher/k3d/v4/cmd/util"
|
||||
"github.com/rancher/k3d/v4/pkg/client"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v5/cmd/util"
|
||||
"github.com/rancher/k3d/v5/pkg/client"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
@ -26,11 +26,11 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/liggitt/tabwriter"
|
||||
"github.com/rancher/k3d/v4/cmd/util"
|
||||
"github.com/rancher/k3d/v4/pkg/client"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v5/cmd/util"
|
||||
"github.com/rancher/k3d/v5/pkg/client"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
@ -22,10 +22,10 @@ THE SOFTWARE.
|
||||
package node
|
||||
|
||||
import (
|
||||
"github.com/rancher/k3d/v4/cmd/util"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v5/cmd/util"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
@ -22,12 +22,12 @@ THE SOFTWARE.
|
||||
package node
|
||||
|
||||
import (
|
||||
"github.com/rancher/k3d/v4/cmd/util"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
"github.com/rancher/k3d/v5/cmd/util"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
)
|
||||
|
||||
// NewCmdNodeStop returns a new cobra command
|
||||
|
@ -22,7 +22,7 @@ THE SOFTWARE.
|
||||
package registry
|
||||
|
||||
import (
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
@ -24,14 +24,14 @@ package registry
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
|
||||
"github.com/rancher/k3d/v4/pkg/client"
|
||||
"github.com/rancher/k3d/v5/pkg/client"
|
||||
|
||||
cliutil "github.com/rancher/k3d/v4/cmd/util"
|
||||
cliutil "github.com/rancher/k3d/v5/cmd/util"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
@ -22,11 +22,11 @@ THE SOFTWARE.
|
||||
package registry
|
||||
|
||||
import (
|
||||
"github.com/rancher/k3d/v4/cmd/util"
|
||||
"github.com/rancher/k3d/v4/pkg/client"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v5/cmd/util"
|
||||
"github.com/rancher/k3d/v5/pkg/client"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
@ -26,11 +26,11 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/liggitt/tabwriter"
|
||||
"github.com/rancher/k3d/v4/cmd/util"
|
||||
"github.com/rancher/k3d/v4/pkg/client"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v5/cmd/util"
|
||||
"github.com/rancher/k3d/v5/pkg/client"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
22
cmd/root.go
22
cmd/root.go
@ -32,17 +32,17 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/rancher/k3d/v4/cmd/cluster"
|
||||
cfg "github.com/rancher/k3d/v4/cmd/config"
|
||||
"github.com/rancher/k3d/v4/cmd/debug"
|
||||
"github.com/rancher/k3d/v4/cmd/image"
|
||||
"github.com/rancher/k3d/v4/cmd/kubeconfig"
|
||||
"github.com/rancher/k3d/v4/cmd/node"
|
||||
"github.com/rancher/k3d/v4/cmd/registry"
|
||||
cliutil "github.com/rancher/k3d/v4/cmd/util"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
"github.com/rancher/k3d/v4/version"
|
||||
"github.com/rancher/k3d/v5/cmd/cluster"
|
||||
cfg "github.com/rancher/k3d/v5/cmd/config"
|
||||
"github.com/rancher/k3d/v5/cmd/debug"
|
||||
"github.com/rancher/k3d/v5/cmd/image"
|
||||
"github.com/rancher/k3d/v5/cmd/kubeconfig"
|
||||
"github.com/rancher/k3d/v5/cmd/node"
|
||||
"github.com/rancher/k3d/v5/cmd/registry"
|
||||
cliutil "github.com/rancher/k3d/v5/cmd/util"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
"github.com/rancher/k3d/v5/version"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/sirupsen/logrus/hooks/writer"
|
||||
)
|
||||
|
@ -25,10 +25,10 @@ import (
|
||||
"context"
|
||||
"strings"
|
||||
|
||||
k3dcluster "github.com/rancher/k3d/v4/pkg/client"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
k3dcluster "github.com/rancher/k3d/v5/pkg/client"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
@ -28,8 +28,8 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/rancher/k3d/v4/pkg/config"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/config"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/viper"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
@ -25,7 +25,7 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
)
|
||||
|
||||
// SplitFiltersFromFlag separates a flag's value from the node filter, if there is one
|
||||
|
@ -29,8 +29,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/liggitt/tabwriter"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
|
@ -28,7 +28,7 @@ import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
)
|
||||
|
||||
// HandlePlugin takes care of finding and executing a plugin based on the longest prefix
|
||||
|
@ -28,9 +28,9 @@ import (
|
||||
"strconv"
|
||||
|
||||
"github.com/docker/go-connections/nat"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v4/pkg/util"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/rancher/k3d/v5/pkg/util"
|
||||
)
|
||||
|
||||
var apiPortRegexp = regexp.MustCompile(`^(?P<hostref>(?P<hostip>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|(?P<hostname>\S+):)?(?P<port>(\d{1,5}|random))$`)
|
||||
|
@ -24,7 +24,7 @@ package util
|
||||
import (
|
||||
"strings"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
)
|
||||
|
||||
// validateRuntimeLabelKey validates a given label key is not reserved for internal k3d usage
|
||||
|
@ -27,9 +27,9 @@ import (
|
||||
rt "runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
)
|
||||
|
||||
// ValidateVolumeMount checks, if the source of volume mounts exists and if the destination is an absolute path
|
||||
|
@ -9,7 +9,7 @@ require (
|
||||
github.com/containerd/continuity v0.0.0-20210315143101-93e15499afd5 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/rancher/k3d/v4 v4.4.7-0.20210709062205-c5f7884f7870
|
||||
github.com/rancher/k3d/v5 v4.4.7-0.20210709062205-c5f7884f7870
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
github.com/spf13/cobra v1.2.1
|
||||
golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1 // indirect
|
||||
@ -19,4 +19,4 @@ require (
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.1.1 // indirect
|
||||
)
|
||||
|
||||
replace github.com/rancher/k3d/v4 => /PATH/TO/YOUR/REPO/DIRECTORY
|
||||
replace github.com/rancher/k3d/v5 => /PATH/TO/YOUR/REPO/DIRECTORY
|
||||
|
@ -1,8 +1,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/rancher/k3d/v4/cmd"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/cmd"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/spf13/cobra/doc"
|
||||
)
|
||||
|
||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
||||
module github.com/rancher/k3d/v4
|
||||
module github.com/rancher/k3d/v5
|
||||
|
||||
go 1.17
|
||||
|
||||
|
2
main.go
2
main.go
@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
package main
|
||||
|
||||
import "github.com/rancher/k3d/v4/cmd"
|
||||
import "github.com/rancher/k3d/v5/cmd"
|
||||
|
||||
func main() {
|
||||
cmd.Execute()
|
||||
|
@ -25,8 +25,8 @@ import (
|
||||
"context"
|
||||
"os"
|
||||
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
)
|
||||
|
||||
type WriteFileAction struct {
|
||||
|
@ -36,16 +36,16 @@ import (
|
||||
"github.com/docker/go-connections/nat"
|
||||
"github.com/imdario/mergo"
|
||||
copystruct "github.com/mitchellh/copystructure"
|
||||
"github.com/rancher/k3d/v4/pkg/actions"
|
||||
config "github.com/rancher/k3d/v4/pkg/config/v1alpha3"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
k3drt "github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes/docker"
|
||||
runtimeErr "github.com/rancher/k3d/v4/pkg/runtimes/errors"
|
||||
"github.com/rancher/k3d/v4/pkg/types"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v4/pkg/types/k3s"
|
||||
"github.com/rancher/k3d/v4/pkg/util"
|
||||
"github.com/rancher/k3d/v5/pkg/actions"
|
||||
config "github.com/rancher/k3d/v5/pkg/config/v1alpha3"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
k3drt "github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes/docker"
|
||||
runtimeErr "github.com/rancher/k3d/v5/pkg/runtimes/errors"
|
||||
"github.com/rancher/k3d/v5/pkg/types"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/rancher/k3d/v5/pkg/types/k3s"
|
||||
"github.com/rancher/k3d/v5/pkg/util"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/sync/errgroup"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
@ -24,7 +24,7 @@ package client
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v5/pkg/types"
|
||||
)
|
||||
|
||||
// CheckName ensures that a cluster name is also a valid host name according to RFC 1123.
|
||||
|
@ -25,10 +25,10 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
)
|
||||
|
||||
func GatherEnvironmentInfo(ctx context.Context, runtime runtimes.Runtime, cluster *k3d.Cluster) (*k3d.EnvironmentInfo, error) {
|
||||
|
@ -25,9 +25,9 @@ import (
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
"github.com/rancher/k3d/v4/pkg/types/fixes"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
"github.com/rancher/k3d/v5/pkg/types/fixes"
|
||||
)
|
||||
|
||||
// FIXME: FixCgroupV2 - to be removed when fixed upstream
|
||||
|
@ -29,10 +29,10 @@ import (
|
||||
"regexp"
|
||||
"runtime"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
rt "github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v4/pkg/util"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
rt "github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/rancher/k3d/v5/pkg/util"
|
||||
)
|
||||
|
||||
var nsLookupAddressRegexp = regexp.MustCompile(`^Address:\s+(?P<ip>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$`)
|
||||
|
@ -25,9 +25,9 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
k3drt "github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
k3drt "github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"inet.af/netaddr"
|
||||
)
|
||||
|
||||
|
@ -30,9 +30,9 @@ import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"k8s.io/client-go/tools/clientcmd"
|
||||
clientcmdapi "k8s.io/client-go/tools/clientcmd/api"
|
||||
)
|
||||
|
@ -33,10 +33,10 @@ import (
|
||||
"github.com/docker/go-connections/nat"
|
||||
"github.com/go-test/deep"
|
||||
"github.com/imdario/mergo"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
"github.com/rancher/k3d/v4/pkg/types"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
"github.com/rancher/k3d/v5/pkg/types"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/spf13/viper"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
@ -40,14 +40,14 @@ import (
|
||||
"github.com/docker/go-connections/nat"
|
||||
dockerunits "github.com/docker/go-units"
|
||||
"github.com/imdario/mergo"
|
||||
"github.com/rancher/k3d/v4/pkg/actions"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes/docker"
|
||||
runtimeErrors "github.com/rancher/k3d/v4/pkg/runtimes/errors"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v4/pkg/types/fixes"
|
||||
"github.com/rancher/k3d/v4/pkg/util"
|
||||
"github.com/rancher/k3d/v5/pkg/actions"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes/docker"
|
||||
runtimeErrors "github.com/rancher/k3d/v5/pkg/runtimes/errors"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/rancher/k3d/v5/pkg/types/fixes"
|
||||
"github.com/rancher/k3d/v5/pkg/util"
|
||||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
|
||||
|
@ -28,12 +28,12 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/docker/go-connections/nat"
|
||||
"github.com/rancher/k3d/v4/pkg/config/types"
|
||||
config "github.com/rancher/k3d/v4/pkg/config/v1alpha3"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v4/pkg/util"
|
||||
"github.com/rancher/k3d/v5/pkg/config/types"
|
||||
config "github.com/rancher/k3d/v5/pkg/config/v1alpha3"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/rancher/k3d/v5/pkg/util"
|
||||
"github.com/sirupsen/logrus"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
@ -28,12 +28,12 @@ import (
|
||||
|
||||
"github.com/docker/go-connections/nat"
|
||||
"github.com/imdario/mergo"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes/docker"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v4/pkg/types/k3s"
|
||||
"github.com/rancher/k3d/v4/pkg/types/k8s"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes/docker"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/rancher/k3d/v5/pkg/types/k3s"
|
||||
"github.com/rancher/k3d/v5/pkg/types/k8s"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
|
@ -27,8 +27,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/docker/go-connections/nat"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
)
|
||||
|
||||
func TestRegistryGenerateLocalRegistryHostingConfigMapYAML(t *testing.T) {
|
||||
|
@ -31,9 +31,9 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
)
|
||||
|
||||
// ImageImportIntoClusterMulti starts up a k3d tools container for the selected cluster and uses it to export
|
||||
|
@ -25,15 +25,15 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"github.com/rancher/k3d/v4/pkg/config/v1alpha2"
|
||||
"github.com/rancher/k3d/v4/pkg/config/v1alpha3"
|
||||
defaultConfig "github.com/rancher/k3d/v4/pkg/config/v1alpha3"
|
||||
"github.com/rancher/k3d/v5/pkg/config/v1alpha2"
|
||||
"github.com/rancher/k3d/v5/pkg/config/v1alpha3"
|
||||
defaultConfig "github.com/rancher/k3d/v5/pkg/config/v1alpha3"
|
||||
|
||||
types "github.com/rancher/k3d/v4/pkg/config/types"
|
||||
types "github.com/rancher/k3d/v5/pkg/config/types"
|
||||
)
|
||||
|
||||
const DefaultConfigApiVersion = defaultConfig.ApiVersion
|
||||
|
@ -26,11 +26,11 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/go-test/deep"
|
||||
configtypes "github.com/rancher/k3d/v4/pkg/config/types"
|
||||
conf "github.com/rancher/k3d/v4/pkg/config/v1alpha3"
|
||||
configtypes "github.com/rancher/k3d/v5/pkg/config/types"
|
||||
conf "github.com/rancher/k3d/v5/pkg/config/v1alpha3"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
)
|
||||
|
||||
func TestReadSimpleConfig(t *testing.T) {
|
||||
|
@ -32,7 +32,7 @@ import (
|
||||
|
||||
"github.com/xeipuuv/gojsonschema"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
)
|
||||
|
||||
// ValidateSchemaFile takes a filepath, reads the file and validates it against a JSON schema
|
||||
|
@ -24,7 +24,7 @@ package config
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/rancher/k3d/v4/pkg/config/v1alpha3"
|
||||
"github.com/rancher/k3d/v5/pkg/config/v1alpha3"
|
||||
)
|
||||
|
||||
func TestValidateSchema(t *testing.T) {
|
||||
|
@ -26,8 +26,8 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/imdario/mergo"
|
||||
conf "github.com/rancher/k3d/v4/pkg/config/v1alpha3"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
conf "github.com/rancher/k3d/v5/pkg/config/v1alpha3"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
)
|
||||
|
||||
// MergeSimple merges two simple configuration files with the values of the destination one having priority
|
||||
|
@ -25,8 +25,8 @@ package config
|
||||
import (
|
||||
"testing"
|
||||
|
||||
configtypes "github.com/rancher/k3d/v4/pkg/config/types"
|
||||
conf "github.com/rancher/k3d/v4/pkg/config/v1alpha3"
|
||||
configtypes "github.com/rancher/k3d/v5/pkg/config/types"
|
||||
conf "github.com/rancher/k3d/v5/pkg/config/v1alpha3"
|
||||
"github.com/spf13/viper"
|
||||
"gotest.tools/assert"
|
||||
)
|
||||
|
@ -25,7 +25,7 @@ package config
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
types "github.com/rancher/k3d/v4/pkg/config/types"
|
||||
types "github.com/rancher/k3d/v5/pkg/config/types"
|
||||
)
|
||||
|
||||
func Migrate(config types.Config, targetVersion string) (types.Config, error) {
|
||||
|
@ -23,8 +23,8 @@ THE SOFTWARE.
|
||||
package config
|
||||
|
||||
import (
|
||||
conf "github.com/rancher/k3d/v4/pkg/config/v1alpha3"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
conf "github.com/rancher/k3d/v5/pkg/config/v1alpha3"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
)
|
||||
|
||||
// ProcessClusterConfig applies processing to the config sanitizing it and doing
|
||||
|
@ -26,8 +26,8 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
conf "github.com/rancher/k3d/v4/pkg/config/v1alpha3"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
conf "github.com/rancher/k3d/v5/pkg/config/v1alpha3"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
"github.com/spf13/viper"
|
||||
"gotest.tools/assert"
|
||||
)
|
||||
|
@ -30,18 +30,18 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/docker/go-connections/nat"
|
||||
cliutil "github.com/rancher/k3d/v4/cmd/util" // TODO: move parseapiport to pkg
|
||||
"github.com/rancher/k3d/v4/pkg/client"
|
||||
conf "github.com/rancher/k3d/v4/pkg/config/v1alpha3"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v4/pkg/types/k3s"
|
||||
"github.com/rancher/k3d/v4/pkg/util"
|
||||
"github.com/rancher/k3d/v4/version"
|
||||
cliutil "github.com/rancher/k3d/v5/cmd/util" // TODO: move parseapiport to pkg
|
||||
"github.com/rancher/k3d/v5/pkg/client"
|
||||
conf "github.com/rancher/k3d/v5/pkg/config/v1alpha3"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/rancher/k3d/v5/pkg/types/k3s"
|
||||
"github.com/rancher/k3d/v5/pkg/util"
|
||||
"github.com/rancher/k3d/v5/version"
|
||||
"gopkg.in/yaml.v2"
|
||||
"inet.af/netaddr"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -26,8 +26,8 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
conf "github.com/rancher/k3d/v4/pkg/config/v1alpha3"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
conf "github.com/rancher/k3d/v5/pkg/config/v1alpha3"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
|
@ -27,9 +27,9 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
configtypes "github.com/rancher/k3d/v4/pkg/config/types"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v4/version"
|
||||
configtypes "github.com/rancher/k3d/v5/pkg/config/types"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/rancher/k3d/v5/version"
|
||||
)
|
||||
|
||||
// JSONSchema describes the schema used to validate config files
|
||||
|
@ -25,9 +25,9 @@ package v1alpha3
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
configtypes "github.com/rancher/k3d/v4/pkg/config/types"
|
||||
"github.com/rancher/k3d/v4/pkg/config/v1alpha2"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
configtypes "github.com/rancher/k3d/v5/pkg/config/types"
|
||||
"github.com/rancher/k3d/v5/pkg/config/v1alpha2"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
)
|
||||
|
||||
var Migrations = map[string]func(configtypes.Config) (configtypes.Config, error){
|
||||
|
@ -28,9 +28,9 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
config "github.com/rancher/k3d/v4/pkg/config/types"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v4/version"
|
||||
config "github.com/rancher/k3d/v5/pkg/config/types"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/rancher/k3d/v5/version"
|
||||
)
|
||||
|
||||
const ApiVersion = "k3d.io/v1alpha3"
|
||||
|
@ -26,11 +26,11 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
k3dc "github.com/rancher/k3d/v4/pkg/client"
|
||||
conf "github.com/rancher/k3d/v4/pkg/config/v1alpha3"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
runtimeutil "github.com/rancher/k3d/v4/pkg/runtimes/util"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
k3dc "github.com/rancher/k3d/v5/pkg/client"
|
||||
conf "github.com/rancher/k3d/v5/pkg/config/v1alpha3"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
runtimeutil "github.com/rancher/k3d/v5/pkg/runtimes/util"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
|
||||
"fmt"
|
||||
|
||||
|
@ -26,8 +26,8 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
conf "github.com/rancher/k3d/v4/pkg/config/v1alpha3"
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
conf "github.com/rancher/k3d/v5/pkg/config/v1alpha3"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
|
@ -33,8 +33,8 @@ import (
|
||||
"github.com/docker/docker/api/types/container"
|
||||
"github.com/docker/docker/api/types/filters"
|
||||
"github.com/docker/docker/client"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
|
@ -26,7 +26,7 @@ import (
|
||||
"net/url"
|
||||
"os"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
)
|
||||
|
||||
type Docker struct{}
|
||||
|
@ -27,7 +27,7 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
runtimeTypes "github.com/rancher/k3d/v4/pkg/runtimes/types"
|
||||
runtimeTypes "github.com/rancher/k3d/v5/pkg/runtimes/types"
|
||||
)
|
||||
|
||||
func (d Docker) Info() (*runtimeTypes.RuntimeInfo, error) {
|
||||
|
@ -27,8 +27,8 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
)
|
||||
|
||||
// GetKubeconfig grabs the kubeconfig from inside a k3d node
|
||||
|
@ -28,7 +28,7 @@ import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
)
|
||||
|
||||
func (d Docker) GetDockerMachineIP() (string, error) {
|
||||
|
@ -32,10 +32,10 @@ import (
|
||||
"github.com/docker/docker/api/types/network"
|
||||
"inet.af/netaddr"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
runtimeErr "github.com/rancher/k3d/v4/pkg/runtimes/errors"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v4/pkg/util"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
runtimeErr "github.com/rancher/k3d/v5/pkg/runtimes/errors"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/rancher/k3d/v5/pkg/util"
|
||||
)
|
||||
|
||||
// GetNetwork returns a given network
|
||||
|
@ -33,9 +33,9 @@ import (
|
||||
|
||||
"github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/api/types/filters"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
runtimeErr "github.com/rancher/k3d/v4/pkg/runtimes/errors"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
runtimeErr "github.com/rancher/k3d/v5/pkg/runtimes/errors"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
)
|
||||
|
||||
// CreateNode creates a new container
|
||||
|
@ -32,10 +32,10 @@ import (
|
||||
docker "github.com/docker/docker/api/types/container"
|
||||
"github.com/docker/docker/api/types/network"
|
||||
"github.com/docker/go-connections/nat"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
runtimeErr "github.com/rancher/k3d/v4/pkg/runtimes/errors"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v4/pkg/types/fixes"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
runtimeErr "github.com/rancher/k3d/v5/pkg/runtimes/errors"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/rancher/k3d/v5/pkg/types/fixes"
|
||||
"inet.af/netaddr"
|
||||
|
||||
dockercliopts "github.com/docker/cli/opts"
|
||||
|
@ -30,8 +30,8 @@ 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/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v4/pkg/types/fixes"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
"github.com/rancher/k3d/v5/pkg/types/fixes"
|
||||
)
|
||||
|
||||
func TestTranslateNodeToContainer(t *testing.T) {
|
||||
|
@ -37,9 +37,9 @@ import (
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/docker/docker/pkg/archive"
|
||||
"github.com/pkg/errors"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
runtimeErrors "github.com/rancher/k3d/v4/pkg/runtimes/errors"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
runtimeErrors "github.com/rancher/k3d/v5/pkg/runtimes/errors"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
)
|
||||
|
||||
// GetDefaultObjectLabelsFilter returns docker type filters created from k3d labels
|
||||
|
@ -27,8 +27,8 @@ import (
|
||||
|
||||
"github.com/docker/docker/api/types/filters"
|
||||
"github.com/docker/docker/api/types/volume"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
)
|
||||
|
||||
// CreateVolume creates a new named volume
|
||||
|
@ -30,9 +30,9 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes/docker"
|
||||
runtimeTypes "github.com/rancher/k3d/v4/pkg/runtimes/types"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes/docker"
|
||||
runtimeTypes "github.com/rancher/k3d/v5/pkg/runtimes/types"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
)
|
||||
|
||||
// SelectedRuntime is a runtime (pun intended) variable determining the selected runtime
|
||||
|
@ -27,9 +27,9 @@ import (
|
||||
rt "runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||
"github.com/rancher/k3d/v5/pkg/runtimes"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
)
|
||||
|
||||
// ValidateVolumeMount checks, if the source of volume mounts exists and if the destination is an absolute path
|
||||
|
@ -25,8 +25,8 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
"github.com/rancher/k3d/v4/version"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
"github.com/rancher/k3d/v5/version"
|
||||
)
|
||||
|
||||
// DefaultK3sImageRepo specifies the default image repository for the used k3s image
|
||||
|
@ -28,8 +28,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/docker/go-connections/nat"
|
||||
"github.com/rancher/k3d/v4/pkg/types/k3s"
|
||||
"github.com/rancher/k3d/v4/version"
|
||||
"github.com/rancher/k3d/v5/pkg/types/k3s"
|
||||
"github.com/rancher/k3d/v5/version"
|
||||
"inet.af/netaddr"
|
||||
)
|
||||
|
||||
|
@ -27,8 +27,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -26,7 +26,7 @@ import (
|
||||
"regexp"
|
||||
|
||||
"github.com/docker/go-connections/nat"
|
||||
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||
k3d "github.com/rancher/k3d/v5/pkg/types"
|
||||
)
|
||||
|
||||
var registryRefRegexp = regexp.MustCompile(`^(?P<protocol>http:\/\/|https:\/\/)?(?P<hostref>(?P<hostip>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|(?P<hostname>[a-zA-Z\-\.0-9]+)){1}?((:)(?P<internalport>\d{1,5}))?((:)(?P<externalport>\d{1,5}))?$`)
|
||||
|
@ -27,7 +27,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/heroku/docker-registry-client/registry"
|
||||
l "github.com/rancher/k3d/v4/pkg/logger"
|
||||
l "github.com/rancher/k3d/v5/pkg/logger"
|
||||
)
|
||||
|
||||
// Version is the string that contains version
|
||||
|
Loading…
Reference in New Issue
Block a user