periodically reload tokens read from TokenFile in kubeconfig

Like we do with InClusterConfig.

Kubernetes-commit: 718adb7473d2249d706b2031e0b8e0ffbd835be9
This commit is contained in:
Mike Danese
2018-11-02 18:57:45 -07:00
committed by Kubernetes Publisher
parent 6054fbfc65
commit 98e0c7ac0d
4 changed files with 22 additions and 6 deletions

View File

@@ -322,7 +322,7 @@ func InClusterConfig() (*Config, error) {
return nil, ErrNotInCluster
}
ts := newCachedPathTokenSource(tokenFile)
ts := NewCachedFileTokenSource(tokenFile)
if _, err := ts.Token(); err != nil {
return nil, err