Skip to content

Commit b756225

Browse files
authored
Update reference.md
1 parent ab7d40f commit b756225

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/reference.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ At the moment there are two types of built-in conditions provided:
6262
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.
6363
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
6464
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+
Naturally, only one kind of resource is allowed in the generated resource list.
6566

6667
In the following sample, the number of created `ConfigMaps` is based on the `replicas` value from the `.spec` of the custom resource:
6768

@@ -76,10 +77,10 @@ spec:
7677
kind: TestCustomResource
7778
childResources:
7879
- name: configMaps
79-
bulk: true
80-
resourceTemplate: |
81-
items:
82-
{#for i in parent.spec.replicas}
80+
bulk: true # set bulk flag to true
81+
resourceTemplate: | # only resourceTemplate allowed
82+
items: # items wraps the templated resources
83+
{#for i in parent.spec.replicas} # use parent spec to template all the resources
8384
- apiVersion: v1
8485
kind: ConfigMap
8586
metadata:

0 commit comments

Comments
 (0)