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

Closed
harshvijaythakkar opened this issue Mar 12, 2024 · 6 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. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
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
@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 6, 2024
@openshift-bot
Copy link

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci openshift-ci bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Sep 5, 2024
@openshift-bot
Copy link

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-ci openshift-ci bot closed this as completed Oct 6, 2024
Copy link

openshift-ci bot commented Oct 6, 2024

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

4 participants