GoogleCloudPlatform/kubernetes — pull request #2861 by deads2k (2014-12-11 14:53:20+00:00)
Title: add kubeconfig types

This starts #1755. All this pull does is create the types and if a .kubeconfig is located in the current directory, it parses and honors the .kubeconfig file by creating a clientcmd.Builder to add to a chain. I'm starting here to prevent a giant pull request later on.

I think that in the end, the chain priority will look like this:
1. Command line arguments for serverInfo or authInfo (if any are specified, use this builder for everything)
2. Command line argument specifying context name from merged .kubeconfig file
3. Use current context name from merged .kubeconfig file
4. Use default values and potentially prompt for auth information

In order to handle a chain of potential clientcmd.Builders, I had to partially address #2644. I separated the binding steps from the building steps and created convenience methods to get default flags or prefix the default flags.