From 80f8b107b6cde3fe3ed8bc206eeb49355c0735b8 Mon Sep 17 00:00:00 2001 From: Abiola Ibrahim Date: Mon, 24 Jul 2023 20:43:22 +0100 Subject: [PATCH 1/5] ci: fix errors --- config/dirs.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/dirs.go b/config/dirs.go index 898e15792..73fcad043 100644 --- a/config/dirs.go +++ b/config/dirs.go @@ -43,6 +43,9 @@ var ( configBaseDir = requiredDir{ dir: func() (string, error) { dir, err := os.UserHomeDir() + if err != nil { + return "", err + } dir = filepath.Join(dir, ".colima") _, err = os.Stat(dir) if err == nil { From 67693e4685be2cb7fd03bf5ede4383b71994e624 Mon Sep 17 00:00:00 2001 From: Abiola Ibrahim Date: Thu, 27 Jul 2023 17:55:55 +0100 Subject: [PATCH 2/5] config: exclude macOS from user config dir --- config/dirs.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/dirs.go b/config/dirs.go index 73fcad043..1f1e2cc79 100644 --- a/config/dirs.go +++ b/config/dirs.go @@ -6,6 +6,7 @@ import ( "path/filepath" "sync" + "github.com/abiosoft/colima/util" "github.com/abiosoft/colima/util/fsutil" "github.com/abiosoft/colima/util/osutil" "github.com/abiosoft/colima/util/shautil" @@ -48,7 +49,8 @@ var ( } dir = filepath.Join(dir, ".colima") _, err = os.Stat(dir) - if err == nil { + // TODO: remove macOS when QEMU_SYSTEM_ARCH is handled properly upstream. + if err == nil || util.MacOS() { return dir, nil } // else From 381c440310b5b7e3addf2b1eadf2d5ff097e1cc0 Mon Sep 17 00:00:00 2001 From: Abiola Ibrahim Date: Thu, 27 Jul 2023 17:56:39 +0100 Subject: [PATCH 3/5] k3s: update version --- environment/container/kubernetes/kubernetes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment/container/kubernetes/kubernetes.go b/environment/container/kubernetes/kubernetes.go index b85710b3d..320a2ccf8 100644 --- a/environment/container/kubernetes/kubernetes.go +++ b/environment/container/kubernetes/kubernetes.go @@ -18,7 +18,7 @@ import ( const ( Name = "kubernetes" - DefaultVersion = "v1.27.1+k3s1" + DefaultVersion = "v1.27.3+k3s1" ConfigKey = "kubernetes_config" ) From 9f7dd7535925490d31eb34d976b936224cf0df06 Mon Sep 17 00:00:00 2001 From: Abiola Ibrahim Date: Thu, 27 Jul 2023 17:58:17 +0100 Subject: [PATCH 4/5] ssh: exclude other ssh keys. Fixes #735 --- environment/vm/lima/yaml.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/environment/vm/lima/yaml.go b/environment/vm/lima/yaml.go index b4dc74e28..b63002293 100644 --- a/environment/vm/lima/yaml.go +++ b/environment/vm/lima/yaml.go @@ -380,7 +380,7 @@ type Config struct { Disk string `yaml:"disk,omitempty"` Mounts []Mount `yaml:"mounts,omitempty"` MountType MountType `yaml:"mountType,omitempty" json:"mountType,omitempty"` - SSH SSH `yaml:"ssh,omitempty"` + SSH SSH `yaml:"ssh"` Containerd Containerd `yaml:"containerd"` Env map[string]string `yaml:"env,omitempty"` DNS []net.IP `yaml:"dns"` @@ -407,7 +407,7 @@ type Mount struct { } type SSH struct { - LocalPort int `yaml:"localPort"` + LocalPort int `yaml:"localPort,omitempty"` LoadDotSSHPubKeys bool `yaml:"loadDotSSHPubKeys"` ForwardAgent bool `yaml:"forwardAgent"` // default: false } From 78a14891b75f7f1f2d6d6a649589fd3ea6858b1d Mon Sep 17 00:00:00 2001 From: Abiola Ibrahim Date: Thu, 27 Jul 2023 17:59:01 +0100 Subject: [PATCH 5/5] build: update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f1ba8e14c..cb8d6561e 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ build: .PHONY: test test: - go test -v -ldflags="$(LD_FLAGS)" ./cmd/... + go test -v -ldflags="$(LD_FLAGS)" ./... .PHONY: vmnet vmnet: