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

kube state metrics doesn't report init container pod metrics #502

Closed
thedebugger opened this issue Aug 1, 2018 · 7 comments · Fixed by #762
Closed

kube state metrics doesn't report init container pod metrics #502

thedebugger opened this issue Aug 1, 2018 · 7 comments · Fixed by #762
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@thedebugger
Copy link
Contributor

Is this a BUG REPORT or FEATURE REQUEST?:

/kind feature

What happened:
Can't see pod container metrics for init containers.

What you expected to happen:
Should see pod container metrics for init container like the "main" container

How to reproduce it (as minimally and precisely as possible):
deploy a pod with an init container and check for "kube_pod_container_status_terminated" metric. It doesn't contain init metrics.

Anything else we need to know?:
The code right now only looks at ContainerStatus which doesn't provide status for InitContainers

Environment:

  • All Kubernetes version
  • All Kube-state-metrics image version
@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 1, 2018
@brancz
Copy link
Member

brancz commented Aug 2, 2018

There should be metrics on this, however, kube-state-metrics fundamentally only produces metrics for things that can be found in the API object, meaning as long as those don’t have that information we can’t create metrics for it.

@thedebugger
Copy link
Contributor Author

I understand. But what i can tell from source that kube-state-metrics doesn't read the init container status which is available in the API here. Right? I might be able to create a PR to include it if it makes sense. Thoughts?

@brancz
Copy link
Member

brancz commented Aug 6, 2018

Yes that is correct, we'd be more than happy about a PR to add these! 🙂

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 4, 2018
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Dec 4, 2018
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
4 participants