Skip to content

External Metrics Provider Implementation for Karmada #6614

@PranjaliBhardwaj

Description

@PranjaliBhardwaj

The Core Issue
The Karmada metrics adapter had an incomplete implementation of external metrics functionality. The GetExternalMetric method was returning an error: "karmada-metrics-adapter still not implement it", which meant:
HPA with External Metrics Failed: HorizontalPodAutoscaler configurations using external metrics would fail
Missing Multi-cluster Metrics Support: No way to aggregate external metrics from member clusters
Incomplete Metrics Infrastructure: The metrics adapter was only partially functional.

Why This Problem Exists
External metrics are crucial for autoscaling based on external systems (databases, message queues, APIs)
Karmada's multi-cluster architecture requires metrics aggregation from member clusters
The original implementation was a placeholder that prevented actual functionality

Location and Context
Files Modified
Primary: pkg/metricsadapter/provider/externalmetrics.go - Core implementation
Supporting: pkg/metricsadapter/adapter.go - Integration with metrics adapter
Infrastructure: pkg/metricsadapter/controller.go - Added SecretLister support
Testing: pkg/metricsadapter/provider/externalmetrics_test.go - Comprehensive tests

Why its important:
Scale based on business metrics (not just CPU/memory)
Aggregate metrics across clusters for intelligent decisions
Support enterprise workloads with external dependencies
Optimize costs through intelligent scaling

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions