use kube current-context when entering click

Open
#22 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
kubernetes, rust
Domain
cli

Research direction

No repository file or test is named. Start by locating the CLI entry point and the code that initializes click's stored Kubernetes context and namespace, then compare it with kubectl config current-context behavior. Done means entering click uses the current context and its associated namespace instead of requiring duplicate click configuration, while the prompt still reports both values.

Written by the indexing model from the issue text.

Description

enhancement

Hey, this tool is pretty awesome thanks a lot!

Not sure if this is a sensible suggestion or not, but it feels like a semi-common pattern to have some quick shell helpers to swap kubectl config current-context around for kubectl.

Was wondering if it is possible to have click use my current context (and its associated namespace if set in the context triple) when entering instead of storing it in the click config? It feels a bit overkill to have this info set in two places personally, and it also slightly deceptive to someone who has their kube context on PS1.

If people set contexts carefully to point to specific clusters with specific namespaces, then it's easier to just swap the context outside click than it is to do it interactively. The repl prompt showing the context and the namespace set is a very nice touch though.

Dominant language
Rust
Stars
1.5k
Forks
93
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from databricks/click

All issues in databricks/click

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.