https://github.com/cilium/cilium
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
History
Tip revision: 08d9fa30ab1192324c340392a1276e074c10527e authored by David Bimmler on 28 November 2022, 14:15:22 UTC
k8s: don't consider 4xx a successful interaction
Tip revision: 08d9fa3
File Mode Size
.github
.travis
Documentation
api
bpf
bugtool
cilium
cilium-health
clustermesh-apiserver
contrib
daemon
envoy
examples
hack
hubble-relay
images
install
jenkinsfiles
operator
pkg
plugins
proxylib
test
tests
tools
vendor
.authors.aux -rw-r--r-- 416 bytes
.gitattributes -rw-r--r-- 260 bytes
.gitignore -rw-r--r-- 1.5 KB
.gitmodules -rw-r--r-- 0 bytes
.golangci.yaml -rw-r--r-- 3.3 KB
.mailmap -rw-r--r-- 4.3 KB
.travis.yml -rw-r--r-- 1.1 KB
AUTHORS -rw-r--r-- 22.1 KB
CHANGELOG.md -rw-r--r-- 189.8 KB
CODEOWNERS -rw-r--r-- 724 bytes
CODE_OF_CONDUCT.md -rw-r--r-- 2.2 KB
CONTRIBUTING.md -rw-r--r-- 227 bytes
FURTHER_READINGS.rst -rw-r--r-- 4.9 KB
GO_VERSION -rw-r--r-- 8 bytes
LICENSE -rw-r--r-- 11.1 KB
MAINTAINERS.md -rw-r--r-- 3.6 KB
Makefile -rw-r--r-- 28.4 KB
Makefile.defs -rw-r--r-- 6.0 KB
Makefile.docker -rw-r--r-- 6.1 KB
Makefile.quiet -rw-r--r-- 718 bytes
README.rst -rw-r--r-- 14.7 KB
SECURITY.md -rw-r--r-- 615 bytes
USERS.md -rw-r--r-- 6.8 KB
VERSION -rw-r--r-- 8 bytes
Vagrantfile -rw-r--r-- 12.8 KB
go.mod -rw-r--r-- 5.8 KB
go.sum -rw-r--r-- 137.3 KB
netlify.toml -rw-r--r-- 92 bytes
vagrant_box_defaults.rb -rw-r--r-- 392 bytes

README.rst

back to top