Skip to content

Commit

Permalink
apply review suggestions
Browse files Browse the repository at this point in the history
voelzmo committed Nov 27, 2024
1 parent 3b054a0 commit 0d3e262
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -111,7 +111,7 @@ func (r *recommender) UpdateVPAs() {
if klog.V(4).Enabled() {
pods := r.clusterState.GetMatchingPods(vpa)
if len(pods) != vpa.PodCount {
klog.ErrorS(nil, "ClusterState pod count and matching pods disagree for VPA", "vpa", klog.KRef(vpa.ID.Namespace, vpa.ID.VpaName), "podCount", vpa.PodCount, "MatchingPods", pods)
klog.ErrorS(nil, "ClusterState pod count and matching pods disagree for VPA", "vpa", klog.KRef(vpa.ID.Namespace, vpa.ID.VpaName), "podCount", vpa.PodCount, "matchingPods", pods)
}
klog.InfoS("VPA dump", "vpa", vpa, "hasMatchingPods", hasMatchingPods, "podCount", vpa.PodCount, "matchingPods", pods)
}
4 changes: 2 additions & 2 deletions vertical-pod-autoscaler/pkg/utils/metrics/quality/quality.go
Original file line number Diff line number Diff line change
@@ -204,7 +204,7 @@ func ObserveRecommendationChange(previous, current corev1.ResourceList, updateMo
}
// This is not really expected thus a warning.
if current == nil {
klog.V(0).InfoS("Current recommendation is nil", "update_mode", updateMode, "size", vpaSize)
klog.V(0).InfoS("Current recommendation is nil", "updateMode", updateMode, "size", vpaSize)
return
}

@@ -217,7 +217,7 @@ func ObserveRecommendationChange(previous, current corev1.ResourceList, updateMo
log2 := metrics.GetVpaSizeLog2(vpaSize)
relativeRecommendationChange.WithLabelValues(updateModeToString(updateMode), string(resource), strconv.Itoa(log2)).Observe(diff)
} else {
klog.V(0).InfoS("Cannot compare as old recommendation is 0", "resource", resource, "vpa_mode", updateMode, "size", vpaSize)
klog.V(0).InfoS("Cannot compare as old recommendation is 0", "resource", resource, "vpaMode", updateMode, "size", vpaSize)
}
}
}

0 comments on commit 0d3e262

Please sign in to comment.