Skip to content

fix: Add a dedicated service for accounting prometheus#896

Merged
itsomri merged 3 commits intomainfrom
omric/add-explicit-prometheus-service
Jan 20, 2026
Merged

fix: Add a dedicated service for accounting prometheus#896
itsomri merged 3 commits intomainfrom
omric/add-explicit-prometheus-service

Conversation

@itsomri
Copy link
Collaborator

@itsomri itsomri commented Jan 19, 2026

Description

This PR adds a dedicated service for the prometheus instance, instead of relying on the default service that's created by the prometheus operator - this is to avoid collisions with other prometheus instances that might be deployed on the kai-scheduler namespace

Checklist

  • Self-reviewed
  • Added/updated tests (if needed)
  • Updated documentation (if needed)

@github-actions
Copy link

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/NVIDIA/KAI-scheduler/pkg/apis/kai/v1/prometheus 0.00% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/prometheus 65.22% (+2.21%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler 79.14% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/NVIDIA/KAI-scheduler/pkg/apis/kai/v1/prometheus/prometheus.go 0.00% (ø) 25 (+1) 0 25 (+1)
github.com/NVIDIA/KAI-scheduler/pkg/apis/kai/v1/prometheus/zz_generated.deepcopy.go 0.00% (ø) 94 (+4) 0 94 (+4)
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/prometheus/prometheus.go 25.58% (+0.58%) 129 (+1) 33 (+1) 96 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/prometheus/resources.go 88.89% (+0.41%) 216 (+25) 192 (+23) 24 (+2) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/resources_for_shard.go 87.70% (ø) 122 107 15

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/prometheus/prometheus_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/resources_test.go

@itsomri itsomri force-pushed the omric/add-explicit-prometheus-service branch from c1cfaac to c47f216 Compare January 19, 2026 17:37
@itsomri itsomri enabled auto-merge January 19, 2026 19:23
davidLif
davidLif previously approved these changes Jan 20, 2026
@davidLif davidLif force-pushed the omric/add-explicit-prometheus-service branch from c47f216 to 32642ec Compare January 20, 2026 08:41
@itsomri itsomri disabled auto-merge January 20, 2026 09:03
@itsomri itsomri force-pushed the omric/add-explicit-prometheus-service branch from 32642ec to c47f216 Compare January 20, 2026 09:04
@itsomri itsomri enabled auto-merge January 20, 2026 09:04
@itsomri itsomri added this pull request to the merge queue Jan 20, 2026
@github-actions
Copy link

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/NVIDIA/KAI-scheduler/pkg/apis/kai/v1/prometheus 0.00% (ø)
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/prometheus 65.22% (+2.21%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler 79.14% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/NVIDIA/KAI-scheduler/pkg/apis/kai/v1/prometheus/prometheus.go 0.00% (ø) 25 (+1) 0 25 (+1)
github.com/NVIDIA/KAI-scheduler/pkg/apis/kai/v1/prometheus/zz_generated.deepcopy.go 0.00% (ø) 94 (+4) 0 94 (+4)
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/prometheus/prometheus.go 25.58% (+0.58%) 129 (+1) 33 (+1) 96 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/prometheus/resources.go 88.89% (+0.41%) 216 (+25) 192 (+23) 24 (+2) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/resources_for_shard.go 87.70% (ø) 122 107 15

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/prometheus/prometheus_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/resources_test.go

Merged via the queue into main with commit 8f2c177 Jan 20, 2026
13 of 14 checks passed
@itsomri itsomri deleted the omric/add-explicit-prometheus-service branch January 20, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants