Revision 08d9fa30ab1192324c340392a1276e074c10527e authored by David Bimmler on 28 November 2022, 14:15:22 UTC, committed by Paul Chaignon on 14 December 2022, 12:07:43 UTC
[ upstream commit ffef1a85efe7f472b4d8f210cfd35e292d98be4a ]

While a 404 Not Found or a 409 Conflict can be considered successful
interactions with the k8s API, a blanket accept for all 4xx codes is
problematic. Since LastSuccessInteraction is exclusively used as an
optimisation, we should err on the cautious side: accept the potential
increase in heartbeats to avoid missing being unable to effecticely
communicate with the k8s API.

As an example of how this can go wrong, in #20915 we have an issue
around receiving 401 Unauthorized from the EKS control plane. At
sufficient scale, we never see a need to run the heartbeat. Running the
heartbeat, however, would close and reopen the connections on receiving
a 401, and thus restore connectivity to the k8s API.

We currently only use the LastSuccessInteraction to as an optimisation
to not perform unnecessary k8s API heartbeats, this "metric" (possibly a
misnomer) is not used or exposed and changing its semantics is
acceptable.

Fixes: f2998b0cc472290ec64068ec15510608778fb431

Signed-off-by: David Bimmler <david.bimmler@isovalent.com>
Co-authored-by: Sebastian Wicki <gandro@gmx.net>
Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
1 parent 552872f
Raw File
GO_VERSION
1.16.15
back to top