Skip to content

Commit

Permalink
GitBook add links to chapters
Browse files Browse the repository at this point in the history
  • Loading branch information
pwittrock committed May 7, 2018
1 parent 4969274 commit 1643bf1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/book/basics/project_creation_and_structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions docs/book/basics/running_tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<kind>/controller_test.go`. When a resource
Expand All @@ -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

Expand Down
12 changes: 10 additions & 2 deletions docs/book/getting_started/hello_world.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 {
Expand All @@ -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
Expand Down

0 comments on commit 1643bf1

Please sign in to comment.