kubernetes/pkg/kubelet/cri
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
..
remote Fix image pull error type ErrRegistryUnavailable 2023-04-26 11:02:47 +02:00
streaming delete unused functions in pkg/kubelet directory 2023-01-16 20:00:49 +08:00