Merge pull request #2359 from erikwilson/backport-agent-cacerts-1.18

Backport 1.18 agent cacerts clientaccess
pull/2381/head
Erik Wilson 2020-10-07 09:33:33 -07:00 committed by GitHub
commit 3661f56604
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ func accessInfoToKubeConfig(destFile, server, token string) error {
}
func validateToken(u url.URL, cacerts []byte, username, password string) error {
u.Path = "/apis"
u.Path = "/cacerts"
_, err := get(u.String(), GetHTTPClient(cacerts), username, password)
if err != nil {
return errors.Wrap(err, "token is not valid")