mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #99264 from palnabarun/structured-logging-pkg/kubelet/token
Migrate pkg/kubelet/token to structured logging
This commit is contained in:
commit
9a1b5bb255
@ -118,7 +118,7 @@ func (m *Manager) GetServiceAccountToken(namespace, name string, tr *authenticat
|
||||
case m.expired(ctr):
|
||||
return nil, fmt.Errorf("token %s expired and refresh failed: %v", key, err)
|
||||
default:
|
||||
klog.Errorf("couldn't update token %s: %v", key, err)
|
||||
klog.ErrorS(err, "Couldn't update token", "cacheKey", key)
|
||||
return ctr, nil
|
||||
}
|
||||
}
|
||||
@ -172,7 +172,7 @@ func (m *Manager) requiresRefresh(tr *authenticationv1.TokenRequest) bool {
|
||||
if tr.Spec.ExpirationSeconds == nil {
|
||||
cpy := tr.DeepCopy()
|
||||
cpy.Status.Token = ""
|
||||
klog.Errorf("expiration seconds was nil for tr: %#v", cpy)
|
||||
klog.ErrorS(nil, "Expiration seconds was nil for token request", "tokenRequest", cpy)
|
||||
return false
|
||||
}
|
||||
now := m.clock.Now()
|
||||
|
Loading…
Reference in New Issue
Block a user