removing default for KUBECONFIG to enable in cluster tests (#2191)

This commit is contained in:
salaboy 2021-07-15 14:35:32 +01:00 committed by GitHub
parent 7764284cfa
commit dbcf4cf637
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 8 deletions

View File

@ -24,7 +24,6 @@ import (
"flag"
"text/template"
"k8s.io/client-go/tools/clientcmd"
env "knative.dev/pkg/environment"
testenv "knative.dev/pkg/test/environment"
"knative.dev/pkg/test/logging"
@ -50,13 +49,6 @@ func initializeFlags() *EnvironmentFlags {
f.ClientConfig.InitFlags(flag.CommandLine)
f.TestClientConfig.InitFlags(flag.CommandLine)
// We want to do this defaulting for tests only. The flags are reused between tests
// and production code and we want to make sure that production code defaults to
// the in-cluster config correctly.
if f.Kubeconfig == "" {
f.Kubeconfig = clientcmd.RecommendedHomeFile
}
return f
}