Which version of kube-score are you using?
1.19.0
What did you do?
I installed kube-score both on MacOS (with Brew) and on a Linux machine (from release), but each installation generate a go panic when I run the kube-score list
command.
MacOS
(base) ~ $ brew install kube-score
==> Downloading https://formulae.brew.sh/api/formula.jws.json
############################################################################################################################### 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
############################################################################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/kube-score/manifests/1.19.0
############################################################################################################################### 100.0%
==> Fetching kube-score
==> Downloading https://ghcr.io/v2/homebrew/core/kube-score/blobs/sha256:f0983996db902e80972d36c5603393d1acbdcdb5dddc27372ca6aefc3a6bc
############################################################################################################################### 100.0%
==> Pouring kube-score--1.19.0.arm64_sequoia.bottle.tar.gz
🍺 /opt/homebrew/Cellar/kube-score/1.19.0: 6 files, 14.3MB
==> Running `brew cleanup kube-score`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
(base) ~ $ kube-score list
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x105263d5c]
goroutine 1 [running]:
github.com/zegl/kube-score/score.RegisterAllChecks({0x10551d530, 0x1400022e360}, 0x0?, 0x0)
github.com/zegl/kube-score/score/score.go:34 +0x1dc
main.listChecks({0x16b292dc0, 0xa}, {0x140000dc000, 0x0, 0x0})
github.com/zegl/kube-score/cmd/kube-score/main.go:298 +0x1b4
main.main.func2({0x16b292dc0?, 0x14000193f08?}, {0x140000dc000?, 0x4?, 0x105285f0e?})
github.com/zegl/kube-score/cmd/kube-score/main.go:44 +0x24
main.main()
github.com/zegl/kube-score/cmd/kube-score/main.go:68 +0x378
Linux:
root@docker:~# kube-score version
kube-score version: 1.19.0, commit: a0a0f48c808611965e2690d8af1b1d8a5415fd0b, built: 2024-10-01T09:36:35Z
root@docker:~# kube-score list
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xb82a43]
goroutine 1 [running]:
github.com/zegl/kube-score/score.RegisterAllChecks({0xe2e6f0, 0xc00020c240}, 0x0?, 0x0)
/Users/gustav/src/kube-score/score/score.go:34 +0x283
main.listChecks({0x7ffdba695860, 0xa}, {0xc000128000, 0x0, 0x0})
/Users/gustav/src/kube-score/cmd/kube-score/main.go:298 +0x1d8
main.main.func2({0x7ffdba695860?, 0xc00016bf10?}, {0xc000128000?, 0x4?, 0xc00011e8a0?})
/Users/gustav/src/kube-score/cmd/kube-score/main.go:44 +0x1d
main.main()
/Users/gustav/src/kube-score/cmd/kube-score/main.go:68 +0x391
root@docker:~#
What did you expect to see?
The list of the available kube-score checks.
What did you see instead?
A panic dump.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too