kubernetes / kube-state-metrics

Add-on agent to generate and expose cluster-level metrics.
https://kubernetes.io/docs/concepts/cluster-administration/kube-state-metrics/
Apache License 2.0
5.4k stars 2.01k forks source link

Remove Verticalpodautoscaler Collector (VPA) #1790

Closed mrueg closed 1 year ago

mrueg commented 2 years ago

As we have now an implementation to collect metrics from Custom Resources, we want to remove the VPA Collector in KSM v3.0

ninlil commented 2 years ago

I fully understand the argument to remove the VPA Collector, but it's not possible right now.

The values from the vpa-recommender looks like this:

...
status:
  conditions:
  - lastTransitionTime: "2022-07-04T13:40:27Z"
    status: "True"
    type: RecommendationProvided
  recommendation:
    containerRecommendations:
    - containerName: main
      lowerBound:
        cpu: 25m
        memory: 262144k
      target:
        cpu: 25m
        memory: 262144k
      uncappedTarget:
        cpu: 25m
        memory: 262144k
      upperBound:
        cpu: 25m
        memory: 262144k

and the "25m" cant be converted to a value... will just result in this:

E0826 12:39:39.333864  925520 registry_factory.go:556] "kube_autoscaling_k8s_io_v1_verticalpodautoscaler_cpu_rec" err="[status,recommendation,containerRecommendations,0,target]: [cpu]: []: strconv.ParseFloat: parsing \"25m\": invalid syntax"

As I see it, either: a) update the VPA Collector to apiVersion autoscaling.k8s.io/v1 (according to #1718 ) b) implement a parser/converter for values that can convert the measurement unit to a plain value.

rexagod commented 2 years ago

/assign

k8s-triage-robot commented 1 year ago

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

This bot triages issues and PRs according to the following rules:

You can:

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

/lifecycle stale

mrueg commented 1 year ago

/remove-lifecycle stale