Skip to content
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

Merged
merged 2 commits into from
Mar 24, 2021

Conversation

tharun208
Copy link
Contributor

@tharun208 tharun208 commented Mar 19, 2021

Signed-off-by: Tharun [email protected]

Before: minikube status
Screen Shot 2021-03-23 at 2 36 18 PM

After: minikube docker-env and minikube-status and minikube docker-env --unset
Screen Shot 2021-03-23 at 2 37 17 PM

minikube status --output=json result:
Screen Shot 2021-03-23 at 3 36 54 PM

Fixes #6535

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 19, 2021
@k8s-ci-robot
Copy link
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 19, 2021
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 19, 2021
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

Copy link
Member

@medyagh medyagh left a 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

Copy link
Member

@medyagh medyagh left a 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

@medyagh
Copy link
Member

medyagh commented Mar 23, 2021

Do you mind pasting the out of minikube status --output=json
And can we ensure the json output has it too?

@@ -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
Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Member

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 ...

@tharun208
Copy link
Contributor Author

tharun208 commented Mar 23, 2021

@medyagh, I updated the code without making any changes to the config. But, I am not able to update the functional test as it fails locally.

@@ -252,7 +252,8 @@ var dockerEnvCmd = &cobra.Command{
sh := shell.EnvConfig{
Shell: shl,
}
Copy link
Member

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

cmd/minikube/cmd/status.go Show resolved Hide resolved
@tharun208 tharun208 changed the title add docker-env to minikube status add docker-env and podman-env to minikube status Mar 23, 2021
@medyagh
Copy link
Member

medyagh commented Mar 23, 2021

thank you for this contribution @tharun208

@medyagh
Copy link
Member

medyagh commented Mar 23, 2021

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 23, 2021
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 23, 2021
@minikube-pr-bot
Copy link

kvm2 Driver
error collecting results for kvm2 driver: timing run 0 with Minikube (PR 10872): timing cmd: [/home/performance-monitor/.minikube/minikube-binaries/10872/minikube start --driver=kvm2]: starting cmd: fork/exec /home/performance-monitor/.minikube/minikube-binaries/10872/minikube: exec format error
docker Driver
error collecting results for docker driver: timing run 0 with Minikube (PR 10872): timing cmd: [/home/performance-monitor/.minikube/minikube-binaries/10872/minikube start --driver=docker]: starting cmd: fork/exec /home/performance-monitor/.minikube/minikube-binaries/10872/minikube: exec format error

@medyagh medyagh merged commit f567893 into kubernetes:master Mar 24, 2021
@tharun208 tharun208 deleted the feat/docker_env_status branch March 24, 2021 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature: minikube status- indicate if using "docker-env"
5 participants