Document how reconcile.Results affects requeue
- [Development](#development)
- [Requirements](#requirements)
- [Dependencies](#dependencies)
- - [Publishing](#publishing)
- [Creating a new Resource and Controller](#creating-a-new-resource-and-controller)
+ - [Reconcile Results](#reconcile-results)
- [Testing](#testing)
- [Create-Or-Update pattern](#create-or-update-pattern)
- [Logging and Events](#logging-and-events)
@@ -26,8 +26,6 @@ Run with libraries fetched via go modules:
export GO111MODULE=on
```
-## Publishing
-
## Creating a new Resource and Controller
- create a new directory: `./pkg/kube/apis/<group_name>/<version>`
@@ -159,6 +157,17 @@ export GO111MODULE=on
- create a custom resource definition in `deploy/helm/cf-operator/templates/`
- add the custom resource definition to `bin/apply-crds`
+### Reconcile Results
+
+ // RequeueOnError will requeue if reconcile also returns an error
+ RequeueOnError = reconcile.Result{}
+ // Requeue will requeue the request, behaviour is different than returning an error
+ Requeue = reconcile.Result{Requeue: true}
+ // RequeueAfterDefault requeues after the default, unless reconcile also returns an error
+ RequeueAfterDefault = reconcile.Result{RequeueAfter: config.RequeueAfter}
+ // NoRequeue does not requeue, unless reconcile also returns an error
+ NoRequeue = reconcile.Result{Requeue: false}
+
### Testing
- create functions in `env/machine`
