Skip to content

[BUG] External metric values incorrectly interpreted by HPA #2436

Description

@ctpeter

Pre-submission Checklist

  • I have searched existing issues and this is not a duplicate
  • This is a Helm chart issue, not a Datadog product/service problem

Helm chart name

datadog

Helm chart version

latest

Bug Report

What happened

We are using HPA with an external metric from Datadog via DatadogMetric CRD.

Example metric query:

max:kubernetes.cpu.usage.total{cluster_name:xxxxx, kube_deployment:xxxxx}.rollup(max,60)

HPA displays the metric as:

650634457m / 384M # CPU

Datadog shows the current value as 650634.4566410647

What we expected

  • HPA should interpret the external metric value in the correct units (nanocores → millicores)
  • The CURRENT column in kubectl get hpa should match the Datadog metric scale

Steps to Reproduce

No response

Environment

Kubernetes version:
Helm version:
Cloud provider:

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