INNER CODE UNIT · Go

cancel

darksworm/argonaut · cmd/app/main.go:333

			ctx, cancel = context.WithTimeout(context.Background(), 30*time.Second)
			localPort, pfStartErr := pfManager.Start(ctx)
			cancel()
			if pfStartErr != nil {
				fmt.Fprintf(os.Stderr, "Error: failed to establish port-forward: %v\n", pfStartErr)
				fmt.Fprintf(os.Stderr, "\nTroubleshooting tips:\n")
				fmt.Fprintf(os.Stderr, "  • Ensure ArgoCD is installed in namespace '%s'\n", namespace)
				fmt.Fprintf(os.Stderr, "  • Check that you have kubectl access to the cluster\n")
				fmt.Fprintf(os.Stderr, "  • Verify the argocd-server pod is running\n")
				os.Exit(1)
			}

			cblog.With("component", "app").Info("Port-forward established", "localPort", localPort, "namespace", namespace)

			// Create server config using local port-forward address
			server = &model.Server{
				BaseURL:  fmt.Sprintf("http://127.0.0.1:%d", localPort),
				Token:    pfErr.Token,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…