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 :=
|
TAGS :=
|
||||||
TESTS := ./...
|
TESTS := ./...
|
||||||
TESTFLAGS :=
|
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 :=
|
GCFLAGS :=
|
||||||
GOFLAGS :=
|
GOFLAGS :=
|
||||||
BINDIR := $(CURDIR)/bin
|
BINDIR := $(CURDIR)/bin
|
||||||
@ -74,7 +74,7 @@ BINARIES := k3d
|
|||||||
# Set version of the k3d helper images for build
|
# Set version of the k3d helper images for build
|
||||||
ifneq ($(K3D_HELPER_VERSION),)
|
ifneq ($(K3D_HELPER_VERSION),)
|
||||||
$(info [INFO] Helper Image version set to ${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
|
endif
|
||||||
|
|
||||||
# Rules for finding all go source files using 'DIRS' and 'REC_DIRS'
|
# Rules for finding all go source files using 'DIRS' and 'REC_DIRS'
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
[](./LICENSE.md)
|
[](./LICENSE.md)
|
||||||

|

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