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

tags/labels missing for daemonset, deployment, and replicaset metrics #1239

Closed
jimmyseto opened this issue Sep 22, 2020 · 10 comments · Fixed by #1240
Closed

tags/labels missing for daemonset, deployment, and replicaset metrics #1239

jimmyseto opened this issue Sep 22, 2020 · 10 comments · Fixed by #1240
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@jimmyseto
Copy link
Contributor

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug

/kind feature

What happened:
metrics for daemonset, deployment, and replicaset no longer export tags/labels

What you expected to happen:
metrics for daemonset, deployment, and replicaset to include tags/labels

How to reproduce it (as minimally and precisely as possible):
create daemonset, deployment, or replicaset. poll kube-state-metrics endpoint. look at, for example, kube_replicaset_created metrics. observe no tags/labels are attached to it.

Anything else we need to know?:
v1.9.7 does not exhibit this issue. below is a sample comparison with kube_*_created. the same behavior is observed with all daemonset, deployment, and replicaset metrics.

v2.0.0-alpha:
kube_replicaset_created 1.600788121e+09

kube_deployment_created 1.600788121e+09

kube_daemonset_created 1.600790245e+09=

kube_configmap_created{namespace="openshift-console",configmap="console-config"} 1.600780846e+09

v1.9.7:
kube_replicaset_created{namespace="openshift-console",replicaset="console-fcbd85f55"} 1.600780846e+09

kube_deployment_created{namespace="openshift-web-console",deployment="webconsole"} 1.600780806e+09

kube_daemonset_created{namespace="openshift-node",daemonset="sync"} 1.600780702e+09

kube_configmap_created{namespace="openshift-console",configmap="console-config"} 1.600780846e+

Environment:

  • Kubernetes version (use kubectl version):
    Client Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.0+d4cacc0", GitCommit:"d4cacc0", GitTreeState:"clean", BuildDate:"2018-10-15T09:45:30Z", GoVersion:"go1.10.2", Compiler:"gc", Platform:"linux/amd64"}
    Server Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.0+d4cacc0", GitCommit:"d4cacc0", GitTreeState:"clean", BuildDate:"2020-09-04T19:45:00Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"}

Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.6", GitCommit:"dff82dc0de47299ab66c83c626e08b245ab19037", GitTreeState:"clean", BuildDate:"2020-07-15T16:58:53Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.6", GitCommit:"dff82dc0de47299ab66c83c626e08b245ab19037", GitTreeState:"clean", BuildDate:"2020-07-15T16:51:04Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}

  • Kube-state-metrics image version
    quay.io/coreos/kube-state-metrics:v2.0.0-alpha
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 22, 2020
@jimmyseto
Copy link
Contributor Author

@lilic fyi. thanks.

@lilic
Copy link
Member

lilic commented Sep 23, 2020

@jimmyseto Thanks for the issue, can you share the deployment for kube-state-metrics itself, thanks!

@jimmyseto
Copy link
Contributor Author

@jimmyseto Thanks for the issue, can you share the deployment for kube-state-metrics itself, thanks!

@lilic i just deployed using what's in example/standard (https://github.com/kubernetes/kube-state-metrics/tree/master/examples/standard).

@lilic lilic self-assigned this Sep 24, 2020
@jimmyseto
Copy link
Contributor Author

just as another datapoint, using the same deployment (and simply changing the image to 1.9.7), i see the expected results.

@lilic
Copy link
Member

lilic commented Sep 24, 2020

@jimmyseto thanks, I could reproduce it locally, looking into what was causing the problem, I have a suspicion. Thank you so much for your testing and the report, its super useful! 🎉

@jw-s
Copy link
Contributor

jw-s commented Sep 24, 2020

@lilic Looks like it's a closure loop issue with the label filtering. I fix it here https://github.com/kubernetes/kube-state-metrics/pull/1041/files#diff-5ca58d412bc2ec4e34ceaa2ad2cde1eb

@Rmond
Copy link

Rmond commented Sep 25, 2020

I met same problem on v2.0.0-alpha

image

@lilic
Copy link
Member

lilic commented Sep 25, 2020

@jw-s thanks, do you mind adding that bug fix in a separate PR, as we want to backport that to the release-2.0 branch, thanks!

jw-s added a commit to jw-s/kube-state-metrics that referenced this issue Sep 25, 2020
Signed-off-by: Joel Whittaker-Smith <jdws.dev@gmail.com>
@jw-s
Copy link
Contributor

jw-s commented Sep 28, 2020

@lilic No worries, I've raised the PR

@jimmyseto
Copy link
Contributor Author

thanks for the quick turnaround on this, @jw-s ! verified with a manual build of the latest/greatest off the release-2.0 branch, and confirmed that this is now fixed.

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

Successfully merging a pull request may close this issue.

5 participants