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

add kube_pod_host_network #1100

Merged
merged 1 commit into from
Mar 19, 2020
Merged

Conversation

stamm
Copy link
Contributor

@stamm stamm commented Mar 18, 2020

What this PR does / why we need it: it adds metric kube_pod_host_network

For example, I need to see metrics for networking bandwidth for pods. But don't want to see a pod with host network, because it show traffic include all node traffic (included all pods traffic on this node)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 18, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @stamm!

It looks like this is your first PR to kubernetes/kube-state-metrics 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/kube-state-metrics has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 18, 2020
docs/pod-metrics.md Outdated Show resolved Hide resolved
@dgrisonnet
Copy link
Member

The use case seems legitimate to me. @brancz do you have any concerns regarding the cardinality of this type of metric?

{
LabelKeys: []string{},
LabelValues: []string{},
Value: boolFloat64(p.Spec.HostNetwork),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not put this into the kube_pod_info metric?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, first commit was about adding additional label to kube_pod_info.
If this better, I can revert commits

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I think that's better

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I just revert commits
But if you want, you can squash on merge

@d-ulyanov
Copy link

That is useful, thanks @stamm
Waiting this feature in next kube-state-metrics release :)

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 19, 2020
@brancz
Copy link
Member

brancz commented Mar 19, 2020

lgtm but giving @dgrisonnet and @lilic and or @tariq1890 another chance to review.

@dgrisonnet
Copy link
Member

lgtm, thank you @stamm.

Copy link
Member

@lilic lilic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind just squashing you commits, thanks!

Waiting this feature in next kube-state-metrics release :)

This will be available only in 2.0 release, if you want to help get there faster feel free to pickup any issues marked as v2. 🎉 :) Thanks!

Otherwise 👍 lgtm after squashing commits

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 19, 2020
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 19, 2020
@stamm
Copy link
Contributor Author

stamm commented Mar 19, 2020

Do you mind just squashing you commits, thanks!

Waiting this feature in next kube-state-metrics release :)

This will be available only in 2.0 release, if you want to help get there faster feel free to pickup any issues marked as v2. 🎉 :) Thanks!

Otherwise 👍 lgtm after squashing commits

Thanks. I've just squashed commits

@stamm
Copy link
Contributor Author

stamm commented Mar 19, 2020

Sorry, I squash different commit. Give me some time to restore commits)

Copy link
Contributor

@tariq1890 tariq1890 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 19, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: stamm, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 19, 2020
@k8s-ci-robot k8s-ci-robot merged commit ab094df into kubernetes:master Mar 19, 2020
@stamm stamm deleted the pod_host_network branch June 2, 2020 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants