-
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
add docker-env and podman-env to minikube status #10872
Conversation
Hi @tharun208. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Can one of the admins verify this patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would u plz add before after this PR in the descripttion ?
how about adding an integreation test ?
we already do docker-env status here
we could add another check that checks for this New Test to be showing
here is the code
c := exec.CommandContext(mctx, "/bin/bash", "-c", "eval $("+Target()+" -p "+profile+" docker-env) && "+Target()+" status -p "+profile)
// we should be able to get minikube status with a bash which evaled docker-env
rr, err = Run(t, c)
we could add a check for the output of rr
https://github.com/medyagh/minikube/blob/f95d43a2c78070ab10a4e7d134ff2d0952a5ca86/test/integration/functional_test.go#L261
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets add same thing for podman-env
Do you mind pasting the out of minikube status --output=json |
pkg/minikube/config/types.go
Outdated
@@ -81,6 +81,7 @@ type ClusterConfig struct { | |||
ListenAddress string // Only used by the docker and podman driver | |||
Network string // only used by docker driver | |||
MultiNodeRequested bool | |||
DockerEnvInUse bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be part of config. Because in one terminal it might be in use and other terminal not but config is global. So let's remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@medyagh, without the config change. can you help me with how we can implement this for podman?
for docker, we can make use of this MINIKUBE_ACTIVE_DOCKERD
env variable at runtime to check if it is the same as the cluster name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For podman u could see the podman-env.go file
But also lets make sure the minikbue Config does not have that DockerEnvInUse ...
ef55afb
to
bc34cdc
Compare
@medyagh, I updated the code without making any changes to the config. But, I am not able to update the |
bc34cdc
to
72306cd
Compare
Signed-off-by: Tharun <rajendrantharun@live.com>
72306cd
to
2779ec0
Compare
cmd/minikube/cmd/docker-env.go
Outdated
@@ -252,7 +252,8 @@ var dockerEnvCmd = &cobra.Command{ | |||
sh := shell.EnvConfig{ | |||
Shell: shl, | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason this was moved up ? If not revert the unrelated changes
Signed-off-by: Tharun <rajendrantharun@live.com>
8478ddf
to
d72eea6
Compare
thank you for this contribution @tharun208 |
/ok-to-test |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: medyagh, tharun208 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
kvm2 Driver |
Signed-off-by: Tharun rajendrantharun@live.com
Before:
minikube status
After:
minikube docker-env
andminikube-status
andminikube docker-env --unset
minikube status --output=json
result:Fixes #6535