File tree Expand file tree Collapse file tree 1 file changed +25
-3
lines changed Expand file tree Collapse file tree 1 file changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -183,13 +183,35 @@ make run
183183
184184## Install Instances of Custom Resources
185185
186- If you pressed ` y ` for Create Resource [ y/n] then you created a CR for your CRD in your samples (make sure to edit them first if you've changed the
187- API definition):
186+ If you pressed ` y ` for Create Resource [ y/n] then you created a CR for your CRD in your
187+ ` config/samples/ ` directory.
188+
189+ Edit ` config/samples/webapp_v1_guestbook.yaml ` to contain a valid ` spec ` . For example:
190+
191+ ``` yaml
192+ # ...
193+ spec :
194+ foo : bar
195+ ` ` `
196+
197+ Hint: "foo" is a string field defined in ` api/v1/guestbook_types.go`:
198+
199+ ` ` ` go
200+ // foo is an example field of Guestbook. Edit guestbook_types.go to remove/update
201+ // +optional
202+ Foo *string ` json:"foo,omitempty"`
203+ ```
188204
189205``` bash
190206kubectl apply -k config/samples/
191207```
192208
209+ You can have a look at your applied resource now:
210+
211+ ``` bash
212+ kubectl get guestbooks.webapp.my.domain guestbook-sample -o yaml
213+ ```
214+
193215## Run It On the Cluster
194216
195217When your controller is ready to be packaged and tested in other clusters.
@@ -313,4 +335,4 @@ before designing your own API and project.
313335[ markers ] : reference/markers.md
314336[ controller-gen ] : https://sigs.k8s.io/controller-tools/cmd/controller-gen
315337[ scaffolding-markers ] : reference/markers/scaffold.md
316- [ ai-gh-models ] : https://docs.github.com/en/github-models/about-github-models
338+ [ ai-gh-models ] : https://docs.github.com/en/github-models/about-github-models
You can’t perform that action at this time.
0 commit comments