Fix vet error

Kubernetes-commit: 45900a1debee388738f299c0a001ed01e8b25208
This commit is contained in:
Jordan Liggitt
2026-02-17 16:42:55 -05:00
committed by Kubernetes Publisher
parent 103162f118
commit 97646e5606
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++ {