talos/pkg/kubeconfig
Andrey Smirnov 455328d058
fix: allow time skew for generated kubeconfig
The `kubeconfig` can be fetched from one Talos node, while Kubernetes
API request might land on `kube-apiserver` on a different node which
might have time slightly out of sync.

The minimum time diff between the two might lead to `Unauthorized` error
on first use:

```
1 authentication.go:70] "Unable to authenticate the request" err="[x509: certificate has expired or is not yet valid: current time 2023-06-13T15:30:51Z is before 2023-06-13T15:30:52Z, verifying certificate SN=314179687645609956480346926163236202072, SKID=, AKID=E9:9E:A8:1E:0B:6C:8B:AB:1B:2B:7E:17:14:CF:A4:0A:82:6B:42:67 failed: x509: certificate has expired or is not yet valid: current time 2023-06-13T15:30:51Z is before 2023-06-13T15:30:52Z]"
```

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2023-06-13 20:03:38 +04:00
..