Skip to content

Conversation

@faizan-exe
Copy link
Contributor

@faizan-exe faizan-exe commented Jan 21, 2026

Description

This PR enables Horizontal Pod Autoscaling for Admission Pods. Previously, user can only specifiy fixed number of replicas for admission pods using kai-config.yaml - now they have the option to enable autoscaling and avoid manual configuration.

The metric for autoscaling is controller_runtime_webhook_requests_in_flight.

Prometheus Adapter is also introduced for interacting with Custom Metrics API.

Related Issues

Issue #901

Checklist

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

Breaking Changes

No breaking changes. Backward Compatibility is being ensured.

Signed-off-by: Ahmed Faizan <faizanofficial120@gmail.com>
Signed-off-by: Ahmed Faizan <faizanofficial120@gmail.com>
Signed-off-by: Ahmed Faizan <faizanofficial120@gmail.com>
@faizan-exe faizan-exe requested a review from enoodle January 24, 2026 14:53
Signed-off-by: Ahmed Faizan <faizanofficial120@gmail.com>
@github-actions
Copy link

Merging this branch changes the coverage (1 decrease, 1 increase)

Impacted Packages Coverage Δ 🤖
github.com/NVIDIA/KAI-scheduler/pkg/apis/kai/v1/admission 20.37% (-0.68%) 👎
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission 87.77% (+0.57%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/NVIDIA/KAI-scheduler/pkg/apis/kai/v1/admission/admission.go 100.00% (ø) 22 (+6) 22 (+6) 0
github.com/NVIDIA/KAI-scheduler/pkg/apis/kai/v1/admission/zz_generated.deepcopy.go 0.00% (ø) 86 (+26) 0 86 (+26)
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission/admission.go 72.00% (ø) 25 18 7
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission/resources.go 91.23% (+0.23%) 114 (+14) 104 (+13) 10 (+1) 👍

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/apis/kai/v1/admission/admission_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission/resources_test.go

@github-actions
Copy link

Merging this branch changes the coverage (1 decrease, 1 increase)

Impacted Packages Coverage Δ 🤖
github.com/NVIDIA/KAI-scheduler/pkg/apis/kai/v1/admission 20.37% (-0.68%) 👎
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission 87.77% (+0.57%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/NVIDIA/KAI-scheduler/pkg/apis/kai/v1/admission/admission.go 100.00% (ø) 22 (+6) 22 (+6) 0
github.com/NVIDIA/KAI-scheduler/pkg/apis/kai/v1/admission/zz_generated.deepcopy.go 0.00% (ø) 86 (+26) 0 86 (+26)
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission/admission.go 72.00% (ø) 25 18 7
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission/resources.go 91.23% (+0.23%) 114 (+14) 104 (+13) 10 (+1) 👍

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/apis/kai/v1/admission/admission_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission/resources_test.go

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.

2 participants