client-go/cache/reflector: use metav1.InitialEventsAnnotationKey

Kubernetes-commit: a953539fb57b2ee18337f323ef15425a4d6207ed
This commit is contained in:
Lukasz Szaszkiewicz
2024-03-11 12:56:40 +01:00
committed by Kubernetes Publisher
parent 79491afc36
commit 45e17fede0
2 changed files with 8 additions and 8 deletions

View File

@@ -780,7 +780,7 @@ loop:
}
case watch.Bookmark:
// A `Bookmark` means watch has synced here, just update the resourceVersion
if meta.GetAnnotations()["k8s.io/initial-events-end"] == "true" {
if meta.GetAnnotations()[metav1.InitialEventsAnnotationKey] == "true" {
if exitOnInitialEventsEndBookmark != nil {
*exitOnInitialEventsEndBookmark = true
}