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

expected type *v1beta1.Deployment, but watch event object had type *v1.Deployment #719

Closed
gjcarneiro opened this issue Apr 10, 2019 · 5 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@gjcarneiro
Copy link

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug

/kind feature

What happened:

Deployed quay.io/coreos/kube-state-metrics:v1.6.0-rc.0

I keep getting these messages in logs, over and over:

E0410 15:22:20.836131       1 reflector.go:329] k8s.io/kube-state-metrics/internal/collector/builder.go:482: expected type *v1beta1.Deployment, but watch event object had type *v1.Deployment
E0410 15:22:20.842987       1 reflector.go:329] k8s.io/kube-state-metrics/internal/collector/builder.go:482: expected type *v1beta1.Deployment, but watch event object had type *v1.Deployment
E0410 15:22:20.876726       1 reflector.go:329] k8s.io/kube-state-metrics/internal/collector/builder.go:482: expected type *v1beta1.Deployment, but watch event object had type *v1.Deployment

What you expected to happen:

It shouldn't log errors.

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

This my deployment yaml file:

kube-state-metrics.yaml.txt

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version): v1.13.3
  • Kube-state-metrics image version v1.6.0-rc.0
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 10, 2019
@tariq1890
Copy link
Contributor

tariq1890 commented Apr 10, 2019

Thanks for reporting this issue. We used extensions apiGroup for the sake of supporting older versions of k8s.

If we are to move the apiGroup to core v1 , we would need to look into updating the compatibility of matrix of kube-state-metrics v1.6.0.

Thoughts @brancz?

@brancz
Copy link
Member

brancz commented Apr 11, 2019

Is that so? Workloads went v1 in 1.9 if I recall correctly, so our compatibility matrix is correct as is (it says we don't even make any support claims about 1.9 at this point). Is the extensions API still available in the latest versions?

@tariq1890
Copy link
Contributor

So I checked release-1.14. The extensions API is still there but it does say that extensions/v1beta1 is deprecated in favour of apps/v1beta2/ https://github.com/kubernetes/api/blob/d687e77c8ae999eab9ebad49439d16e61add0df0/extensions/v1beta1/types.go#L82

It doesn't seem to explain this error though. Will have to dig deeper.

@tariq1890
Copy link
Contributor

Please disregard my earlier comments.

This should be fixed by #720

@tariq1890
Copy link
Contributor

I think this can be closed now.

@brancz brancz closed this as completed Apr 19, 2019
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

4 participants