Skip to content

Commit

Permalink
Merge pull request kubernetes#7338 from atwamahmoud/master
Browse files Browse the repository at this point in the history
Report only injected pods after enforcing pod limit
  • Loading branch information
k8s-ci-robot authored Oct 3, 2024
2 parents a886e80 + b185b14 commit 6053af1
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
)

const (

// InjectedMetricsLabel is the label for unschedulable pods metric for injected pods.
InjectedMetricsLabel = "injected"
// SkippedInjectionMetricsLabel is the label for unschedulable pods metric for pods that was not injected due to limit.
Expand Down Expand Up @@ -52,11 +51,11 @@ func (p *EnforceInjectedPodsLimitProcessor) Process(ctx *context.AutoscalingCont

for _, pod := range unschedulablePods {
if IsFake(pod) {
injectedFakePodsCount += 1
if removedFakePodsCount < numberOfFakePodsToRemove {
removedFakePodsCount += 1
continue
}
injectedFakePodsCount += 1
}

unschedulablePodsAfterProcessing = append(unschedulablePodsAfterProcessing, pod)
Expand Down

0 comments on commit 6053af1

Please sign in to comment.