Skip to content

Commit 8f53372

Browse files
committed
Adding small section for externalRef in Resources (#558)
1 parent 1ca320d commit 8f53372

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

website/docs/docs/concepts/00-resource-group-definitions.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ The `spec` section of a ResourceGraphDefinition contains two main components:
4343
- Dependencies between resources
4444
- Conditions for inclusion
4545
- Readiness criteria
46+
- [External References](#resourcegraphdefinition-more-about-resources)
4647

4748
This structure translates to YAML as follows:
4849

@@ -170,3 +171,31 @@ spec:
170171
image: nginx:latest
171172
replicas: 3
172173
```
174+
175+
## ResourceGraphDefinition More about Resources
176+
177+
Users can specify more controls in resources in `.spec.resources[]`
178+
179+
```yaml
180+
spec:
181+
resources:
182+
- id:
183+
template || externalRef:
184+
readyWhen:
185+
includeWhen:
186+
```
187+
188+
Using `externalRef` An user can specify if the object is something that is created out-of-band and needs to be referenced in the RGD.
189+
An external reference could be specified like this:
190+
```
191+
resources:
192+
id: projectConfig
193+
externalRef:
194+
apiVersion: corp.platform.com/v1
195+
kind: Project
196+
metadata:
197+
name: default-project
198+
namespace: # optional, if empty uses instance namespace
199+
```
200+
201+
As part of the processing the Resource Graph, the instance reconciler waits for the `externalRef` object to be present and reads the object from the cluster as a node in the graph. Subsequent resources can use data from this node.

0 commit comments

Comments
 (0)