You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference.md
+37Lines changed: 37 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,7 @@ It has several attributes:
32
32
[qute templating engine](https://quarkus.io/guides/qute-reference), other resources can be referenced from the templates, see below.
33
33
If the resource is namespace scoped and the namespace attribute is not specified in `.metadata` automatically the namespace of `Glue`
34
34
is used.
35
+
-**`resourceTemplate`** - a string template for the resource that allows the use of all features of Qute. See sample [here](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/test/resources/glue/SimpleBulk.yaml).
35
36
-**`dependsOn`** - is a list of names of other child resources (not related resources). The resource is not reconciled until all the resources
36
37
which it depends on are not reconciled and ready (if there is a `readyPostCondition` present).
37
38
Note that during the cleanup phase (when a `Glue` is deleted) resources are cleaned up in reverse order.
@@ -44,6 +45,7 @@ It has several attributes:
44
45
is makes the reconciliation much more efficient, since controller updates the resource only if truly changed. However,
45
46
it is not possible to match resources because of some characteristics of Kubernetes API (default values, value conversions, etc)
46
47
so you can always opt out the matching (use value `NONE`), and update the resource on every reconciliation.
48
+
-**`bulk`** - a flag to indicate if the child resource is a bulk resource (see below), default is `false`.
47
49
48
50
#### Built-in conditions
49
51
@@ -55,6 +57,41 @@ At the moment there are two types of built-in conditions provided:
55
57
See accessing the related resource in [WebPage sample](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/test/resources/sample/webpage/webpage.operator.yaml#L62-L64),
56
58
and cross-referencing resources [here](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/test/resources/glue/TwoResourcesAndCondition.yaml#L23-L28).
57
59
60
+
#### Bulk Resources
61
+
62
+
Bulk is a type of child resource that handles a dynamic number of resources. For example, if you want to create many ConfigMaps based on some value in your custom resource.
63
+
To use bulk resources set `bulk` flag of `childResource` to `true`. For now, **only**`resourceTemplate` is allowed in bulk resources, where you specify a yaml that contains
64
+
a list of resources under `items` key. As for non-bulk resources, all the related resources, parent and other child resources which this resource `dependsOn`, are available in the template.
65
+
66
+
In the following sample, the number of created `ConfigMaps` is based on the `replicas` value from the `.spec` of the custom resource:
See the `GlueOperator` example [here](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/test/resources/glueoperator/BulkOperator.yaml) and a simple `Glue` example [here](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/c172f54943c5b6d0c8a4a6bf1a85a02113c2f2a9/src/test/resources/glue/SimpleBulk.yaml#L4).
93
+
94
+
58
95
### Related resources
59
96
60
97
Related resources are resources that are not reconciled (not created, updated, or deleted) during reconciliation, but serve as an input for it.
0 commit comments