k3d
k3d copied to clipboard
[BUG] k3d cluster ls k3d -o yaml panic: Option ,inline needs a struct value field
What did you do
-
How was the cluster created?
-
k3d cluster create k3d
-
-
What did you do afterwards?
- k3d commands?
k3d cluster ls k3d -o yaml
- k3d commands?
What did you expect to happen
No panic.
Screenshots or terminal output
root@vagrant:~# k3d cluster ls k3d -o yaml
panic: Option ,inline needs a struct value field [recovered]
panic: Option ,inline needs a struct value field
goroutine 1 [running]:
gopkg.in/yaml%2ev2.handleErr(0xc00053f748)
/home/runner/work/k3d/k3d/vendor/gopkg.in/yaml.v2/yaml.go:249 +0x6d
panic({0xc650c0, 0xc0004aa020})
/opt/hostedtoolcache/go/1.17.10/x64/src/runtime/panic.go:1038 +0x215
gopkg.in/yaml%2ev2.(*encoder).structv(0xc00028e580, {0x0, 0x0}, {0xcbf440, 0xc0002a4350, 0x10101})
/home/runner/work/k3d/k3d/vendor/gopkg.in/yaml.v2/encode.go:211 +0xe9
gopkg.in/yaml%2ev2.(*encoder).marshal(0xc1b600, {0x0, 0x0}, {0xcbf440, 0xc0002a4350, 0x0})
/home/runner/work/k3d/k3d/vendor/gopkg.in/yaml.v2/encode.go:160 +0x9a5
gopkg.in/yaml%2ev2.(*encoder).marshal(0xc79d2b, {0x0, 0x0}, {0xc1b600, 0xc00022a490, 0xa})
/home/runner/work/k3d/k3d/vendor/gopkg.in/yaml.v2/encode.go:154 +0x7f9
gopkg.in/yaml%2ev2.(*encoder).structv.func1()
/home/runner/work/k3d/k3d/vendor/gopkg.in/yaml.v2/encode.go:226 +0x468
gopkg.in/yaml%2ev2.(*encoder).mappingv(0xc00028e580, {0x0, 0xc00022a3c0}, 0xc00053edb8)
/home/runner/work/k3d/k3d/vendor/gopkg.in/yaml.v2/encode.go:256 +0x143
gopkg.in/yaml%2ev2.(*encoder).structv(0xc00028e580, {0x0, 0x0}, {0xd33200, 0xc00022a3c0, 0x0})
/home/runner/work/k3d/k3d/vendor/gopkg.in/yaml.v2/encode.go:213 +0xce
gopkg.in/yaml%2ev2.(*encoder).marshal(0xc000286888, {0x0, 0x0}, {0xd33200, 0xc00022a3c0, 0x6})
/home/runner/work/k3d/k3d/vendor/gopkg.in/yaml.v2/encode.go:160 +0x9a5
gopkg.in/yaml%2ev2.(*encoder).structv.func1()
/home/runner/work/k3d/k3d/vendor/gopkg.in/yaml.v2/encode.go:226 +0x468
gopkg.in/yaml%2ev2.(*encoder).mappingv(0xc00028e580, {0x0, 0xc00022a3c0}, 0xc00053f168)
/home/runner/work/k3d/k3d/vendor/gopkg.in/yaml.v2/encode.go:256 +0x143
gopkg.in/yaml%2ev2.(*encoder).structv(0xc00028e580, {0x0, 0x0}, {0xd167c0, 0xc00022a3c0, 0x0})
/home/runner/work/k3d/k3d/vendor/gopkg.in/yaml.v2/encode.go:213 +0xce
gopkg.in/yaml%2ev2.(*encoder).marshal(0xc2aec0, {0x0, 0x0}, {0xd167c0, 0xc00022a3c0, 0x19})
/home/runner/work/k3d/k3d/vendor/gopkg.in/yaml.v2/encode.go:160 +0x9a5
gopkg.in/yaml%2ev2.(*encoder).slicev(0xc00028e580, {0x0, 0xc000288798}, {0xc2aec0, 0xc000288798, 0x0})
/home/runner/work/k3d/k3d/vendor/gopkg.in/yaml.v2/encode.go:272 +0x1bf
gopkg.in/yaml%2ev2.(*encoder).marshal(0xc00028e580, {0x0, 0x0}, {0xc2aec0, 0xc000288798, 0x2})
/home/runner/work/k3d/k3d/vendor/gopkg.in/yaml.v2/encode.go:166 +0x905
gopkg.in/yaml%2ev2.(*encoder).marshalDoc(0xc00028e580, {0x0, 0x0}, {0xc2aec0, 0xc000288798, 0xc00053f728})
/home/runner/work/k3d/k3d/vendor/gopkg.in/yaml.v2/encode.go:93 +0x125
gopkg.in/yaml%2ev2.Marshal({0xc2aec0, 0xc000288798})
/home/runner/work/k3d/k3d/vendor/gopkg.in/yaml.v2/yaml.go:203 +0x37e
github.com/k3d-io/k3d/v5/cmd/cluster.PrintClusters({0xc00029c110, 0xc0000a8000, 0x1}, {0x1, 0x0, {0x7ffd1b739688, 0x0}})
/home/runner/work/k3d/k3d/cmd/cluster/clusterList.go:175 +0x925
github.com/k3d-io/k3d/v5/cmd/cluster.NewCmdClusterList.func1(0xc0003f2500, {0xc00010cf60, 0x3, 0x3})
/home/runner/work/k3d/k3d/cmd/cluster/clusterList.go:61 +0x5e
github.com/spf13/cobra.(*Command).execute(0xc0003f2500, {0xc00010cf30, 0x3, 0x3})
/home/runner/work/k3d/k3d/vendor/github.com/spf13/cobra/command.go:860 +0x5f8
github.com/spf13/cobra.(*Command).ExecuteC(0xc0003a4780)
/home/runner/work/k3d/k3d/vendor/github.com/spf13/cobra/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/work/k3d/k3d/vendor/github.com/spf13/cobra/command.go:902
github.com/k3d-io/k3d/v5/cmd.Execute()
/home/runner/work/k3d/k3d/cmd/root.go:144 +0x175
main.main()
/home/runner/work/k3d/k3d/main.go:27 +0x17
Which OS & Architecture
root@vagrant:~# k3d runtime-info
name: docker
endpoint: /var/run/docker.sock
version: 20.10.17
ostype: linux
os: Ubuntu 22.04 LTS
arch: x86_64
cgroupversion: "2"
cgroupdriver: systemd
filesystem: extfs
Which version of k3d
root@vagrant:~# k3d version
k3d version v5.4.3
k3s version v1.23.6-k3s1 (default)
Which version of docker
root@vagrant:~# docker version
Client: Docker Engine - Community
Version: 20.10.17
API version: 1.41
Go version: go1.17.11
Git commit: 100c701
Built: Mon Jun 6 23:02:46 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.17
API version: 1.41 (minimum version 1.12)
Go version: go1.17.11
Git commit: a89b842
Built: Mon Jun 6 23:00:51 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.6
GitCommit: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
runc:
Version: 1.1.2
GitCommit: v1.1.2-0-ga916309
docker-init:
Version: 0.19.0
GitCommit: de40ad0