migrate to module rancher/k3d/v5

This commit is contained in:
iwilltry42 2021-09-07 08:55:09 +02:00 committed by Thorsten Klein
parent 5aa1edfb73
commit 7073a8fad7
90 changed files with 294 additions and 294 deletions

View File

@ -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'

View File

@ -4,7 +4,7 @@
[![License](https://img.shields.io/github/license/rancher/k3d?style=flat-square)](./LICENSE.md)
![Downloads](https://img.shields.io/github/downloads/rancher/k3d/total.svg?style=flat-square)
[![Go Module](https://img.shields.io/badge/Go%20Module-github.com%2Francher%2Fk3d%2Fv4-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/rancher/k3d/v4)
[![Go Module](https://img.shields.io/badge/Go%20Module-github.com%2Francher%2Fk3d%2Fv4-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/rancher/k3d/v5)
[![Go version](https://img.shields.io/github/go-mod/go-version/rancher/k3d?logo=go&logoColor=white&style=flat-square)](./go.mod)
[![Go Report Card](https://goreportcard.com/badge/github.com/rancher/k3d?style=flat-square)](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

View File

@ -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"
)

View File

@ -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

View File

@ -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"

View File

@ -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"
)

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"

View File

@ -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

View File

@ -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"
)

View File

@ -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

View File

@ -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))$`)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
View File

@ -1,4 +1,4 @@
module github.com/rancher/k3d/v4
module github.com/rancher/k3d/v5
go 1.17

View File

@ -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()

View File

@ -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 {

View File

@ -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"

View File

@ -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.

View File

@ -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) {

View File

@ -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

View File

@ -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})$`)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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) {

View File

@ -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

View File

@ -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

View File

@ -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) {

View File

@ -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

View File

@ -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) {

View File

@ -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

View File

@ -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"
)

View File

@ -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) {

View File

@ -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

View File

@ -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"
)

View File

@ -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 (

View File

@ -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"
)

View File

@ -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

View File

@ -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){

View File

@ -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"

View File

@ -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"

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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{}

View File

@ -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) {

View File

@ -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

View File

@ -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) {

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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) {

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"
)

View File

@ -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 (

View File

@ -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}))?$`)

View File

@ -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