-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Does not work with Modules #992
Comments
Can you set your GOPATH environment variable and create your project in the GOPATH? Currently, we require all go operators to be in your GOPATH. |
We switched all our Go code to Modules by now and will not be using |
Like @AlexNPavel we need our operators to be created in the |
Fair enough. You are aware that
See 1
Sorry, I do not follow. What do you want to be adjusted? To me the issue is sufficient neutral. |
@abergmeier Sorry if I wasn't clear enough, just wanted this to be turned into a feature request instead of a Bug Report. :) This is so we can prioritize the feature request and possibly work on it. I can also edit the description of the issue, no problem. (just to avoid confusion between bug and feature requests) |
Ah sorry, didn't see that. Changed now. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Added in the #1001 PR. |
This still doesn't work for me, running MacOS 10.11.6 with Go 1.12.5 and
|
@zephinzer The SDK currently still requires projects to be created in $GOPATH. See the discussion in #1417. |
EDIT.. I figured this out... 🧐 You need to add your project to the GOPATH with something like bash-4.4# mkdir -p $HOME/projects/example-inc/
bash-4.4# export GOPATH=$GOPATH:$HOME/projects
bash-4.4# cd $HOME/projects/example-inc/
bash-4.4# export GO111MODULE=on
bash-4.4# operator-sdk new app-operator And that should work. What's strange about this is being in my original GOPATH of |
@jleach solution suggested by you didn't work for me somehow. I get following error : [server3 project]$ operator-sdk new dataservice-operator |
@deepaktawri Looks like you're getting an error about having a FWIW, |
@joelandford Thank you for quick reply. I believe operator-sdk v0.9.0 is not released yet. |
We released it about a month ago 🙂 https://github.com/operator-framework/operator-sdk/releases/tag/v0.9.0 |
Thank you @joelandford. I tried v0.9.0 and got following error : #operator-sdk new dataservice-operator --repo go: bitbucket.org/ww/[email protected]: hg clone -U https://bitbucket.org/ww/goautoneg . in /dwshome/deepak/master/main/.go/pkg/mod/cache/vcs/59c2185b80ea440a7c3b8c5eff3d8abb68c53dea1f20f615370c924c4150b27f: exec: "hg": executable file not found in $PATH |
Installing Mercurial on system fixes above problem. cmd/manager/main.go:14:2: import path cannot be absolute path |
Help page seems confusing which asks --repo to use as follows 👍
Where as, it should be --repo= = is important. |
@deepaktawri I think there's some confusion about what to use for |
@deepaktawri Looks like I made a mistake at set it to |
Feature Request
What did you do?
I tried to run
operator-sdk new foo --skip-git-init
both in an empty directory as well as a directory containing bothgo.mod
andgo.sum
.What did you expect to see?
I expected it to generate without any fuss.
What did you see instead? Under which circumstances?
Output is:
Environment
operator-sdk version:
operator-sdk version v0.4.0
Are you writing your operator in ansible, helm, or go?
go
Additional context
printenv | grep GOPATH
is emptyThe text was updated successfully, but these errors were encountered: