Changed kubectl config view to redact token

Kubernetes-commit: 6fad4ee5e5f5fa6fbf38e88f165b012fa0ae5795
This commit is contained in:
Brian Pursley
2020-03-17 15:13:50 -04:00
committed by Kubernetes Publisher
parent da706024f3
commit d4a54d1ba8
2 changed files with 7 additions and 1 deletions

View File

@@ -98,6 +98,9 @@ func ShortenConfig(config *Config) {
if len(authInfo.ClientCertificateData) > 0 {
authInfo.ClientCertificateData = redactedBytes
}
if len(authInfo.Token) > 0 {
authInfo.Token = "REDACTED"
}
config.AuthInfos[key] = authInfo
}
for key, cluster := range config.Clusters {