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

docs: Add cli refrences to the docs around annotations and labels #1988

Merged
merged 5 commits into from
Aug 29, 2023
Merged

Conversation

dfredell
Copy link
Contributor

@dfredell dfredell commented Feb 9, 2023

What this PR does / why we need it: Add links to the command line flags for enabling labels and annotations in the docs

As the docs sit today we had struggled with figuring out why the kube_pod_labels metric were not getting label_POD_LABEL to populate. When we read docs/pod-metrics.md, we got the impression that all LABELS would be scraped and should appear in the metrics. The kubernetes pod itself had the labels on it.
We then stumbled upon #1489 (comment) and lead us to figure out that not all LABELS were extracted by default. Adding --metric-labels-allowlist solved our issue. So this MR is intended to make it more obvious when reading docs/pod-metrics.md that all labels are not scraped by default.

I only added the link to cli-arguments.md on docs that had the Description column.

How does this change affect the cardinality of KSM: does not change cardinality

Which issue(s) this PR fixes : fixes #1489

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 9, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 9, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome @dfredell!

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 size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Feb 9, 2023
@logicalhan
Copy link
Member

/triage accepted
/assign @CatherineF-dev

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 23, 2023
Copy link
Contributor

@fpetkovski fpetkovski left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution 👍

/lgtm

@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 24, 2023
@fpetkovski
Copy link
Contributor

/hold for @CatherineF-dev to take a look

@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 Feb 24, 2023
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 24, 2023
@dfredell
Copy link
Contributor Author

I presented/ reviewed this PR with my team and they caught some of my miss spellings, so I fixed, squashed, and pushed.
s/controled/controlled/ s/persistant/persistent/

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/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 May 25, 2023
@dgrisonnet
Copy link
Member

Hi @dfredell, sorry for letting your PR go stale. The docs improvements that you are proposing look good to me, but it would be great if you could propagate them to all the docs referencing label/annotation metrics.

You can easily find those by running:

grep -rlE "_(labels|annotations)" docs

/remove-lifecycle stale
/unhold
/assign

@k8s-ci-robot k8s-ci-robot removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 13, 2023
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 26, 2023
@k8s-ci-robot k8s-ci-robot removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 21, 2023
@dfredell dfredell changed the title Add cli refrences to the docs around annotations and labels docs: Add cli refrences to the docs around annotations and labels Aug 21, 2023
…ly read in their text form. Used Markdown All in One in VSCode.
@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 28, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 28, 2023
…e about labels and annotations to all markdown files.
@dfredell
Copy link
Contributor Author

@dgrisonnet These docs tables were incredibly hard to read in a text editor without extra white space and formatting. So I through them through https://open-vsx.org/extension/yzhang/markdown-all-in-one

I have added the Description column to those MDs that didn't have them as requested.

@dgrisonnet
Copy link
Member

@mrueg @rexagod any thoughts on this new format for the docs? I am personally fine with the change, but we will need to add a step to the lint to make sure it sticks.

@mrueg
Copy link
Member

mrueg commented Aug 28, 2023

We could probably run https://github.com/marketplace/actions/markdownlint-cli2-action if we wanted to to improve our markdown formatting.

@dgrisonnet
Copy link
Member

I am fine with merging it then. @dfredell thank you for the contribution :)

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dfredell, dgrisonnet, fpetkovski

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 Aug 29, 2023
@k8s-ci-robot k8s-ci-robot merged commit dbd4568 into kubernetes:main Aug 29, 2023
12 checks passed
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/XL Denotes a PR that changes 500-999 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kube_deployment_labels metric missing DEPLOYMENT_LABEL labels
8 participants