Skip to content

Commit

Permalink
Clean up last few TODO links
Browse files Browse the repository at this point in the history
This cleans up the last few links that were just waiting to be filled
in, plus a TODO block to embed a file in the multiversion tutorial.
  • Loading branch information
DirectXMan12 committed Jul 30, 2019
1 parent be13268 commit e24520f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
8 changes: 5 additions & 3 deletions docs/book/src/cronjob-tutorial/testdata/emptymain.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ At this point, our main function is fairly simple:
- We set up some basic flags for metrics.
- We instantiate a [*manager*](../TODO.md), which keeps track of running all of
our controllers, as well as setting up shared caches and clients to the API
server (notice we tell the manager about our Scheme).
- We instantiate a
[*manager*](https://godoc.org/sigs.k8s.io/controller-runtime/pkg/manager#Manager),
which keeps track of running all of our controllers, as well as setting up
shared caches and clients to the API server (notice we tell the manager about
our Scheme).
- We run our manager, which in turn runs all of our controllers and webhooks.
The manager is set up to run until it receives a graceful shutdown signal.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ func (r *CronJob) SetupWebhookWithManager(mgr ctrl.Manager) error {

/*
Notice that we use kubebuilder markers to generate webhook manifests.
This markers is responsible for generating a mutating webhook manifest.
This marker is responsible for generating a mutating webhook manifest.
The meaning of each marker can be found [here](../TODO.md).
The meaning of each marker can be found [here](/reference/markers/webhook.md).
*/

// +kubebuilder:webhook:path=/mutate-batch-tutorial-kubebuilder-io-v1-cronjob,mutating=true,failurePolicy=fail,groups=batch.tutorial.kubebuilder.io,resources=cronjobs,verbs=create;update,versions=v1,name=mcronjob.kb.io
Expand Down Expand Up @@ -87,10 +87,7 @@ func (r *CronJob) Default() {
}

/*
Notice that we use kubebuilder markers to generate webhook manifests.
This markers is responsible for generating a validating webhook manifest.
The meaning of each marker can be found [here](../TODO.md).
This marker is responsible for generating a validating webhook manifest.
*/

// +kubebuilder:webhook:path=/validate-batch-tutorial-kubebuilder-io-v1-cronjob,mutating=false,failurePolicy=fail,groups=batch.tutorial.kubebuilder.io,resources=cronjobs,verbs=create;update,versions=v1,name=vcronjob.kb.io
Expand Down Expand Up @@ -156,7 +153,7 @@ You can find kubebuilder validation markers (prefixed
with `// +kubebuilder:validation`) in the [API](api-design.md)
You can find all of the kubebuilder supported markers for
declaring validation by running `controller-gen crd -w`,
or [here](../TODO.md).
or [here](/reference/markers/crd-validation.md).
*/

func (r *CronJob) validateCronJobSpec() *field.Error {
Expand Down
11 changes: 9 additions & 2 deletions docs/book/src/multiversion-tutorial/api-implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Let's take a quick look at the `api/v1/disk_webhook.go` file.

If you look at `main.go`, you will notice the following snippet that invokes the
SetupWebhook method.
```Go
```go
.....

if err = (&infrav1.Disk{}).SetupWebhookWithManager(mgr); err != nil {
Expand All @@ -176,7 +176,14 @@ CRD_OPTIONS ?= "crd:trivialVersions=false"
```

Run `make manifests` to ensure that CRD manifests gets generated under `config/crd/bases/` directory.
[TODO](../TODO.md) embed a compressed form of the generated CRD `testdata/project/config/crd`

<details><summary>`infra.kubebuilder.io_disks.yaml`: the generated CRD YAML</summary>

```yaml
{{#include ./testdata/project/config/crd/bases/infra.kubebuilder.io_disks.yaml}}
```

</details>

### Manifests Generation

Expand Down

0 comments on commit e24520f

Please sign in to comment.