kiwigrid/k8s-configmap-watcher

Ruler sidecar crashing during startup due to SIGSEGV

jaygridley opened this issue · 2 comments

Is this a request for help?: No

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Version of Helm and Kubernetes:
Kubernetes: 1.13.7
Helm: 2.14.3

Which chart in which version:
prometheus-thanos / 1.2.1

What happened:
During the startup of sidecar container of Ruler component it crashes with:

│ k8s-configmap-watcher time="2019-08-07T14:52:19Z" level=info msg="Using in cluster config"                                                                                                 │
│ k8s-configmap-watcher time="2019-08-07T14:52:20Z" level=error msg="unknown (get configmaps)"                                                                                               │
│ k8s-configmap-watcher panic: runtime error: invalid memory address or nil pointer dereference                                                                                              │
│ k8s-configmap-watcher [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1011693]                                                                                             │
│                                                                                                                                                                                            │
│ k8s-configmap-watcher goroutine 19 [running]:                                                                                                                                              │
│ k8s-configmap-watcher main.startWatchConfigMaps(0x0, 0x0, 0x0, 0x0, 0xc420042006, 0x13, 0xc420042027, 0xb, 0xc420040038, 0x1f, ...)                                                        │
│ k8s-configmap-watcher     /go/src/github.com/kiwigrid/k8s-configmap-watcher/main.go:81 +0x583                                                                                              │
│ k8s-configmap-watcher created by main.main.func1                                                                                                                                           │
│ k8s-configmap-watcher     /go/src/github.com/kiwigrid/k8s-configmap-watcher/main.go:60 +0x285

What you expected to happen:
Sidecar container should start normally.

How to reproduce it (as minimally and precisely as possible):
Enable sidecar for Ruler and install Helm Chart.

Anything else we need to know:
Currently, we do not have any ConfigMap with the matching label.

thanks @jaygridley I will have a look at it

this is fixed with version 0.1.1 I updated the helm chart but you can also update the values to work with the current helm chart version if you want.