Closed cep21 closed 4 years ago
One bug so far. I think you forgot a return nil
after Error finding previous release secret with name
2020/03/18 05:20:14 Error finding previous release secret with name sh.helm.release.v1.XXXXXXX.v1
E0318 05:20:14.678976 951 runtime.go:78] Observed a panic: runtime.boundsError{x:3, y:0, signed:true, code:0x2} (runtime error: slice bounds out of range [:3] with capacity 0)
goroutine 9 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic(0x13a0740, 0xc000574b80)
/home/ubuntu/go/pkg/mod/k8s.io/apimachinery@v0.17.3/pkg/util/runtime/runtime.go:74 +0xa3
k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
/home/ubuntu/go/pkg/mod/k8s.io/apimachinery@v0.17.3/pkg/util/runtime/runtime.go:48 +0x82
panic(0x13a0740, 0xc000574b80)
/home/ubuntu/lib/go/src/runtime/panic.go:967 +0x15d
github.com/larderdev/kubewise/driver.DecodeRelease(0x0, 0x0, 0x0, 0x0, 0x0)
/home/ubuntu/workspace/kubwise/driver/releases.go:49 +0x2c9
github.com/larderdev/kubewise/kwrelease.GetPreviousRelease(0xc000b95cf0, 0x20f4)
/home/ubuntu/workspace/kubwise/kwrelease/kwrelease.go:61 +0x267
github.com/larderdev/kubewise/controller.(*Controller).processItem(0xc000372600, 0xc0005b1380, 0x26, 0x145b4a1, 0x6, 0xc00031a000, 0x12, 0x0, 0x0)
/home/ubuntu/workspace/kubwise/controller/controller.go:240 +0x2b3
github.com/larderdev/kubewise/controller.(*Controller).processNextItem(0xc000372600, 0x0)
/home/ubuntu/workspace/kubwise/controller/controller.go:184 +0x141
github.com/larderdev/kubewise/controller.(*Controller).runWorker(0xc000372600)
/home/ubuntu/workspace/kubwise/controller/controller.go:172 +0x2b
k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1(0xc000415f48)
/home/ubuntu/go/pkg/mod/k8s.io/apimachinery@v0.17.3/pkg/util/wait/wait.go:152 +0x5f
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc000507f48, 0x3b9aca00, 0x0, 0x1, 0xc000096780)
/home/ubuntu/go/pkg/mod/k8s.io/apimachinery@v0.17.3/pkg/util/wait/wait.go:153 +0xf8
k8s.io/apimachinery/pkg/util/wait.Until(...)
I think this error is related to helm only keeping a maximum history of 10 items.
Hi Jack. Great job finding this bug. I've merged your pull request and I will look to get golang-lint set up.
I would definitely appreciate help! Integrating DataDog would be fantastic. I've only really thought about chat bots so far but I can totally see how hooks into analytics tools like DataDog and Splunk would be useful. Feel free to submit one. It will hopefully be easy enough to use the event handler interface.
To be honest this is my first Go project so the code may not be quite idiomatic or use the best practices. I would definitely appreciate advice or suggestions on that front.
There are a few big gaps in the project so far that I can see...
I'll create a project board for the repo now and get a few of these items recorded on it.
Regarding the specific bug you found... Where did you learn that Helm only keeps 10 secrets? I've only tested KubeWise on fresh clusters so far. That's probably why I haven't run into it.
I released 0.1.1 to fix the bug you found. I've also created a few more issues with ideas for people to work on if they like.
Closing this out for the moment. Various other issues have been opened to address the features and bugs mentioned above.
Hi!
I can't believe something doesn't already exist that does exactly this. It's so obviously useful :) I'm going to install and test it. I may also be interested in adding DataDog as an event receiver. Let me know if there are any known rough edges or areas you want help!