diff --git a/cmd/istio-install/main.go b/cmd/istio-install/main.go index b6ca249067..1b432bb331 100644 --- a/cmd/istio-install/main.go +++ b/cmd/istio-install/main.go @@ -18,6 +18,12 @@ func main() { iopFileNames := []string{os.Args[1]} consoleLogger := istioclient.CreateIstioLibraryLogger() + + if err := istioclient.ConfigureIstioLogScopes(); err != nil { + consoleLogger.LogAndError("Failed to configure Istio log: ", err) + os.Exit(1) + } + printer := istio.NewPrinterForWriter(os.Stdout) rc, err := kube.DefaultRestConfig("", "", func(config *rest.Config) { @@ -40,11 +46,6 @@ func main() { os.Exit(1) } - if err := istioclient.ConfigureIstioLogScopes(); err != nil { - consoleLogger.LogAndError("Failed to configure Istio log: ", err) - os.Exit(1) - } - // We don't want to verify after installation, because it is unreliable installArgs := &istio.InstallArgs{ReadinessTimeout: 150 * time.Second, SkipConfirmation: true, Verify: false, InFilenames: iopFileNames} diff --git a/tests/integration/steps/istio.go b/tests/integration/steps/istio.go index e3f1396310..7107e269f6 100644 --- a/tests/integration/steps/istio.go +++ b/tests/integration/steps/istio.go @@ -92,12 +92,8 @@ func IstioComponentHasResourcesSetToCpuAndMemory(ctx context.Context, component, } func UninstallIstio(ctx context.Context) error { - c, err := istio.NewIstioClient() - if err != nil { - return err - } - - return c.Uninstall(ctx) + istioClient := istio.NewIstioClient() + return istioClient.Uninstall(ctx) } func getResourcesForIstioComponent(k8sClient client.Client, component, resourceType string) (*resourceStruct, error) {