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

Go Operator Tutorial Page: Incorrect Link(s) and some file path corrections #6701

Open
harshvijaythakkar opened this issue Mar 12, 2024 · 2 comments
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/documentation Categorizes issue or PR as related to documentation.
Milestone

Comments

@harshvijaythakkar
Copy link

What is the URL of the document?

Go Operator Tutorial

Which section(s) is the issue in?

Implement the Controller

What needs fixing?

The latest operator-sdk version: "v1.34.0" is pointing to wrong link for memcached_controller.go file.

Additional context

First Issue

When I click on memcached_controller.go it is giving 404 not found error. On the "latest" branch of operator-sdk repository under testdata path I don't see go/v3 folder.

The correct file location of memcached_controller.go file is under testdata/go/v4/memcached-operator/internal/controller/memcached_controller.go

On documentation I see following text

For this example replace the generated controller file controllers/memcached_controller.go with the example memcached_controller.go implementation.

I think it needs to be changed to

For this example replace the generated controller file internal/controller/memcached_controller.go with the example memcached_controller.go implementation.

Second Issue

On documentation I see following text

The SetupWithManager() function in controllers/memcached_controller.go specifies how the controller is built to watch a CR and other resources that are owned and managed by that controller.

I think it needs to be changed to

The SetupWithManager() function in internal/controllers/memcached_controller.go specifies how the controller is built to watch a CR and other resources that are owned and managed by that controller.

If my understanding is correct I think I can also make changes but just want to confirm that my understanding is correct before raising PR for changes.

@harshvijaythakkar harshvijaythakkar added the kind/documentation Categorizes issue or PR as related to documentation. label Mar 12, 2024
@caspereijkens
Copy link

Also, the tutorial is incompatible with go v1.22: #6681
I think a warning would save time for many of us.

@caspereijkens
Copy link

caspereijkens commented Mar 15, 2024

And the namespace scoping as described in the tutorial also doesn't work anymore. Please update to follow https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/manager#example-New-LimitToNamespaces

@acornett21 acornett21 added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels May 7, 2024
@acornett21 acornett21 added this to the Backlog milestone May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/documentation Categorizes issue or PR as related to documentation.
Projects
None yet
Development

No branches or pull requests

3 participants