Skip to content

Commit ee360d4

Browse files
authored
Merge pull request #8253 from yalosev/fix/vpa-in-place-metrics
Fix(VPA): updater in-place metrics initialization
2 parents 08b281d + 8c51ff6 commit ee360d4

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

vertical-pod-autoscaler/pkg/updater/logic/updater.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,12 @@ func (u *updater) RunOnce(ctx context.Context) {
212212
// wrappers for metrics which are computed every loop run
213213
controlledPodsCounter := metrics_updater.NewControlledPodsCounter()
214214
evictablePodsCounter := metrics_updater.NewEvictablePodsCounter()
215-
inPlaceUpdatablePodsCounter := metrics_updater.NewInPlaceUpdtateablePodsCounter()
215+
inPlaceUpdatablePodsCounter := metrics_updater.NewInPlaceUpdatablePodsCounter()
216216
vpasWithEvictablePodsCounter := metrics_updater.NewVpasWithEvictablePodsCounter()
217217
vpasWithEvictedPodsCounter := metrics_updater.NewVpasWithEvictedPodsCounter()
218218

219-
vpasWithInPlaceUpdatablePodsCounter := metrics_updater.NewVpasWithInPlaceUpdtateablePodsCounter()
220-
vpasWithInPlaceUpdatedPodsCounter := metrics_updater.NewVpasWithInPlaceUpdtatedPodsCounter()
219+
vpasWithInPlaceUpdatablePodsCounter := metrics_updater.NewVpasWithInPlaceUpdatablePodsCounter()
220+
vpasWithInPlaceUpdatedPodsCounter := metrics_updater.NewVpasWithInPlaceUpdatedPodsCounter()
221221

222222
// using defer to protect against 'return' after evictionRateLimiter.Wait
223223
defer controlledPodsCounter.Observe()

vertical-pod-autoscaler/pkg/utils/metrics/updater/updater.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,19 +164,19 @@ func AddEvictedPod(vpaSize int) {
164164
evictedCount.WithLabelValues(strconv.Itoa(log2)).Inc()
165165
}
166166

167-
// NewInPlaceUpdtateablePodsCounter returns a wrapper for counting Pods which are matching in-place update criteria
168-
func NewInPlaceUpdtateablePodsCounter() *SizeBasedGauge {
169-
return newSizeBasedGauge(evictableCount)
167+
// NewInPlaceUpdatablePodsCounter returns a wrapper for counting Pods which are matching in-place update criteria
168+
func NewInPlaceUpdatablePodsCounter() *SizeBasedGauge {
169+
return newSizeBasedGauge(inPlaceUpdatableCount)
170170
}
171171

172-
// NewVpasWithInPlaceUpdtateablePodsCounter returns a wrapper for counting VPA objects with Pods matching in-place update criteria
173-
func NewVpasWithInPlaceUpdtateablePodsCounter() *SizeBasedGauge {
174-
return newSizeBasedGauge(vpasWithEvictablePodsCount)
172+
// NewVpasWithInPlaceUpdatablePodsCounter returns a wrapper for counting VPA objects with Pods matching in-place update criteria
173+
func NewVpasWithInPlaceUpdatablePodsCounter() *SizeBasedGauge {
174+
return newSizeBasedGauge(vpasWithInPlaceUpdatablePodsCount)
175175
}
176176

177-
// NewVpasWithInPlaceUpdtatedPodsCounter returns a wrapper for counting VPA objects with evicted Pods
178-
func NewVpasWithInPlaceUpdtatedPodsCounter() *SizeBasedGauge {
179-
return newSizeBasedGauge(vpasWithEvictedPodsCount)
177+
// NewVpasWithInPlaceUpdatedPodsCounter returns a wrapper for counting VPA objects with in-place updated Pods
178+
func NewVpasWithInPlaceUpdatedPodsCounter() *SizeBasedGauge {
179+
return newSizeBasedGauge(vpasWithInPlaceUpdatedPodsCount)
180180
}
181181

182182
// AddInPlaceUpdatedPod increases the counter of pods updated in place by Updater, by given VPA size

0 commit comments

Comments
 (0)