Giter Site home page Giter Site logo

Comments (5)

brancz avatar brancz commented on August 27, 2024 1

Looks like we need a guard around deployment.go:153, for the time being you should be able to disable the deployments collector and it should work. You can specify collectors with the -collectors flag. So that would look like:

kube-state-metrics -collectors=resourcequotas,replicasets,daemonsets,pods,nodes

Note I intentionally left out the deployment collector in that list

from kube-state-metrics.

brancz avatar brancz commented on August 27, 2024

To perform some testing myself in the mean time, until the new image is published on gcr I have an image at quay.io/brancz/kube-state-metrics:v0.4.0, could you try that image?

from kube-state-metrics.

rvrignaud avatar rvrignaud commented on August 27, 2024

Hello @brancz ,

I have same behavior with you image:

I0210 16:30:55.774545       1 main.go:139] Using default collectors
I0210 16:30:55.774749       1 main.go:186] service account token present: true
I0210 16:30:55.774758       1 main.go:187] service host: https://10.255.240.1:443
I0210 16:30:55.775172       1 main.go:213] Testing communication with server
I0210 16:30:55.802572       1 main.go:218] Communication with server successful
I0210 16:30:55.802770       1 main.go:263] Active collectors: resourcequotas,replicasets,daemonsets,deployments,pods,nodes
I0210 16:30:55.802784       1 main.go:227] Starting metrics server: :8080
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x40218e]
goroutine 126 [running]:
panic(0x13249e0, 0xc420014030)
	/usr/local/go/src/runtime/panic.go:500 +0x1a1
main.(*deploymentCollector).collectDeployment(0xc42047a3a0, 0xc4202bf800, 0x0, 0x0, 0x0, 0x0, 0xc420257454, 0x6, 0x0, 0x0, ...)
	/home/brancz/go/src/k8s.io/kube-state-metrics/deployment.go:153 +0x27e
main.(*deploymentCollector).Collect(0xc42047a3a0, 0xc4202bf800)
	/home/brancz/go/src/k8s.io/kube-state-metrics/deployment.go:135 +0x133
k8s.io/kube-state-metrics/vendor/github.com/prometheus/client_golang/prometheus.(*Registry).Gather.func2(0xc4209fdbd0, 0xc4202bf800, 0x1c77b80, 0xc42047a3a0)
	/home/brancz/go/src/k8s.io/kube-state-metrics/vendor/github.com/prometheus/client_golang/prometheus/registry.go:433 +0x63
created by k8s.io/kube-state-metrics/vendor/github.com/prometheus/client_golang/prometheus.(*Registry).Gather
	/home/brancz/go/src/k8s.io/kube-state-metrics/vendor/github.com/prometheus/client_golang/prometheus/registry.go:434 +0x326

from kube-state-metrics.

stvnwrgs avatar stvnwrgs commented on August 27, 2024

I get the same problem with your quay.io/brancz/kube-state-metrics:v0.4.0 image.

from kube-state-metrics.

brancz avatar brancz commented on August 27, 2024

Fix is merged and v0.4.1 is released. Still waiting for images to be pushed.

from kube-state-metrics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.