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

On Windows, operator-sdk run --local doesn't work. #2480

Closed
al45tair opened this issue Jan 29, 2020 · 0 comments · Fixed by #2481
Closed

On Windows, operator-sdk run --local doesn't work. #2480

al45tair opened this issue Jan 29, 2020 · 0 comments · Fixed by #2481
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@al45tair
Copy link
Contributor

al45tair commented Jan 29, 2020

Bug Report

What did you do?
I'm trying to use operator-sdk on Windows. After fixing a bug in Go itself that stops this from working correctly, I tried to do a "make local".

What did you expect to see?
The "make local" built everything, then failed because the name of the file it had built was "my-operator" rather than "my-operator.exe".

What did you see instead? Under which circumstances?
It should work just the same as it does on Linux/macOS.

Environment

  • operator-sdk version: 87787d1

  • go version: go version go1.13.7 windows/amd64

  • Kubernetes version information:

Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.5", GitCommit:"20c265fef0741dd71a66480e35bd69f18351daea", GitTreeState:"clean", BuildDate:"2019-10-15T19:16:51Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"windows/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.5", GitCommit:"20c265fef0741dd71a66480e35bd69f18351daea", GitTreeState:"clean", BuildDate:"2019-10-15T19:07:57Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
  • Kubernetes cluster kind: various

  • Are you writing your operator in ansible, helm, or go? Go

Possible Solution
Fix cmd/operator-sdk/run/local.go so that it appends .exe to outputBinName on Windows.

Additional context
You need a fix for gengo issue #166 before any of this will work; otherwise the operator-sdk generate k8s step will generate files in the wrong place.

al45tair added a commit to al45tair/operator-sdk that referenced this issue Jan 29, 2020
On Windows, we need to add the .exe suffix to the executable that is
generated by the operator-sdk run --local command, otherwise it will
fail because the file doesn't have an executable extension.

Fixes operator-framework#2480
@camilamacedo86 camilamacedo86 added the kind/bug Categorizes issue or PR as related to a bug. label Jan 30, 2020
estroz pushed a commit that referenced this issue Feb 20, 2020
On Windows, we need to add the .exe suffix to the executable that is
generated by the operator-sdk run --local command, otherwise it will
fail because the file doesn't have an executable extension.

Fixes #2480

* CHANGELOG.md: add bugfix

Co-authored-by: Camila Macedo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants