mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-22 17:51:28 +00:00
Service storage implements transactions. It creates an IPAddress object first and then creates the Service object, and if the Service object already exists the complete transaction is reverted. There can be race conditions when the repair loop picks up the new IPAddress object for reconciliation before the transaction is reverted. This leads to spurious IPAddressWrongReference warnings, to suppress these warnings we delay the processing of the new IPAddress object by 5 seconds. The service allocation creates the IPAddress object before creating the Service object, we easily identify this scenario when the IPAddress object creation timestamp is after the Service creation timestamp. We do this only when the IPAddress object is created recently in order to avoid indefinitely requeue/delay in IPAddress cleanup if for some reason the service transaction revert fails. Signed-off-by: Daman Arora <aroradaman@gmail.com>