New package defines .kubernetes_auth format.

Refactored common code to that package.
Subsequent PRs will load and emit these files.
This commit is contained in:
Eric Tune
2014-11-11 15:23:09 -08:00
parent 91d7a19fe3
commit 0727219c83
9 changed files with 228 additions and 63 deletions

View File

@@ -199,10 +199,11 @@ func main() {
if clientConfig.Host == "" {
// TODO: eventually apiserver should start on 443 and be secure by default
// TODO: don't specify http or https in Host, and infer that from auth options.
clientConfig.Host = "http://localhost:8080"
}
if client.IsConfigTransportTLS(clientConfig) {
auth, err := kubecfg.LoadAuthInfo(*authConfig, os.Stdin)
auth, err := kubecfg.LoadClientAuthInfoOrPrompt(*authConfig, os.Stdin)
if err != nil {
glog.Fatalf("Error loading auth: %v", err)
}