You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/metrics/extend/customresourcestate-metrics.md
+210Lines changed: 210 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -361,6 +361,216 @@ spec:
361
361
362
362
The above configuration was tested on [this](https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/examples/hamster.yaml) VPA configuration, with an added annotation (`foo: 123`).
363
363
364
+
#### All VerticalPodAutoscaler Metrics
365
+
366
+
As an addition for the above configuration, here's the complete `CustomResourceStateMetrics` spec to re-enable all of the VPA metrics which are removed from the list of the default resources:
367
+
368
+
<details>
369
+
370
+
<summary>VPA CustomResourceStateMetrics</summary>
371
+
```yaml
372
+
kind: CustomResourceStateMetrics
373
+
spec:
374
+
resources:
375
+
- groupVersionKind:
376
+
group: autoscaling.k8s.io
377
+
kind: "VerticalPodAutoscaler"
378
+
version: "v1"
379
+
labelsFromPath:
380
+
namespace: [metadata, namespace]
381
+
target_api_version: [spec, targetRef, apiVersion]
382
+
target_kind: [spec, targetRef, kind]
383
+
target_name: [spec, targetRef, name]
384
+
verticalpodautoscaler: [metadata, name]
385
+
metricNamePrefix: "kube"
386
+
metrics:
387
+
# kube_verticalpodautoscaler_annotations
388
+
- name: "verticalpodautoscaler_annotations"
389
+
help: "Kubernetes annotations converted to Prometheus labels."
390
+
each:
391
+
type: Info
392
+
info:
393
+
labelsFromPath:
394
+
# annotation_*: [metadata, annotations]
395
+
name: [metadata, name]
396
+
# kube_verticalpodautoscaler_labels
397
+
- name: "verticalpodautoscaler_labels"
398
+
help: "Kubernetes labels converted to Prometheus labels."
The configuration supports three kind of metrics from the [OpenMetrics specification](https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md).
0 commit comments