Support for kubeconfig files (#2053)

* Add support for authentication with kubeconfig files

* Update k8s plugin documentation

* Fix whitespace in README and tests

* Use clientcmd package to load kubeconfig file
This commit is contained in:
Zach Eddy 2018-09-28 12:18:55 -07:00 committed by John Belamaric
parent 2fc3f5e0b1
commit fe5c731047
4 changed files with 59 additions and 0 deletions

View file

@ -397,6 +397,48 @@ kubernetes cluster.local`,
fall.Zero,
nil,
},
{
`kubernetes coredns.local {
kubeconfig
}`,
true,
"Wrong argument count or unexpected line ending after",
-1,
0,
defaultResyncPeriod,
"",
podModeDisabled,
fall.Zero,
nil,
},
{
`kubernetes coredns.local {
kubeconfig file context extraarg
}`,
true,
"Wrong argument count or unexpected line ending after",
-1,
0,
defaultResyncPeriod,
"",
podModeDisabled,
fall.Zero,
nil,
},
{
`kubernetes coredns.local {
kubeconfig file context
}`,
false,
"",
1,
0,
defaultResyncPeriod,
"",
podModeDisabled,
fall.Zero,
nil,
},
}
for i, test := range tests {