Skip to content

Commit 16b8dae

Browse files
Align tutorial imports with test samples (#4465)
Signed-off-by: varshaprasad96 <[email protected]>
1 parent f340790 commit 16b8dae

File tree

7 files changed

+12
-11
lines changed

7 files changed

+12
-11
lines changed

website/content/en/docs/building-operators/golang/advanced-topics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The operator's Manager supports the core Kubernetes resource types as found in t
4343

4444
```Go
4545
import (
46-
cachev1alpha1 "github.com/example-inc/memcached-operator/api/v1alpha1
46+
cachev1alpha1 "github.com/example/memcached-operator/api/v1alpha1
4747
...
4848
)
4949

website/content/en/docs/building-operators/golang/migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ So let's create a new project with the same domain (`example.com`):
6161
```sh
6262
mkdir memcached-operator
6363
cd memcached-operator
64-
operator-sdk init --domain example.com --repo github.com/example-inc/memcached-operator
64+
operator-sdk init --domain example.com --repo github.com/example/memcached-operator
6565
```
6666

6767
**Note**: `operator-sdk` attempts to automatically discover the Go module path of your project by looking for a `go.mod` file, or if in `$GOPATH`, by using the directory path. Use the `--repo` flag to explicitly set the module path.

website/content/en/docs/building-operators/golang/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ with the Go plugin to initialize the project.
2323
```sh
2424
mkdir memcached-operator
2525
cd memcached-operator
26-
operator-sdk init --domain=example.com --repo=github.com/example-inc/memcached-operator
26+
operator-sdk init --domain=example.com --repo=github.com/example/memcached-operator
2727
```
2828

2929
### Create an API

website/content/en/docs/building-operators/golang/references/client.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,9 @@ Example:
316316
```Go
317317
import (
318318
"context"
319-
cachev1alpha1 "github.com/example-inc/memcached-operator/pkg/apis/cache/v1alpha1"
320319
ctrl "sigs.k8s.io/controller-runtime"
320+
321+
cachev1alpha1 "github.com/example/memcached-operator/api/v1alpha1"
321322
)
322323

323324
func (r *AppReconciler) Reconcile(context.Context, req ctrl.Request) (ctrl.Result, error) {

website/content/en/docs/building-operators/golang/references/event-filtering.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ import (
6666
"sigs.k8s.io/controller-runtime/pkg/event"
6767
"sigs.k8s.io/controller-runtime/pkg/predicate"
6868

69-
cachev1alpha1 "github.com/example-inc/app-operator/apis/cache/v1alpha1"
69+
cachev1alpha1 "github.com/example/app-operator/api/v1alpha1"
7070
)
7171

7272
...

website/content/en/docs/building-operators/golang/tutorial.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ $ mkdir -p $HOME/projects/memcached-operator
2222
$ cd $HOME/projects/memcached-operator
2323
# we'll use a domain of example.com
2424
# so all API groups will be <group>.example.com
25-
$ operator-sdk init --domain=example.com --repo=github.com/example-inc/memcached-operator
25+
$ operator-sdk init --domain=example.com --repo=github.com/example/memcached-operator
2626
```
2727

2828
To learn about the project directory structure, see [Kubebuilder project layout][kubebuilder_layout_doc] doc.
@@ -221,7 +221,7 @@ Every Controller has a Reconciler object with a `Reconcile()` method that implem
221221
import (
222222
ctrl "sigs.k8s.io/controller-runtime"
223223

224-
cachev1alpha1 "github.com/example-inc/memcached-operator/api/v1alpha1"
224+
cachev1alpha1 "github.com/example/memcached-operator/api/v1alpha1"
225225
...
226226
)
227227

@@ -495,7 +495,7 @@ Also see the [advanced topics][advanced_topics] doc for more use cases and under
495495
[markers]: https://book.kubebuilder.io/reference/markers.html
496496
[crd-markers]: https://book.kubebuilder.io/reference/markers/crd-validation.html
497497
[rbac-markers]: https://book.kubebuilder.io/reference/markers/rbac.html
498-
[memcached_controller]: https://github.com/operator-framework/operator-sdk/blob/v1.2.0/testdata/go/memcached-operator/controllers/memcached_controller.go
498+
[memcached_controller]: https://github.com/operator-framework/operator-sdk/blob/v1.3.x/testdata/go/v3/memcached-operator/controllers/memcached_controller.go
499499
[builder_godocs]: https://godoc.org/github.com/kubernetes-sigs/controller-runtime/pkg/builder#example-Builder
500500
[legacy_quickstart_doc]:https://v0-19-x.sdk.operatorframework.io/docs/golang/legacy/quickstart/
501501
[activate_modules]: https://github.com/golang/go/wiki/Modules#how-to-install-and-activate-module-support

website/content/en/docs/upgrading-sdk-version/v0.1.0-migration-guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $ operator-sdk --version
1919
operator-sdk version 0.1.0
2020

2121
# Create new project
22-
$ cd $GOPATH/src/github.com/example-inc/
22+
$ cd $GOPATH/src/github.com/example/
2323
$ mv memcached-operator old-memcached-operator
2424
$ operator-sdk new memcached-operator --skip-git-init
2525
$ ls
@@ -88,7 +88,7 @@ pkg/controller/
8888
Inspect the `add()` function in your `pkg/controller/<kind>/<kind>_controller.go` file:
8989
```Go
9090
import (
91-
cachev1alpha1 "github.com/example-inc/memcached-operator/pkg/apis/cache/v1alpha1"
91+
cachev1alpha1 "github.com/example/memcached-operator/pkg/apis/cache/v1alpha1"
9292
...
9393
)
9494

@@ -154,7 +154,7 @@ Be sure to keep the initial section in the `Reconcile()` code that looks up the
154154
```Go
155155
import (
156156
apierrors "k8s.io/apimachinery/pkg/api/errors"
157-
cachev1alpha1 "github.com/example-inc/memcached-operator/pkg/apis/cache/v1alpha1"
157+
cachev1alpha1 "github.com/example/memcached-operator/pkg/apis/cache/v1alpha1"
158158
...
159159
)
160160
func (r *ReconcileMemcached) Reconcile(request reconcile.Request) (reconcile.Result, error) {

0 commit comments

Comments
 (0)