-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix invalid log keys #7534
Fix invalid log keys #7534
Conversation
Thanks @ialidzhikov for pointing this out! |
/assign |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR! That was fast! 🚀
Nit: a side styling improvement suggestion, and 1 inline comment; otherwise lgtm
diff --git a/vertical-pod-autoscaler/pkg/recommender/routines/recommender.go b/vertical-pod-autoscaler/pkg/recommender/routines/recommender.go
index 2ded58817..1f456a80c 100644
--- a/vertical-pod-autoscaler/pkg/recommender/routines/recommender.go
+++ b/vertical-pod-autoscaler/pkg/recommender/routines/recommender.go
@@ -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)
}
diff --git a/vertical-pod-autoscaler/pkg/utils/metrics/quality/quality.go b/vertical-pod-autoscaler/pkg/utils/metrics/quality/quality.go
index 3566911f6..eff116ba9 100644
--- a/vertical-pod-autoscaler/pkg/utils/metrics/quality/quality.go
+++ b/vertical-pod-autoscaler/pkg/utils/metrics/quality/quality.go
@@ -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)
}
}
}
vertical-pod-autoscaler/pkg/target/controller_fetcher/controller_fetcher.go
Outdated
Show resolved
Hide resolved
…er_fetcher.go Co-authored-by: Ismail Alidzhikov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ialidzhikov, voelzmo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR adds keys to the structured logging statements where they were missing. I did this by searching for all occurrences of
ErrorS
andInfoS
.With my incorrect suggestions in PRs we introduced incorrect log statements, looking like this
Those PRs haven't been released yet, so no need for hotfixes or explicit release notes.
Does this PR introduce a user-facing change?