4 Commits

Author SHA1 Message Date
Dmitriy Matrenichev
30f7851d2a
chore: bump golangci-lint from 1.45.2 to 1.47.2
Minor linter upgrade.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2022-07-22 17:49:44 +03:00
Andrey Smirnov
5e0c80f616
fix: ignore connection reset errors on k8s upgrade
This fixes `talosctl upgrade-k8s`:

```
Get "https://172.21.0.1:6443/api/v1/namespaces/kube-system/pods?labelSelector=k8s-app+%3D+kube-apiserver": read tcp 172.21.0.1:51416->172.21.0.1:6443: read: connection reset by peer
```

The error happens when the `kube-apiserver` is restarted during the
control plane upgrade, and it should be ignored as a transient error.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-03-18 22:11:28 +03:00
Andrey Smirnov
e26c977d85 fix: check retryable network errors by interface
Looks like tls errors implement the interface, but they are not derived
from the `*net.OpError`, so this check should catch more errors.

Fixes #3457

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-04-12 09:56:17 -07:00
Andrey Smirnov
a1e6415403 fix: retry Kubernetes API errors on cordon/uncordon/etc
This extracts function which was used in upgrade/convert flows to retry
transient errors to the main `kubernetes` package, expands it to ignore
timeout errors, and it is now used to retry errors where applicable in
`pkg/kubernetes`.

Fixes #3403

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-04-02 03:51:40 -07:00