coreeng / corectl

Core Platform CLI
https://www.cecg.io/core-platform/
Apache License 2.0
1 stars 0 forks source link

feat(connect): swap out connect implementation to use iapc #53

Closed Malet closed 2 weeks ago

Malet commented 3 weeks ago

This updates the env connect command to use the iapc library (golang native) for the IAP tunnel implementation, replacing gcloud compute start-iap-tunnel. It also includes the ability to run commands within the tunnel context by providing a command after --, for example ./corectl --log-level debug env connect gcp-prod -- kubectl get no -o json. If the connect command is piped into another command, the stdout of the corectl command will only contain output from the command executed in-tunnel, it will however log it's tunnel status to stderr.

image

kkonstan commented 2 weeks ago

Some linting issues when trying to build locally:

➜  corectl git:(feature/iapc) make                                                                           
golangci-lint run ./...
pkg/cmdutil/userio/styles.go:10:2: var `redColor` is unused (unused)
    redColor  = lipgloss.Color("124")
    ^
make: *** [lint] Error 1