kubernetes/test
Francesco Romani 2ea47038b9 podresources: e2e: force eager connection
Add and use more facilities to the *internal* podresources client.
Checking e2e test runs, we have quite some
```
rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial unix /var/lib/kubelet/pod-resources/kubelet.sock: connect: connection refused": rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial unix /var/lib/kubelet/pod-resources/kubelet.sock: connect: connection refused"
```

This is likely caused by kubelet restarts, which we do plenty in e2e tests,
combined with the fact gRPC does lazy connection AND we don't really
check the errors in client code - we just bubble them up.

While it's arguably bad we don't check properly error codes, it's also
true that in the main case, e2e tests, the functions should just never
fail besides few well known cases, we're connecting over a
super-reliable unix domain socket after all.

So, we centralize the fix adding a function (alongside with minor
cleanups) which wants to trigger and ensure the connection happens,
localizing the changes just here. The main advantage is this approach
is opt-in, composable, and doesn't leak gRPC details into the client
code.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2023-09-07 08:24:49 +02:00
..
cmd fix(test): delete cronjobs.v1.example.com pi for clean up 2023-09-01 23:13:26 +08:00
conformance Use debian-base instead of distroless for conformance image 2023-07-19 10:14:37 +02:00
e2e Merge pull request #119988 from bzsuni/cleanup/e2e/app 2023-09-06 11:08:51 -07:00
e2e_kubeadm e2e: detect unexpected command line arguments 2023-07-05 13:34:09 +02:00
e2e_node podresources: e2e: force eager connection 2023-09-07 08:24:49 +02:00
fixtures Kubectl convert - warn users with NotRegisteredError and Fail on all other errors (#117002) 2023-04-11 19:17:53 -07:00
fuzz
images Bump images, dependencies and versions to go 1.21.0 2023-09-06 12:06:51 +02:00
instrumentation Merge pull request #120369 from Gauravpadam/update-generated-html 2023-09-05 23:02:50 -07:00
integration fix(queue_test): make sure the first bind failure via counter 2023-09-06 19:47:54 +00:00
kubemark Revert "bump npd to v0.8.14" 2023-09-05 20:28:53 -05:00
list
soak/serve_hostnames test: replace intstr.FromInt with intstr.FromInt32 2023-05-10 09:34:16 +02:00
typecheck Replace os.Setenv with testing.T.Setenv in tests 2023-06-05 21:08:56 -05:00
utils Update distroless-iptables image version to v0.3.1 2023-09-01 13:10:15 +02:00
OWNERS lavalamp is taking a long break 2023-05-11 16:43:38 +00:00