kubernetes/pkg/kubelet/cri/remote
Sascha Grunert 4cdfe600e0
Fix image pull error type ErrRegistryUnavailable
The current error comparison `imagePullResult.err ==
ErrRegistryUnavailable` will never work with any remote runtime, because
we produce gRPC errors which wrap a code and a description, like:

```
rpc error: code = Unknown desc = This is the error description
```

To be able to check custom error types from `pkg/kubelet/images/types.go`,
we now strip the code if the status is unknown on image pull.

Beside that, we use a string comparison to check against
`ErrRegistryUnavailable.Error()`, because validating them via the
`errors` package is not yet supported by grpc-go:
https://github.com/grpc/grpc-go/issues/3616

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-04-26 11:02:47 +02:00
..
fake Add fake runtimes and CRI changes for KEP-2371 2022-11-08 14:47:08 -05:00
doc.go
OWNERS Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
remote_image_test.go Second attempt: Plumb context to Kubelet CRI calls (#113591) 2022-11-05 06:02:13 -07:00
remote_image.go Fix image pull error type ErrRegistryUnavailable 2023-04-26 11:02:47 +02:00
remote_runtime_test.go Second attempt: Plumb context to Kubelet CRI calls (#113591) 2022-11-05 06:02:13 -07:00
remote_runtime.go Add connection related metrics to EventedPLEG 2023-03-01 11:35:27 -05:00
utils_test.go Make CRI v1 the default and allow a fallback to v1alpha2 2021-11-17 11:05:05 -08:00
utils.go Second attempt: Plumb context to Kubelet CRI calls (#113591) 2022-11-05 06:02:13 -07:00