v3 -> v4
This commit is contained in:
parent
6c784d9ff2
commit
d7b25ac6ab
4
Makefile
4
Makefile
@ -57,7 +57,7 @@ PKG := $(shell go mod vendor)
|
|||||||
TAGS :=
|
TAGS :=
|
||||||
TESTS := ./...
|
TESTS := ./...
|
||||||
TESTFLAGS :=
|
TESTFLAGS :=
|
||||||
LDFLAGS := -w -s -X github.com/rancher/k3d/v3/version.Version=${GIT_TAG} -X github.com/rancher/k3d/v3/version.K3sVersion=${K3S_TAG}
|
LDFLAGS := -w -s -X github.com/rancher/k3d/v4/version.Version=${GIT_TAG} -X github.com/rancher/k3d/v4/version.K3sVersion=${K3S_TAG}
|
||||||
GCFLAGS :=
|
GCFLAGS :=
|
||||||
GOFLAGS :=
|
GOFLAGS :=
|
||||||
BINDIR := $(CURDIR)/bin
|
BINDIR := $(CURDIR)/bin
|
||||||
@ -66,7 +66,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/v3/version.HelperVersionOverride=${K3D_HELPER_VERSION}
|
LDFLAGS += -X github.com/rancher/k3d/v4/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/v3)
|
[](https://pkg.go.dev/github.com/rancher/k3d/v4)
|
||||||
[](./go.mod)
|
[](./go.mod)
|
||||||
[](https://goreportcard.com/report/github.com/rancher/k3d)
|
[](https://goreportcard.com/report/github.com/rancher/k3d)
|
||||||
|
|
||||||
@ -64,7 +64,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/v3@main`
|
1. Clone this repo, e.g. via `git clone git@github.com:rancher/k3d.git` or `go get github.com/rancher/k3d/v4@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
|
||||||
|
@ -30,12 +30,12 @@ import (
|
|||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
cliutil "github.com/rancher/k3d/v3/cmd/util"
|
cliutil "github.com/rancher/k3d/v4/cmd/util"
|
||||||
"github.com/rancher/k3d/v3/pkg/cluster"
|
"github.com/rancher/k3d/v4/pkg/cluster"
|
||||||
k3dCluster "github.com/rancher/k3d/v3/pkg/cluster"
|
k3dCluster "github.com/rancher/k3d/v4/pkg/cluster"
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes"
|
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
"github.com/rancher/k3d/v3/version"
|
"github.com/rancher/k3d/v4/version"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
@ -26,11 +26,11 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
|
||||||
"github.com/rancher/k3d/v3/cmd/util"
|
"github.com/rancher/k3d/v4/cmd/util"
|
||||||
"github.com/rancher/k3d/v3/pkg/cluster"
|
"github.com/rancher/k3d/v4/pkg/cluster"
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes"
|
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
k3dutil "github.com/rancher/k3d/v3/pkg/util"
|
k3dutil "github.com/rancher/k3d/v4/pkg/util"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
@ -28,10 +28,10 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/rancher/k3d/v3/cmd/util"
|
"github.com/rancher/k3d/v4/cmd/util"
|
||||||
k3cluster "github.com/rancher/k3d/v3/pkg/cluster"
|
k3cluster "github.com/rancher/k3d/v4/pkg/cluster"
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes"
|
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"gopkg.in/yaml.v2"
|
"gopkg.in/yaml.v2"
|
||||||
|
|
||||||
|
@ -24,13 +24,13 @@ package cluster
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/rancher/k3d/v3/cmd/util"
|
"github.com/rancher/k3d/v4/cmd/util"
|
||||||
"github.com/rancher/k3d/v3/pkg/cluster"
|
"github.com/rancher/k3d/v4/pkg/cluster"
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes"
|
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
"github.com/rancher/k3d/v3/pkg/types"
|
"github.com/rancher/k3d/v4/pkg/types"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
@ -24,10 +24,10 @@ package cluster
|
|||||||
import (
|
import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/rancher/k3d/v3/cmd/util"
|
"github.com/rancher/k3d/v4/cmd/util"
|
||||||
"github.com/rancher/k3d/v3/pkg/cluster"
|
"github.com/rancher/k3d/v4/pkg/cluster"
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes"
|
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
@ -26,10 +26,10 @@ import (
|
|||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/rancher/k3d/v3/cmd/util"
|
"github.com/rancher/k3d/v4/cmd/util"
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes"
|
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
"github.com/rancher/k3d/v3/pkg/tools"
|
"github.com/rancher/k3d/v4/pkg/tools"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
@ -25,10 +25,10 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/rancher/k3d/v3/cmd/util"
|
"github.com/rancher/k3d/v4/cmd/util"
|
||||||
"github.com/rancher/k3d/v3/pkg/cluster"
|
"github.com/rancher/k3d/v4/pkg/cluster"
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes"
|
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
@ -27,11 +27,11 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/rancher/k3d/v3/cmd/util"
|
"github.com/rancher/k3d/v4/cmd/util"
|
||||||
"github.com/rancher/k3d/v3/pkg/cluster"
|
"github.com/rancher/k3d/v4/pkg/cluster"
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes"
|
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
k3dutil "github.com/rancher/k3d/v3/pkg/util"
|
k3dutil "github.com/rancher/k3d/v4/pkg/util"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"k8s.io/client-go/tools/clientcmd"
|
"k8s.io/client-go/tools/clientcmd"
|
||||||
|
|
||||||
|
@ -27,11 +27,11 @@ import (
|
|||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/rancher/k3d/v3/cmd/util"
|
"github.com/rancher/k3d/v4/cmd/util"
|
||||||
k3dc "github.com/rancher/k3d/v3/pkg/cluster"
|
k3dc "github.com/rancher/k3d/v4/pkg/cluster"
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes"
|
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
"github.com/rancher/k3d/v3/version"
|
"github.com/rancher/k3d/v4/version"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -22,10 +22,10 @@ THE SOFTWARE.
|
|||||||
package node
|
package node
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/rancher/k3d/v3/cmd/util"
|
"github.com/rancher/k3d/v4/cmd/util"
|
||||||
"github.com/rancher/k3d/v3/pkg/cluster"
|
"github.com/rancher/k3d/v4/pkg/cluster"
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes"
|
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
@ -28,10 +28,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/liggitt/tabwriter"
|
"github.com/liggitt/tabwriter"
|
||||||
"github.com/rancher/k3d/v3/cmd/util"
|
"github.com/rancher/k3d/v4/cmd/util"
|
||||||
"github.com/rancher/k3d/v3/pkg/cluster"
|
"github.com/rancher/k3d/v4/pkg/cluster"
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes"
|
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
@ -22,9 +22,9 @@ THE SOFTWARE.
|
|||||||
package node
|
package node
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/rancher/k3d/v3/cmd/util"
|
"github.com/rancher/k3d/v4/cmd/util"
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes"
|
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
@ -22,11 +22,11 @@ THE SOFTWARE.
|
|||||||
package node
|
package node
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/rancher/k3d/v3/cmd/util"
|
"github.com/rancher/k3d/v4/cmd/util"
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes"
|
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
14
cmd/root.go
14
cmd/root.go
@ -31,13 +31,13 @@ import (
|
|||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/rancher/k3d/v3/cmd/cluster"
|
"github.com/rancher/k3d/v4/cmd/cluster"
|
||||||
"github.com/rancher/k3d/v3/cmd/image"
|
"github.com/rancher/k3d/v4/cmd/image"
|
||||||
"github.com/rancher/k3d/v3/cmd/kubeconfig"
|
"github.com/rancher/k3d/v4/cmd/kubeconfig"
|
||||||
"github.com/rancher/k3d/v3/cmd/node"
|
"github.com/rancher/k3d/v4/cmd/node"
|
||||||
cliutil "github.com/rancher/k3d/v3/cmd/util"
|
cliutil "github.com/rancher/k3d/v4/cmd/util"
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes"
|
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
"github.com/rancher/k3d/v3/version"
|
"github.com/rancher/k3d/v4/version"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/sirupsen/logrus/hooks/writer"
|
"github.com/sirupsen/logrus/hooks/writer"
|
||||||
)
|
)
|
||||||
|
@ -25,9 +25,9 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
k3dcluster "github.com/rancher/k3d/v3/pkg/cluster"
|
k3dcluster "github.com/rancher/k3d/v4/pkg/cluster"
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes"
|
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
@ -28,9 +28,9 @@ import (
|
|||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
|
|
||||||
"github.com/rancher/k3d/v3/pkg/util"
|
"github.com/rancher/k3d/v4/pkg/util"
|
||||||
|
|
||||||
"regexp"
|
"regexp"
|
||||||
)
|
)
|
||||||
|
@ -28,7 +28,7 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/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
|
||||||
|
@ -27,7 +27,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes"
|
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
|||||||
module github.com/rancher/k3d/v3
|
module github.com/rancher/k3d/v4
|
||||||
|
|
||||||
go 1.14
|
go 1.14
|
||||||
|
|
||||||
|
2
main.go
2
main.go
@ -21,7 +21,7 @@ THE SOFTWARE.
|
|||||||
*/
|
*/
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "github.com/rancher/k3d/v3/cmd"
|
import "github.com/rancher/k3d/v4/cmd"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
cmd.Execute()
|
cmd.Execute()
|
||||||
|
@ -34,12 +34,12 @@ import (
|
|||||||
gort "runtime"
|
gort "runtime"
|
||||||
|
|
||||||
"github.com/imdario/mergo"
|
"github.com/imdario/mergo"
|
||||||
k3drt "github.com/rancher/k3d/v3/pkg/runtimes"
|
k3drt "github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes/docker"
|
"github.com/rancher/k3d/v4/pkg/runtimes/docker"
|
||||||
"github.com/rancher/k3d/v3/pkg/types"
|
"github.com/rancher/k3d/v4/pkg/types"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
"github.com/rancher/k3d/v3/pkg/util"
|
"github.com/rancher/k3d/v4/pkg/util"
|
||||||
"github.com/rancher/k3d/v3/version"
|
"github.com/rancher/k3d/v4/version"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"golang.org/x/sync/errgroup"
|
"golang.org/x/sync/errgroup"
|
||||||
)
|
)
|
||||||
|
@ -24,7 +24,7 @@ package cluster
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/rancher/k3d/v3/pkg/types"
|
"github.com/rancher/k3d/v4/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.
|
||||||
|
@ -29,9 +29,9 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
rt "github.com/rancher/k3d/v3/pkg/runtimes"
|
rt "github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
"github.com/rancher/k3d/v3/pkg/util"
|
"github.com/rancher/k3d/v4/pkg/util"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -30,8 +30,8 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes"
|
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"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"
|
||||||
|
@ -26,8 +26,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes"
|
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -30,8 +30,8 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/imdario/mergo"
|
"github.com/imdario/mergo"
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes"
|
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"golang.org/x/sync/errgroup"
|
"golang.org/x/sync/errgroup"
|
||||||
)
|
)
|
||||||
|
@ -26,7 +26,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GetKubeconfig grabs the kubeconfig from inside a k3d node
|
// GetKubeconfig grabs the kubeconfig from inside a k3d node
|
||||||
|
@ -30,7 +30,7 @@ import (
|
|||||||
|
|
||||||
"github.com/containerd/containerd"
|
"github.com/containerd/containerd"
|
||||||
"github.com/containerd/containerd/containers"
|
"github.com/containerd/containerd/containers"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ package containerd
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// CopyToNode copies a file from the local FS to the selected node
|
// CopyToNode copies a file from the local FS to the selected node
|
||||||
|
@ -33,7 +33,7 @@ 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"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/docker/docker/client"
|
"github.com/docker/docker/client"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ import (
|
|||||||
"github.com/docker/docker/api/types/filters"
|
"github.com/docker/docker/api/types/filters"
|
||||||
"github.com/docker/docker/client"
|
"github.com/docker/docker/client"
|
||||||
|
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ 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"
|
||||||
"github.com/docker/docker/client"
|
"github.com/docker/docker/client"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ 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"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
dockercliopts "github.com/docker/cli/opts"
|
dockercliopts "github.com/docker/cli/opts"
|
||||||
|
@ -30,7 +30,7 @@ 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/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestTranslateNodeToContainer(t *testing.T) {
|
func TestTranslateNodeToContainer(t *testing.T) {
|
||||||
|
@ -29,7 +29,7 @@ import (
|
|||||||
"github.com/docker/docker/api/types/filters"
|
"github.com/docker/docker/api/types/filters"
|
||||||
"github.com/docker/docker/client"
|
"github.com/docker/docker/client"
|
||||||
"github.com/docker/docker/pkg/archive"
|
"github.com/docker/docker/pkg/archive"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ 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"
|
||||||
"github.com/docker/docker/client"
|
"github.com/docker/docker/client"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -29,9 +29,9 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes/containerd"
|
"github.com/rancher/k3d/v4/pkg/runtimes/containerd"
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes/docker"
|
"github.com/rancher/k3d/v4/pkg/runtimes/docker"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SelectedRuntime is a runtime (pun intended) variable determining the selected runtime
|
// SelectedRuntime is a runtime (pun intended) variable determining the selected runtime
|
||||||
|
@ -30,10 +30,10 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
k3dc "github.com/rancher/k3d/v3/pkg/cluster"
|
k3dc "github.com/rancher/k3d/v4/pkg/cluster"
|
||||||
"github.com/rancher/k3d/v3/pkg/runtimes"
|
"github.com/rancher/k3d/v4/pkg/runtimes"
|
||||||
k3d "github.com/rancher/k3d/v3/pkg/types"
|
k3d "github.com/rancher/k3d/v4/pkg/types"
|
||||||
"github.com/rancher/k3d/v3/version"
|
"github.com/rancher/k3d/v4/version"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user