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

Question about imports in the controller #9

Open
bennythejudge opened this issue Feb 5, 2020 · 1 comment
Open

Question about imports in the controller #9

bennythejudge opened this issue Feb 5, 2020 · 1 comment

Comments

@bennythejudge
Copy link

You have

	appv1alpha1 "github.com/xcoulon/podset-operator/pkg/apis/app/v1alpha1"

in your podset_controller.go - I was trying to build following the Medium article but I cannot find how to adapt this import for my own local environment.
Could you pls help?

I am working in /Users/myuser/go/src/github.com/operator-framework/operator-sdk/podset-operator so I have the above content in /Users/myuser/go/src/github.com/operator-framework/operator-sdk/podset-operator/pkg/apis/app/v1alpha1:

ls -l
total 32
-rw-r--r--  1 myuser  staff   168 Feb  5 22:16 doc.go
-rw-r--r--  1 myuser  staff  1519 Feb  5 22:29 podset_types.go
-rw-r--r--  1 myuser  staff   632 Feb  5 22:16 register.go
-rw-r--r--  1 myuser  staff  3357 Feb  5 22:57 zz_generated.deepcopy.go

Thanks for the article!

@xcoulon
Copy link
Owner

xcoulon commented Feb 6, 2020

hello @bennythejudge
ah, I see, but it looks like you have a weird path in your project. What about simply moving the project to /Users/myuser/go/src/github.com/bennythejudge/podset-operator and replace all occurrences of xcoulon with bennythejudge in the imports?
Having a 3-level path for the repository is a bit unusual, and also, you should not put this example app in the operator-framework/operator-sdk repo, I believe (or at least, I would not recommend it)

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

No branches or pull requests

2 participants