volcano-sh / volcano

A Cloud Native Batch System (Project under CNCF)
https://volcano.sh
Apache License 2.0
4.11k stars 949 forks source link

Support to get the metric data from a prometheus metric api with basic auth enabled #3737

Open zhifanggao opened 1 week ago

zhifanggao commented 1 week ago

support to get the metrics data from prometheus metric api with basic auth enabled

the configmap of volcano-scheduler can be like this:

actions: "enqueue, allocate, backfill"
tiers:
- plugins:
  - name: priority
  - name: conformance
  - name: usage
    enablePredicate: false
    arguments:
      usage.weight: 50
      cpu.weight: 1
      memory.weight: 1
      thresholds:
        cpu: 80
        mem: 70
- plugins:
  - name: overcommit
  - name: drf
    enablePreemptable: false
  - name: predicates
  - name: proportion
  - name: nodeorder
  - name: binpack
  - name: gang
metrics:
  type: prometheus
  address: http://xxx:9090/
  basicauth: true
  username: yy
  password: zz
  interval: 30s
Monokaix commented 1 week ago

Hi,can you also update the usage design doc first?

lowang-bh commented 1 week ago

relative PR https://github.com/volcano-sh/volcano/pull/2961

zhifanggao commented 1 week ago

relative PR #2961

👍, I will check the PR.

volcano-sh-bot commented 1 week ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: To complete the pull request process, please assign monokaix You can assign the PR to them by writing /assign @monokaix in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/volcano-sh/volcano/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
zhifanggao commented 1 week ago

Hi,can you also update the usage design doc first?

changed