Skip to content

Support Multiple Prometheus Queries in LowNodeUtilization Plugin #1833

@kamleshjoshi8102

Description

@kamleshjoshi8102

Is your feature request related to a problem? Please describe.
Yes. Currently, the LowNodeUtilization plugin only supports a single Prometheus query when using metricsUtilization.source: Prometheus. This limitation prevents us from making descheduling decisions based on multiple resource metrics (CPU, memory, disk I/O, etc.) with different thresholds for each.

In production environments, we need to consider multiple utilization metrics simultaneously. For example:

  • A node might have low CPU utilization (30%) but high memory utilization (85%)
  • We want to evict pods from nodes with low CPU OR low memory, but with different threshold values for each resource type
  • Currently, we're forced to either:
    1. Create a combined Prometheus query (which uses max/min/avg and loses granularity)
    2. Use only one metric and ignore others
    3. Fall back to request/limit-based thresholds (which don't reflect actual utilization)

Describe the solution you'd like
I would like the LowNodeUtilization plugin to support multiple Prometheus queries, one for each resource type, similar to how the standard resource-based configuration works.

Describe alternatives you've considered

Proposed configuration:

- name: LowNodeUtilization
  args:
    metricsUtilization:
      source: Prometheus
      prometheus:
        queries:
          cpu: "node:cpu_utilization:avg30m"
          memory: "node:memory_utilization:avg30m"
          # Optional: support for custom metrics
          disk_io: "node:disk_io_utilization:avg30m"
    thresholds:
      cpu: 40
      memory: 50
      disk_io: 30
    targetThresholds:
      cpu: 70
      memory: 80
      disk_io: 60

What version of descheduler are you using?

descheduler version: latest i.e, (v0.34.0)

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions