Commit Graph

5 Commits

Author SHA1 Message Date
Lukasz Szaszkiewicz
b681e77bec client-go/reflector: use consistencydetector.IsDataConsistencyDetectionForWatchListEnabled
Kubernetes-commit: f6c68908ba37dbb7af602b8f88b5f395025d2384
2024-06-10 23:01:04 +02:00
Lukasz Szaszkiewicz
538b7809aa move checkWatchListDataConsistencyIfRequested back to client-go/tools/cache
Kubernetes-commit: cb44f83b3d500bb2ed29f7634095bc64c9b21729
2024-05-27 11:22:28 +02:00
Lukasz Szaszkiewicz
e428fc295c move client-go/tools/cache/reflector_data_consistency_detector to client-go/util/consistencydetector
Kubernetes-commit: 272dfc9d7e61481dfcdc4d6a021385d9cd85ba5f
2024-05-27 11:10:43 +02:00
Lukasz Szaszkiewicz
6bdde7723e client-go/consistency-detector: change the signature of checkWatchListConsistencyIfRequested
the signature of the method was tightly connected to the reflector,
making it difficult to use for anything other than a reflector.

this simple refactor makes the method more generic.

Kubernetes-commit: 83c7542abc8c542c01ecb67376f134b2071c5304
2024-04-22 14:01:22 +02:00
Lukasz Szaszkiewicz
0f984dc7fc client-go/reflector: introduce a data consistency mechanism for the watch-list feature.
checkWatchListConsistencyIfRequested performs a data consistency check only when
the KUBE_WATCHLIST_INCONSISTENCY_DETECTOR environment variable was set during a binary startup.

The consistency check is meant to be enforced only in the CI, not in production.
The check ensures that data retrieved by the watch-list api call
is exactly the same as data received by the standard list api call.

Note that this function will panic when data inconsistency is detected.
This is intentional because we want to catch it in the CI.

Kubernetes-commit: b31e7793d0d873a71c90caf8455556aa905cf88d
2023-10-06 14:26:47 +02:00