Giter Site home page Giter Site logo

kubectl-exec-forward's People

Contributors

bendrucker avatar goreleaserbot avatar renovate[bot] avatar ryanwholey avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

kubectl-exec-forward's Issues

Add Go build/dependency caching

The test workflow is currently pretty slow. go test takes ~2m. There is one slow integration test (TestRunForwardCommand) but the majority of the time is going to downloading dependencies and building packages. Caching this data across builds should significantly reduce test run times.

Run unit and integration test separately

Integration tests depend on Kubernetes (minikube) and are therefore very slow to start. Rather than just allow integration tests to be skipped, we should run unit and integration tests separately, potentially forgoing the inclusion of integration tests in coverage metrics.

This will allow unit tests to run quickly and fail for basic issues, including un-buildable code. Integration tests can either run after or in parallel.

In addition to go test -short, we have the option to use build tags for tests:

https://mickey.dev/posts/go-build-tags-testing/

`--context` flag is not used when finding an attachable pod

When calling the plugin with --context, the context setting does not propagate when attempting to find an attachable pod. Given a current context set via kubeconfig of a, and --context b, the resulting behavior is:

  • Pod is found using context a
  • Port forwarding connection is attempted with context b

When the pod is found using a higher level object, e.g. service/my-svc, both contexts may have the same objects. In this case, an attachable pod will be found in a, but attempts to connect to the named pod in b will likely fail since higher order controllers (Deployment/Replica Set) generate randomized pod names.

Error: error upgrading connection: pods "my-app-abc123" not found

For now, a workaround is to set the context in the kubeconfig, by using kubectl config, kubectx, etc.

All commands (especially hooks) should print logs before they start

When there are pre-connect and post-connect commands that run, the user does not get any indication of what things are running and when. Before each command runs, the program should print relevant log information so the user understands what's running. Child process outputs should generally not be printed, but it's important for users to know what was passed to exec, in case:

  • It's slow
  • It does something unexpected/malicious

Example output might be:

Running pre-connect hook (id=foo): echo foo bar baz

Rich text rendering could help this display clearly, e.g. bold/colored text. Or quotes/punctuation.

Close forwarding connection when command completes

When the main command completes, the forwarding connection should be closed by default. An ideal command (e.g. psql) should block until work is complete and then exit 0.

For commands that perform a side effect and then immediately exit 0, either the config or the user (CLI) could be allowed to specify that the connection should persist after the command.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • fix(deps): update module github.com/tidwall/gjson to v1.17.1
  • fix(deps): update module github.com/ttacon/chalk to v0.1
  • chore(deps): update actions/checkout action to v4
  • chore(deps): update actions/setup-go action to v5
  • chore(deps): update codecov/codecov-action action to v4
  • chore(deps): update golangci/golangci-lint-action action to v4
  • chore(deps): update goreleaser/goreleaser-action action to v5
  • chore(deps): update tibdex/github-app-token action to v2
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/approve-markdown.yml
  • actions/checkout v3
  • hmarr/auto-approve-action v2
.github/workflows/lint.yml
  • actions/checkout v3
  • actions/setup-go v3
  • golangci/golangci-lint-action v3
.github/workflows/release.yml
  • actions/checkout v3
  • actions/setup-go v3
  • tibdex/github-app-token v1
  • goreleaser/goreleaser-action v3
.github/workflows/test.yml
  • actions/checkout v3
  • actions/setup-go v3
  • codecov/codecov-action v3
gomod
go.mod
  • go 1.19
  • github.com/howeyc/fsnotify v0.9.0
  • github.com/pborman/ansi v1.0.0
  • github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5@74d24b5ae9f5
  • github.com/spf13/cobra v1.5.0
  • github.com/stretchr/testify v1.8.0
  • github.com/tidwall/gjson v1.14.3
  • github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31@22c06c80ed31
  • k8s.io/api v0.25.2
  • k8s.io/apimachinery v0.25.2
  • k8s.io/cli-runtime v0.25.2
  • k8s.io/client-go v0.25.2
  • k8s.io/kubectl v0.25.2

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.