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

*: Remove non-identifying labels from pod metrics #1009

Merged
merged 1 commit into from
Feb 10, 2020

Conversation

philipgough
Copy link
Contributor

What this PR does / why we need it:

Fixes #979

@lilic I made a start on this and I can't see anything else that I would consider "non-identifying" labels.

I also wondered about the removal of node name from metrics re cpu/mem usage, perhaps it is still valid there?

@k8s-ci-robot k8s-ci-robot added do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 19, 2019
@@ -57,8 +57,8 @@ var (

m := metric.Metric{

LabelKeys: []string{"host_ip", "pod_ip", "uid", "node", "created_by_kind", "created_by_name", "priority_class"},
LabelValues: []string{p.Status.HostIP, p.Status.PodIP, string(p.UID), p.Spec.NodeName, createdByKind, createdByName, p.Spec.PriorityClassName},
LabelKeys: []string{"host_ip", "pod_ip", "uid", "created_by_kind", "created_by_name", "priority_class"},
Copy link
Member

Choose a reason for hiding this comment

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

This “info” type metric is ok to have it, just not all metrics. The idea is that any other metric can be easily joined with this one to add metadata when needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@brancz thanks makes sense. So replacing here and removing from all other Pod metrics is sufficient?

Copy link
Member

Choose a reason for hiding this comment

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

Yes I think so. I'll try and see if I can find any other cases in my review, but I believe this was all of them.

@lilic
Copy link
Member

lilic commented Dec 20, 2019

/hold

until the current release is out

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 20, 2019
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.

@brancz do you mind re-reviewing this please!

@lilic lilic changed the title Fixes 979 *: Remove non-identifying labels from pod metrics Feb 5, 2020
@brancz
Copy link
Member

brancz commented Feb 5, 2020

/lgtm

Nice! :)

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 5, 2020
@brancz
Copy link
Member

brancz commented Feb 5, 2020

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 5, 2020
@lilic
Copy link
Member

lilic commented Feb 5, 2020

@philipgough you need to fixup manually as bot is complaining it seems, do you mind merging all into one single commit, thanks!

do-not-merge/invalid-commit-message

Fixes kubernetes#979

test:store - Updates unit test to reflect removal of 'node' name from labels

test: Update main_test for removal of node label from pod metrics
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 7, 2020
@k8s-ci-robot
Copy link
Contributor

Keywords which can automatically close issues and at(@) mentions are not allowed in commit messages.

The list of commits with invalid commit messages:

  • 58e7c50 store: Remove non-identifying labels from pod metrics

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. I understand the commands that are listed here.

@philipgough
Copy link
Contributor Author

philipgough commented Feb 7, 2020

@lilic, sorry, this needed a rebase by the time I got around to it so might need another review. Squashed as requested.

@brancz
Copy link
Member

brancz commented Feb 7, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 7, 2020
@lilic lilic removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Feb 10, 2020
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.

/lgtm

@k8s-ci-robot k8s-ci-robot merged commit cfa1551 into kubernetes:master Feb 10, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brancz, LiliC, PhilipGough

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

@philipgough philipgough deleted the fixes-979 branch February 10, 2020 10:46
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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v2: Remove non-identifying labels from pod metrics
4 participants