Kube-state-metrics: Annotation metrics

Created on 6 Aug 2019  Â·  12Comments  Â·  Source: kubernetes/kube-state-metrics

As discussed in https://github.com/kubernetes/kube-state-metrics/issues/854 and offline we want to have only specific annotation metrics, we mentioned those good candidates for now are:

• deployment revision
• ingress class

This issue is to discuss the design and what we want to include in the metric, etc. There were a couple of ideas in the above-mentioned issue.

Is this a BUG REPORT or FEATURE REQUEST?:

/kind feature

kinfeature lifecyclrotten

Most helpful comment

+1 another usecase:
Use kube-state-metrics' kube_pod_container_status_restarts_total for alerting frequent container-restarts *) and use annotations to route to the correct team in alert-manager. Annotations can contain characters which label values cannot:

  • #: used for slack-channels
  • @ used for slack-users
  • , to deliver to a comma-delimited list of opsgenie-teams.

I don't see why this is any more problematic than the kube_pod_labels metric, especially as an opt-in metric/feature.

*)

(increase(kube_pod_container_status_restarts_total[1h]) > 5) * on (namespace, pod) group_left(label_my_org_com_opsgenieteam) kube_pod_labels

All 12 comments

I also want to point out that the higher significance and importance of these fields, the lesser the justification of these fields to be actually exposed as annotations. I think we must be mindful of this as well and redirect the question to the k8s.io/api folks when appropriate.

+1 another usecase:
Use kube-state-metrics' kube_pod_container_status_restarts_total for alerting frequent container-restarts *) and use annotations to route to the correct team in alert-manager. Annotations can contain characters which label values cannot:

  • #: used for slack-channels
  • @ used for slack-users
  • , to deliver to a comma-delimited list of opsgenie-teams.

I don't see why this is any more problematic than the kube_pod_labels metric, especially as an opt-in metric/feature.

*)

(increase(kube_pod_container_status_restarts_total[1h]) > 5) * on (namespace, pod) group_left(label_my_org_com_opsgenieteam) kube_pod_labels

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

/remove-lifecycle stale

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

/remove-lifecycle stale

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

/remove-lifecycle stale

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

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

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

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

derekwaynecarr picture derekwaynecarr  Â·  4Comments

raja-gola picture raja-gola  Â·  6Comments

mikekap picture mikekap  Â·  8Comments

natalysheinin picture natalysheinin  Â·  6Comments

sayarg picture sayarg  Â·  4Comments