Commit Graph

6 Commits

Author SHA1 Message Date
Quentin Bisson 7250bc2b5c
Update go module path to k8s.io/kube-state-metrics/v2
Signed-off-by: Quentin Bisson <quentin@giantswarm.io>
2020-09-21 10:58:08 +02:00
Damien Grisonnet 2483d78a1b internal/store: convert k8s labels to snake case
According to Prometheus best practices, labels should be written in
snake_case.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2020-07-06 15:23:31 +02:00
Benjamin a2743b63ea Fix VolumeAttachment API version mismatch: expected v1 but watching v1beta1
Signed-off-by: Benjamin <benjamin@yunify.com>
2020-05-06 18:43:41 +08:00
Frederic Branczyk 834a0c0d06
volumeattachment: Fix instrumentation guideline violation 2020-04-08 10:55:33 +02:00
cedric lamoriniere 0a3c7d7fe3 create builder public package
* Allow to extend the internal Builder
* All logics still internal
* Add in `metric.Family` the metric family `Type` (counter, gauge)

Signed-off-by: cedric lamoriniere <cedric.lamoriniere@datadoghq.com>
2019-12-13 10:50:19 +01:00
Jens Erat 4e637854a2
add VolumeAttachment collector
Kubernetes has a new resource type: `VolumeAttachments`. They provide
helpful information on where a volume is attached and to alert on
unexpected attachment status (for example, differences between
information scraped from node-exporter and kube-state-metrics).

The collector adds a bunch of new metrics. Each VolumeAttachment (ie.,
each CSI-attached volume) will have one of each, so we do not overly
pollute the metrics space. Most metrics are rather unsurprising.

- `kube_volumeattachment_status_attachment_metadata`: provides a
  label-like export of the attachment metadata map. Generalizing the
  label-conversion function slightly helps at providing this metric.
- `kube_volumeattachment_created`: as VolumeAttachments are
  automatically created and we already suffered from duplicate
  `VolumeAttachments`, this can be invaluable for debugging
  misattachments.
- `kube_volumeattachment_spec_source_persistentvolume`: will only be
  generated when the volume source is of `PersistentVolume` type. The
  other type `inlineVolumeSpec` is still alpha-level and hard to map to
  metrics.

No end-to-end test manifest was added, as `VolumeAttachment`s are
automatically generated when mounting volumes.

Signed-off-by: Jens Erat <email@jenserat.de>
2019-10-13 21:36:50 +02:00