Merge pull request #7721 from bacongobbler/fix-7230

ref(environment): use string checking instead
pull/7727/head
Matthew Fisher 5 years ago committed by GitHub
commit 1940f500fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -135,10 +135,10 @@ func (s *EnvSettings) Namespace() string {
func (s *EnvSettings) RESTClientGetter() genericclioptions.RESTClientGetter {
s.configOnce.Do(func() {
clientConfig := kube.GetConfig(s.KubeConfig, s.KubeContext, s.namespace)
if len(s.KubeToken) > 0 {
if s.KubeToken != "" {
clientConfig.BearerToken = &s.KubeToken
}
if len(s.KubeAPIServer) > 0 {
if s.KubeAPIServer != "" {
clientConfig.APIServer = &s.KubeAPIServer
}

Loading…
Cancel
Save