Skip to content

Commit 46c90d1

Browse files
authored
Merge pull request #121 from SomtochiAma/options-readme
Options readme
2 parents 7d15bd2 + bd68520 commit 46c90d1

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

reconciler-options.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
## Reconciler Options in Kubebuilder-declarative-pattern
2+
3+
Kubebuilder-declarative-pattern is structured in a way that makes it easy for you to turn functionality(provided in kubebuilder-declarative-patter) on and off in the operator you have created. This also makes it easy to add new functionality to your operator. This README serves as a references for these functionalities and indicates which ones are enabled by default.
4+
5+
The options are:
6+
## WithRawManifestOperation
7+
WithRawManifestOperation takes in a set of functions that transforms raw string manifests before applying it.
8+
The functions should be of the form:
9+
```
10+
type ManifestOperation = func(context.Context, DeclarativeObject, string) (string, error)
11+
```
12+
13+
## WithObjectTransform
14+
WithObjectTransform takes in a set of functions that transforms the manifest objects before applying it
15+
The functions should be of the form:
16+
```
17+
type ObjectTransform = func(context.Context, DeclarativeObject, *manifest.Objects) error
18+
```
19+
20+
## WithManifestController
21+
WithManifestController overrides the default source for loading manifests.
22+
23+
## WithApplyPrune
24+
WithApplyPrune turns on the --prune behavior of kubectl apply. This behavior deletes any objects that exist in the API server that are not deployed by the current version of the manifest which match a label specific to the addon instance.
25+
This option requires (WithLabels)[#withLabels] to be used.
26+
27+
## WithOwner
28+
WithOwner sets an owner ref on each deployed object by the (OwnerSelector)[https://github.com/kubernetes-sigs/kubebuilder-declarative-pattern/blob/master/pkg/patterns/declarative/options.go#L74].
29+
30+
## WithLabels
31+
WithLabels sets a fixed set of labels configured provided by a LabelMaker to all deployment objecs for a given DeclarativeObject
32+
33+
## WithStatus
34+
WithStatus provides a (Status)[https://github.com/kubernetes-sigs/kubebuilder-declarative-pattern/blob/master/pkg/patterns/declarative/status.go#L26] interface that will be used during Reconcile.
35+
36+
## WithPreserveNamespace
37+
WithPreserveNamespace preserves the namespaces defined in the deployment manifest
38+
instead of matching the namespace of the DeclarativeObject
39+
40+
## WithApplyKustomize
41+
WithApplyKustomize run kustomize build to create final manifest
42+
43+
## WithManagedApplication
44+
WithManagedApplication is a transform that will modify the Application object in the deployment to match the configuration of the rest of the deployment.
45+
46+
## WithApplyValidation
47+
WithApplyValidation enables validation with kubectl apply
48+
49+
## WithReconcileMetrics
50+
WithReconcileMetrics enables metrics of declarative reconciler.

0 commit comments

Comments
 (0)