GoogleContainerTools / GoogleContainerTools/skaffold

`pkg.skaffold.docker.newAPIClient` ignores DetectMinikube flag

Open
#9,883 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

```bash
skaffold dev -v debug --detect-minikube=false 2>&1 | grep minikube
```

```bash
msg="Running command: [minikube version --output=json]" subtask=-1 task=DevLoop
msg="Command output: [{\"commit\":\"65318f4cfff9c12cc87ec9eb8f4cdd57b25047f3\",\"minikubeVersion\":\"v1.37.0\"}\n]" subtask=-1 task=DevLoop
msg="Minikube cluster detected: cluster certificate for context \"test\" found inside the minikube directory" subtask=-1 task=DevLoop
msg="Running command: [/home/linuxbrew/.linuxbrew/bin/minikube docker-env --shell none -p test --user=skaffold]" subtask=-1 task=DevLoop
msg="Command output: [SSH_AUTH_SOCK=/tmp/ssh-Zj6AhgVo2905/agent.2216632\nSSH_AGENT_PID=2216633\nDOCKER_HOST=ssh://docker@127.0.0.1:32773\nMINIKUBE_ACTIVE_DOCKERD=test\n], stderr: ! Using the docker-env command with the containerd runtime is a highly experimental feature, please provide feedback or contribute to make it better\nIdentity added: /home/denk/.minikube/machines/test/id_rsa (/home/denk/.minikube/machines/test/id_rsa)\n" subtask=-1 task=DevLoop
msg="Using minikube docker daemon at ssh://docker@127.0.0.1:32773" subtask=-1 task=DevLoop
```

It's just that the `detect-minikube` flag is not checked here

https://github.com/GoogleContainerTools/skaffold/blob/95fb592deb61a4e290edca4925bd7c9c2fa93f6c/pkg/skaffold/docker/client.go#L84-L92

How does this happen here

https://github.com/GoogleContainerTools/skaffold/blob/95fb592deb61a4e290edca4925bd7c9c2fa93f6c/pkg/skaffold/config/util.go#L252-L253

Based on common sense,
The current behavior is obviously wrong

I don't understand why it hasn't been fixed yet.

someone just started using [kind](https://github.com/GoogleContainerTools/skaffold/issues/5494#issuecomment-1344220143)

[overrides](https://github.com/GoogleContainerTools/skaffold/issues/5320#issuecomment-770418237) minikube in `$PATH`

other try using [rename hack](https://github.com/GoogleContainerTools/skaffold/issues/5494#issuecomment-1584657722)
which should not work for 5 years as
because it is successfully detecting by the certificate.

related issues #5320 #5494 #5143

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.