Skip to content

Commit 66e78cc

Browse files
author
Eric Stroczynski
authored
doc/user-guide.md: operator-sdk new requires --repo if outside of $GOPATH/src (#1745)
1 parent 4b6d64b commit 66e78cc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/user-guide.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ Follow the steps in the [installation guide][install_guide] to learn how to inst
2424
Use the CLI to create a new memcached-operator project:
2525

2626
```sh
27-
$ mkdir -p $HOME/projects/example.com/
28-
$ cd $HOME/projects/example.com/
29-
$ operator-sdk new memcached-operator
27+
$ mkdir -p $HOME/projects
28+
$ cd $HOME/projects
29+
$ operator-sdk new memcached-operator --repo=github.com/example-inc/memcached-operator
3030
$ cd memcached-operator
3131
```
3232

3333
To learn about the project directory structure, see [project layout][layout_doc] doc.
3434

3535
#### A note on dependency management
3636

37-
By default, `operator-sdk new` generates a `go.mod` file to be used with [Go modules][go_mod_wiki]. If you'd like to use [`dep`][dep_tool], set `--dep-manager=dep` when initializing your project, which will create a `Gopkg.toml` file with the same dependency information.
37+
By default, `operator-sdk new` generates a `go.mod` file to be used with [Go modules][go_mod_wiki]. The `--repo=<path>` flag is required when creating a project outside of `$GOPATH/src`, as scaffolded files require a valid module path. If you'd like to use [`dep`][dep_tool], set `--dep-manager=dep` when initializing your project, which will create a `Gopkg.toml` file with the same dependency information.
3838

3939
##### Go modules
4040

@@ -102,12 +102,12 @@ $ operator-sdk generate k8s
102102
```
103103

104104
### OpenAPI validation
105-
To update the OpenAPI validation section in the CRD `deploy/crds/cache_v1alpha1_memcached_crd.yaml`, run the following command.
105+
To update the OpenAPI validation section in the CRD `deploy/crds/cache_v1alpha1_memcached_crd.yaml`, run the following command.
106106

107107
```console
108108
$ operator-sdk generate openapi
109109
```
110-
This validation section allows Kubernetes to validate the properties in a Memcached Custom Resource when it is created or updated. An example of the generated YAML is as follows:
110+
This validation section allows Kubernetes to validate the properties in a Memcached Custom Resource when it is created or updated. An example of the generated YAML is as follows:
111111

112112
```YAML
113113
spec:

0 commit comments

Comments
 (0)