Closed zmalik closed 4 years ago
Turns out this is not specific to the KUDOOperator task. It also happens on plain command line when a null parameter value is supplied.
$ cat a.yaml
a:
b: 2
$ kubectl kudo install kafka -P a.yaml
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x14050bc]
goroutine 1 [running]:
github.com/kudobuilder/kudo/pkg/kudoctl/cmd/params.getParamsFromFiles(0x1c04940, 0x294e670, 0xc000327ba0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/kensipe/projects/go/src/github.com/kudobuilder/kudo/pkg/kudoctl/cmd/params/parser.go:79 +0x97c
github.com/kudobuilder/kudo/pkg/kudoctl/cmd/params.GetParameterMap(0x1c04940, 0x294e670, 0x0, 0x0, 0x0, 0xc000327ba0, 0x1, 0x1, 0x4, 0x193fe61, ...)
/Users/kensipe/projects/go/src/github.com/kudobuilder/kudo/pkg/kudoctl/cmd/params/parser.go:23 +0xca
github.com/kudobuilder/kudo/pkg/kudoctl/cmd.newInstallCmd.func1(0xc0006b82c0, 0xc000686840, 0x1, 0x3, 0x0, 0x0)
/Users/kensipe/projects/go/src/github.com/kudobuilder/kudo/pkg/kudoctl/cmd/install.go:47 +0x94
github.com/spf13/cobra.(*Command).execute(0xc0006b82c0, 0xc0006867b0, 0x3, 0x3, 0xc0006b82c0, 0xc0006867b0)
/Users/kensipe/projects/go/pkg/mod/github.com/spf13/cobra@v0.0.7/command.go:838 +0x453
github.com/spf13/cobra.(*Command).ExecuteC(0xc0006b8000, 0x0, 0x16ad8c0, 0xc000042118)
/Users/kensipe/projects/go/pkg/mod/github.com/spf13/cobra@v0.0.7/command.go:943 +0x317
github.com/spf13/cobra.(*Command).Execute(...)
/Users/kensipe/projects/go/pkg/mod/github.com/spf13/cobra@v0.0.7/command.go:883
main.main()
/Users/kensipe/projects/go/src/github.com/kudobuilder/kudo/cmd/kubectl-kudo/main.go:24 +0x27
What happened: Using a KUDOOperator Task deploying through a params file, using a not required param crashloop the KUDO manager from which it cannot recover
./operator/operator.yaml:
./operator/params.yaml:
./operator/templates/zk-params.yaml:
This crashloops the kudo manager
with error:
What you expected to happen:
using zk-params.yaml as
STORAGE_CLASS: "{{ .Params.ZK_STORAGE_CLASS }}"
fixes the issueHow to reproduce it (as minimally and precisely as possible): Above example
Environment:
kubectl version
): 1.18.5kubectl kudo version
): 0.15.0uname -a
):