add kubectl config

This commit is contained in:
deads2k
2014-12-17 08:03:03 -05:00
parent de2e298fa9
commit b51a717f6e
28 changed files with 2289 additions and 270 deletions

View File

@@ -22,23 +22,24 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/latest"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
clientcmdapi "github.com/GoogleCloudPlatform/kubernetes/pkg/client/clientcmd/api"
)
func createValidTestConfig() *Config {
func createValidTestConfig() *clientcmdapi.Config {
const (
server = "https://anything.com:8080"
token = "the-token"
)
config := NewConfig()
config.Clusters["clean"] = Cluster{
config := clientcmdapi.NewConfig()
config.Clusters["clean"] = clientcmdapi.Cluster{
Server: server,
APIVersion: latest.Version,
}
config.AuthInfos["clean"] = AuthInfo{
config.AuthInfos["clean"] = clientcmdapi.AuthInfo{
Token: token,
}
config.Contexts["clean"] = Context{
config.Contexts["clean"] = clientcmdapi.Context{
Cluster: "clean",
AuthInfo: "clean",
}