Kube-state-metrics: deployment condition metrics

Created on 16 Sep 2019  路  4Comments  路  Source: kubernetes/kube-state-metrics

Is this a BUG REPORT or FEATURE REQUEST?:

/kind feature

What happened:

A deployment rollout stalled, no metrics from Kube State Metrics made this condition clear.

What you expected to happen:

KSM to have deployment status conditions available, similar to node status conditions.

kube_deployment_status_condition{deployment="example", namespace="default", condition="ReplicaFailure", status="true"} 1

How to reproduce it (as minimally and precisely as possible):

Look at the metrics produced by KSM and see no deployment status conditions are created.

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version):
  • Kube-state-metrics image version: v1.6.0
kinfeature

Most helpful comment

This seems reasonable to me @terinjokes . Feel free to send in a PR.

All 4 comments

I don't mind implementing this, if the feature request seems sound.

@terinjokes thanks for the feature. Sounds reasonable at first glance, do we know if the conditions are a predefined list, or can they include any error that occurs in deployment creation? Just trying to avoid unbound high cardinality metrics.

@LiliC Based on the source code, there are three well-known conditions. These are also the only three I've seen in practice.

Is that a reasonable amount of additional cardinality?

This seems reasonable to me @terinjokes . Feel free to send in a PR.

Was this page helpful?
0 / 5 - 0 ratings