diff --git a/docs/book/basics/project_creation_and_structure.md b/docs/book/basics/project_creation_and_structure.md index 919a1532c0e..075a084928a 100644 --- a/docs/book/basics/project_creation_and_structure.md +++ b/docs/book/basics/project_creation_and_structure.md @@ -80,6 +80,9 @@ $ kubebuilder init --domain k8s.io Create the *_types.go file and controller.go files. +For more on resources and controllers see [What Is A Resource](../basics/what_is_a_resource.md) +and [What Is A Controller](../basics/what_is_a_controller.md) + {% sample lang="bash" %} ```bash $ kubebuilder create resource --group mygroup --version v1beta1 --kind MyKind diff --git a/docs/book/basics/running_tests.md b/docs/book/basics/running_tests.md index bcb282a0af8..3659528abf0 100644 --- a/docs/book/basics/running_tests.md +++ b/docs/book/basics/running_tests.md @@ -15,6 +15,9 @@ is created with `kubebuilder create resource`, a test file will be created to st Update the test to include validation you add to your resource. +For more on Resources see [What Is A Resource](../basics/what_is_a_resource.md) + + #### Controller Tests The controller tests are created under `pkg/controller//controller_test.go`. When a resource @@ -24,6 +27,8 @@ Reconcile function is called. Update the test to verify the business logic of your controller. +For more on Controllers see [What Is A Controller](../basics/what_is_a_controller.md) + {% method %} ## Run the tests diff --git a/docs/book/getting_started/hello_world.md b/docs/book/getting_started/hello_world.md index 56e85fe1ac8..5d582474e20 100644 --- a/docs/book/getting_started/hello_world.md +++ b/docs/book/getting_started/hello_world.md @@ -8,7 +8,8 @@ This book is being actively developed. Kubernete APIs require boilerplate code that is not shown here and is managed by kubebuilder. Project structure may be created by running `kubebuilder init` and then creating a -new API with `kubebuilder create resource`. More on this topic in *Project Creation and Structure* +new API with `kubebuilder create resource`. More on this topic in +[Project Creation and Structure](../basics/project_creation_and_structure.md) {% endpanel %} This chapter shows an abridged Kubebuilder project for a simple API. @@ -25,8 +26,12 @@ Kubernetes APIs have 3 components. These components live in separate go package This is a Resource definition. It is a go struct containing the API schema that implicitly defines CRUD endpoints for the Resource. +For a more information on Resources see [What is a Resource](../basics/what_is_a_resource.md). + While it is not shown here, most Resources will split their fields in into a Spec and a Status field. +For a more complete example see [Simple Resource Example](../basics/simple_resource.md) + {% sample lang="go" %} ```go type Pancake struct { @@ -52,7 +57,10 @@ mapped to the key of a Pancake object. This will trigger a full reconcile of the Pancake object, which will in turn read related cluster state, including the object the original event was for. -The code shown here has been abridged; for a more complete example see *Simple Controller Example*. +For a more information on Controllers see [What is a Controller](../basics/what_is_a_controller.md). + +The code shown here has been abridged; for a more complete example see +[Simple Controller Example](../basics/simple_controller.md) {% sample lang="go" %} ```go