ipn/store/kubestore: don't error if state cannot be preloaded (#13926)

Preloading of state from kube Secret should not
error if the Secret does not exist.

Updates tailscale/tailscale#7671

Signed-off-by: Irbe Krumina <irbe@tailscale.com>
pull/10990/merge
Irbe Krumina 4 weeks ago committed by GitHub
parent 853fe3b713
commit 9d1348fe21
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -53,7 +53,7 @@ func New(_ logger.Logf, secretName string) (*Store, error) {
secretName: secretName,
}
// Load latest state from kube Secret if it already exists.
if err := s.loadState(); err != nil {
if err := s.loadState(); err != nil && err != ipn.ErrStateNotExist {
return nil, fmt.Errorf("error loading state from kube Secret: %w", err)
}
return s, nil

Loading…
Cancel
Save