-
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
Consider adding JSON/key value pair output to docker-env command #12242
Comments
@tcsmith that sounds like a great idea ! We already have an option for docker-env to choose the shell type I would review any pr that would add Jason feature to this command. Would you like to contribute this feature? |
Ahhhhh, I knew of the
i would def be interested in adding JSON/KVP output though. what should the option be? we could have a shell type of |
Apparently it was added already in a02541d but not mentioned in the docs. (and not in the upstream The other commands take a
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Is KVP actually a thing ? Like, a real format Anyway, there is JSON format now (in the PR) $ ./out/minikube docker-env --shell none --output json
{"DOCKER_CERT_PATH":"/home/anders/.minikube/certs","DOCKER_HOST":"tcp://192.168.49.2:2376","DOCKER_TLS_VERIFY":"1","MINIKUBE_ACTIVE_DOCKERD":"minikube"} |
Fantastic, and thank you. I was able to use the --shell=none output to easily parse it, that output is basically KVP, in my python tools. Your change will even make it easer! I realized after the fact that K8S/minkube are written in go. I don't have any experience with Go and given the phase my project is in, I wouldnt have the time to learn. Once my project ships, I will learn Go and come back to contribute. I'm learning and loving K8S and just found out about Minikube and its a gamechanger being able to iterate locally, and this feature will help immensely. Thanks again! 👁❤🧊🤗 |
We use python to do a good amount of automation at my shop. When iterating locally it would be nice to be able to have a cross platform/language agnostic output of the
docker-env
command that a tool written in a non-shell script language could use.Ideally something like this:
I realize this could be done with regex libraries in the language of choice but having a convenience function would be fantastic.
The text was updated successfully, but these errors were encountered: