Skip to content

Commit 1ead0bf

Browse files
committed
docs: add GOROOT env var FAQ
Generalize the description to remove instance of Getting Started guide Fixes operator-framework#3080
1 parent 77aee3c commit 1ead0bf

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

website/content/en/docs/faq.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,22 +125,22 @@ func (r *ReconcileMemcached) Reconcile(request reconcile.Request) (reconcile.Res
125125
126126
## I see deepcopy errors and image build fails. How do I fix this?
127127
128-
When you run the ```operator-sdk generate k8s``` command while following the [Getting Started][getting-started-guide] guide, you might see an error like this
128+
When you run the ```operator-sdk generate k8s``` command, you might see an error like this
129129
130130
``` bash
131131
INFO[0000] Running deepcopy code-generation for Custom Resource group versions: [cache:[v1alpha1], ]
132132
F0523 01:18:27.122034 5157 deepcopy.go:885] Hit an unsupported type invalid type for invalid type, from github.com/example-inc/memcached-operator/pkg/apis/cache/v1alpha1.Memcached
133133
```
134134
135-
This is because of the ```GOROOT``` environment variable not being set. More details [here][goroot-github-issue].
135+
This is because of the `GOROOT` environment variable not being set. More details [here][goroot-github-issue].
136136
137-
In order to fix this, you simply need to export the ```GOROOT``` environment variable
137+
In order to fix this, you simply need to export the `GOROOT` environment variable
138138
139-
``` bash
140-
export GOROOT=$(go env GOROOT)
139+
```
140+
$ export GOROOT=$(go env GOROOT)
141141
```
142142
143-
This will work for the current terminal instance, to make it more permanent, consider adding this line to the ```bashrc``` file.
143+
This will work for the current environment. To persist this fix, add the above line to your environment's config file, ex. `bashrc` file.
144144
145145
[kube-apiserver_options]: https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/#options
146146
[controller-runtime_faq]: https://github.com/kubernetes-sigs/controller-runtime/blob/master/FAQ.md#q-how-do-i-have-different-logic-in-my-reconciler-for-different-types-of-events-eg-create-update-delete
@@ -150,4 +150,3 @@ This will work for the current terminal instance, to make it more permanent, con
150150
[client.Reader]:https://godoc.org/sigs.k8s.io/controller-runtime/pkg/client#Reader
151151
[rbac]:https://kubernetes.io/docs/reference/access-authn-authz/rbac/
152152
[goroot-github-issue]:https://github.com/operator-framework/operator-sdk/issues/1854#issuecomment-525132306
153-
[getting-started-guide]:https://github.com/operator-framework/getting-started#overview

0 commit comments

Comments
 (0)