-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make it obvious in terminal for user if using docker-env #6489
Comments
Environment variable sounds good. I wouldn't be opposed to prompt manipulation if it was an extra flag to docker-env. Like Keep in mind that many folks build prompts with dynamic functions, particularly in the zsh and fish community. |
This sounds like something that should be a part of docker, rather than minikube ? We don't even put the current kubectl context in the prompt, which sounds more related. |
I guess this is now implemented, with MINIKUBE_ACTIVE_DOCKERD ? What needs to be done is a shell function to use it, similar to: Then the user can use that in their PS1, similar to e.g. __git_ps1 One thing that is weird is that it shows the name of the profile (not host) ? |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle rotten |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
__active_minikube() {
FORMAT=$1
if [ -n "$MINIKUBE_ACTIVE_DOCKERD" ] ; then
EMOJI=$(printf "\U1F433") # :whale:
printf " $FORMAT" "$MINIKUBE_ACTIVE_DOCKERD" "$EMOJI"
elif [ -n "$MINIKUBE_ACTIVE_PODMAN" ] ; then
EMOJI=$(printf "\U1F381") # :gift:
printf " $FORMAT" "$MINIKUBE_ACTIVE_PODMAN" "$EMOJI"
fi
}
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$(__active_minikube "%s %s")\$ ' user@host:~/minikube$ eval $(minikube docker-env)
user@host:~/minikube minikube 🐳$ eval $(minikube docker-env -u)
user@host:~/minikube$ eval $(minikube podman-env)
user@host:~/minikube minikube 🎁$ eval $(minikube podman-env -u)
user@host:~/minikube$ |
weird shells left as an exercise for the reader... but looking at variables is "cheaper" than starting minikube @priyawadhwa @medyagh @tstromberg - you still think that this feature is worth doing / documenting ? |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
I believe we can change this from a feature to a tip on the tutorial on minikube website. I would be happy to accept a PR that puts @afbjorklund 's suggestion to a nicely written tutorial. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
I'd happily add the tutorial. |
@JacekDuszenko We have a tutorial section on the minikube website here: https://minikube.sigs.k8s.io/docs/tutorials/ |
Cool, I'll add it there then /assign @JacekDuszenko |
/assign @JacekDuszenko |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
@JacekDuszenko Are you still working on this? |
I was thinking as part of the eval $(minikube docker-env) we could pass something that changes the terminal Prompt so it is obvious for the user they are usinf minikube's docker not their own docker.
maybe:
something like:
that will try turn into
the minikube word would be profile name, this will also make it clear which profile's docker-env we are using.
helps with #6462
helps with #6437
also we could explicity set a ENV that says
The text was updated successfully, but these errors were encountered: