-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
fix: change the expectedType of the kube-client reflector to match the listWatch #720
Conversation
Add list/watch access to ClusterRole for CSR collector
This needs to be merged into the |
Do I understand correctly, that with this we're getting both appsv1 and backward compatible extensionsv1beta1 support back? cc @mxinden |
In that case this pull request needs to point to the |
@brancz I'll have to test with a pod created with that api Group and see if it's captures and represented properly when kube state metric queries the pod. I haven't had much time on my hands off late. Will provide an update on this as soon as I get the bandwidth. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this and it fixes the error for Deployments I was seeing as well. Thanks!
I don't think we need to downgrade the api support to appsv1beta1
for StatefulSets as according to the kube-state-metrics README only 1.10 onwards kubernetes versions are supported and StatefulSets were already out of beta in kubernetes 1.9 version.
Another thing: Would it make sense to adjust this?
I agree with @lilic let's just use v1apps for Deployments, StatefulSets and DaemonSets. It'll also be future proof. |
The way I see it is this would be future proofing and fixing the bug :) |
I just tested a deployment manifest created with I will start implementing @lilic's suggestion now. |
return &metric.Family{ | ||
Metrics: ms, | ||
Metrics: []*metric.Metric{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is merely a simplification.
0fcdde4
to
a7357b7
Compare
a7357b7
to
6131a28
Compare
CI passed and ready for review. |
Would you mind changing the target branch to release-1.6? See #720 (comment). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This worked for me 👍 Thanks!
k8s.io/api/autoscaling/v2beta1 | ||
k8s.io/api/batch/v1 | ||
k8s.io/api/batch/v1beta1 | ||
k8s.io/api/certificates/v1beta1 | ||
k8s.io/api/core/v1 | ||
k8s.io/api/extensions/v1beta1 | ||
k8s.io/api/policy/v1beta1 | ||
k8s.io/api/apps/v1beta1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious why go mods does this change, moves the import in this file. The pkg is not used anymore in the code directly, guessing its used by one of the other deps e.g. client-go internally, but it makes me wonder if we can bump the version of client-go and in turn get rid of these dependencies. (But that might be going down the rabbit hole of solving deps, and probably falls outside of this PR :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense. But yes, this definitely is out of scope for this PR. I believe we have k8s 1.14 depped into kube state metrics. We are just behind the latest by a patch release.
@mxinden Done! |
/lgtm but giving @mxinden the last call /hold |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brancz, tariq1890 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thanks for the fix @tariq1890! /hold cancel |
This issue has a regression, v1.9.6:
|
Is there any response? |
|
Fixes #719
This PR adds what was missed in PR #652.