Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReplicaSet unexpected type in v1.7.0-rc.0 #815

Closed
brancz opened this issue Jul 10, 2019 · 4 comments
Closed

ReplicaSet unexpected type in v1.7.0-rc.0 #815

brancz opened this issue Jul 10, 2019 · 4 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@brancz
Copy link
Member

brancz commented Jul 10, 2019

Is this a BUG REPORT or FEATURE REQUEST?:

/kind bug

What happened:

Logs showed:

E0710 17:49:42.568957       1 reflector.go:342] k8s.io/kube-state-metrics/internal/store/builder.go:295: expected type *v1beta1.ReplicaSet, but watch event object had type *v1.ReplicaSet

What you expected to happen:

Only non-error logs.

How to reproduce it (as minimally and precisely as possible):

Always with v1.7.0-rc.0

Anything else we need to know?:

n/a

Environment:

  • Kubernetes version (use kubectl version): v1.15.0 minikube
  • Kube-state-metrics image version: v1.7.0-rc.0

@tariq1890 @lilic @mxinden @andyxning

@brancz brancz added the kind/bug Categorizes issue or PR as related to a bug. label Jul 10, 2019
@tariq1890
Copy link
Contributor

Thanks for reporting @brancz. I can push the fix for this.

@lilic
Copy link
Member

lilic commented Jul 10, 2019

@brancz @tariq1890 Good catch and quick fix! 🎉

It would be a good idea to have a test to make sure the kube-state-metrics has 0 errors in the logs as part of the e2e test suite.

Also erroring out and terminating the pod on any errors like this, so we (in CI) and the users (in their clusters) detect problems sooner and easier. I had an RBAC problem and while kube-state-metrics was up and running, certain resources were not working and while the logs were reporting not being able to list/watch those resource, I was expecting the pod to be terminated in that case and not just log that.

WDYT?

(Happy to tackle those if everyone agrees on those)

@brancz
Copy link
Member Author

brancz commented Jul 10, 2019

No errors in logs is something we can do immediately I think (not blocking v1.7.0, but we can immediately get started working on that), go for it! :)

Erroring out needs a bit more thought and major refactorings I think, I'm not even sure it's entirely possible with the way informers work today, but I'd be happy to see this!

@brancz
Copy link
Member Author

brancz commented Jul 10, 2019

Closed by #816. @lilic feel free to create a separate ticket for what you mentioned in #815 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants