UPSTREAM: revert: 69272: Fix bug with InClusterConfig requiring bearer token
This reverts commit from
openshift/kubernetes.
@@ -330,8 +330,7 @@ func InClusterConfig() (*Config, error) {
ts := newCachedPathTokenSource(tokenFile)
- tok, err := ts.Token()
- if err != nil {
+ if _, err := ts.Token(); err != nil {
return nil, err
}
@@ -346,9 +345,6 @@ func InClusterConfig() (*Config, error) {
return &Config{
// TODO: switch to using cluster DNS.
Host: "https://" + net.JoinHostPort(host, port),
- // TODO: This is a fix for #69234, caused by #67359
- // It looks like we will need to be careful on rotation.
- BearerToken: tok.AccessToken,
TLSClientConfig: tlsClientConfig,
WrapTransport: TokenSourceWrapTransport(ts),
}, nil
