Merge pull request #140030 from kmala/release-1.35

Fix Go 1.26 vet errors

Kubernetes-commit: 860b2bbb62acd5d5544d5dfd40e90a557ce5de0d
This commit is contained in:
Kubernetes Publisher
2026-07-02 14:26:18 +00:00
2 changed files with 2 additions and 2 deletions

View File

@@ -105,7 +105,7 @@ func (ll *LeaseLock) RecordEvent(s string) {
// Populate the type meta, so we don't have to get it from the schema
subject.Kind = "Lease"
subject.APIVersion = coordinationv1.SchemeGroupVersion.String()
ll.LockConfig.EventRecorder.Eventf(subject, corev1.EventTypeNormal, "LeaderElection", events)
ll.LockConfig.EventRecorder.Eventf(subject, corev1.EventTypeNormal, "LeaderElection", "%s", events)
}
// Describe is used to convert details on current resource lock

View File

@@ -638,7 +638,7 @@ func TestLotsOfEvents(t *testing.T) {
APIVersion: "version",
}
// we need to vary the reason to prevent aggregation
go recorder.Eventf(ref, v1.EventTypeNormal, "Reason-"+strconv.Itoa(i), strconv.Itoa(i))
go recorder.Eventf(ref, v1.EventTypeNormal, "Reason-"+strconv.Itoa(i), "%s", strconv.Itoa(i))
}
// Make sure no events were dropped by either of the listeners.
for i := 0; i < maxQueuedEvents; i++ {