Skip to content

Support capturing hpa targets as metrics #38767

Open
@atoulme

Description

@atoulme

Component(s)

receiver/k8scluster

Is your feature request related to a problem? Please describe.

HPA objects define one or more targets that trigger a change in scale. These targets are not reported right now.

Describe the solution you'd like

Add metrics to capture and expose HPA targets.

A HPA typically defines its target as part of the resources it is associated with or part of a selector.

Example:

spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: StatefulSet
    name: sample-app
  minReplicas: 1
  maxReplicas: 10
  metrics:
  - type: Resource # can be custom metrics as well - Pod and Object type
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 50
  - type: Resource
    resource:
      name: memory
      target:
        type: AverageValue
        averageValue: 500Mi
  - type: Object
    object:
      metric:
        name: requests-per-second
      describedObject:
        apiVersion: networking.k8s.io/v1
        kind: Ingress
        name: main-route
      target:
        type: Value
        value: 10k

Describe alternatives you've considered

No alternatives currently exist. I will also engage with semantic conventions to cement the naming and data model associated with this issue.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions