Fix vet error

Kubernetes-commit: 2165452d2f403fb14a12982b751599b64e8c499d
This commit is contained in:
Jordan Liggitt
2026-02-17 16:42:55 -05:00
committed by Kubernetes Publisher
parent 74724a24ae
commit 7b15567c6e
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++ {