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 WSL support #694

Merged
merged 2 commits into from
Jun 19, 2018
Merged

add WSL support #694

merged 2 commits into from
Jun 19, 2018

Conversation

remoe
Copy link
Contributor

@remoe remoe commented Jun 17, 2018

add WSL support #523

The DOCKER_CERT_PATH environment will be changed with wslpath tool.

Here you find a documentation how one can use minikube on windows:

After this installation one need to correct the kube config with:

USERNAME=$(id -n -u)
kubectl config set-cluster minikube --certificate-authority=/mnt/c/Users/${USERNAME}/.minikube/ca.crt
kubectl config set-credentials minikube --client-certificate=/mnt/c/Users/${USERNAME}/.minikube/client.crt --client-key=/mnt/c/Users/${USERNAME}/.minikube/client.key
kubectl config set-context minikube --cluster=minikube --user=minikube

@@ -43,10 +46,15 @@ var (
dockerAPIClientOnce sync.Once
dockerAPIClient APIClient
dockerAPIClientErr error
procVerDetect bool
isWsl bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of having this at both the package level and set through a function. Could we drop this here and always return the result of detectWsl?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then we don't cache. Ok.

}

func getMiniKubeFilename() (string, error) {
const winMiniKubeEnv = "SKAFFOLD_WINDOWS_MINIKUBE"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move this constant to the package level?

func getMiniKubeFilename() (string, error) {
const winMiniKubeEnv = "SKAFFOLD_WINDOWS_MINIKUBE"
if found, _ := detectWsl(); found {
filename, envExists := os.LookupEnv(winMiniKubeEnv)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make more sense to use exec.LookPath with minikube.exe instead of this environment variable to find the path to Minikube?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea. done.

@dlorenc
Copy link
Contributor

dlorenc commented Jun 18, 2018

Sent #698 to fix that.

@dlorenc dlorenc added the kokoro:run runs the kokoro jobs on a PR label Jun 18, 2018
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Jun 18, 2018
@dgageot dgageot merged commit 3108a78 into GoogleContainerTools:master Jun 19, 2018
@remoe remoe deleted the add/wsl-support branch June 19, 2018 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants