remove auth-path from kubeconfig

This commit is contained in:
deads2k
2015-05-11 09:42:07 -04:00
parent 6498fc1fda
commit 19784dbc4f
43 changed files with 8 additions and 335 deletions

View File

@@ -96,16 +96,12 @@ func ShortenConfig(config *Config) {
}
// Flatten changes the config object into a self contained config (useful for making secrets)
// AuthPath is not handled.
func FlattenConfig(config *Config) error {
for key, authInfo := range config.AuthInfos {
baseDir, err := MakeAbs(path.Dir(authInfo.LocationOfOrigin), "")
if err != nil {
return err
}
if len(authInfo.AuthPath) != 0 {
return fmt.Errorf("auth path of %v is not empty: %v", key, authInfo.AuthPath)
}
if err := FlattenContent(&authInfo.ClientCertificate, &authInfo.ClientCertificateData, baseDir); err != nil {
return err