Skip to content

Commit 3b1b347

Browse files
authored
docs: Update FAQ with instructions for using KRO with ArgoCD (#651)
* docs: Update FAQ to include instructions for using KRO resources with ArgoCD * docs: Add architecture diagram for ArgoCD resource tracking in FAQ * Updates with ownerRef * Move argoCD sync image to static * update ref to the ArgoCD tracking image * Update faq.md with path to image
1 parent c1bc05c commit 3b1b347

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

website/docs/docs/faq.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,39 @@ sidebar_position: 100
5959
resource dependency management and customization, paving the way for a simple
6060
and scalable way to create complex custom resources for Kubernetes.
6161

62-
5. **Can I use this in production?**
62+
5. **How do I use KRO resources with ArgoCD?**
63+
64+
To use KRO resources with ArgoCD, you need to add a specific tracking annotation
65+
to all templated resources in your ResourceGraphDefinition.
66+
67+
The following code needs to be added to each templated resource:
68+
69+
```yaml
70+
metadata:
71+
ownerReferences:
72+
- apiVersion: kro.run/v1alpha1
73+
kind: ${schema.kind}
74+
name: ${schema.metadata.name}
75+
uid: ${schema.metadata.uid}
76+
blockOwnerDeletion: true
77+
controller: false
78+
annotations:
79+
argocd.argoproj.io/tracking-id: ${schema.metadata.?annotations["argocd.argoproj.io/tracking-id"]}
80+
```
81+
82+
This annotation allows ArgoCD to properly track and manage the resources
83+
created by KRO instances.
84+
85+
86+
![ArgoCD RGD tracked Instance](../../static/img/KRO-ArgoCD-Tracking.png)
87+
88+
Note that the example shown above depicts ArgoCD's default resource tracking
89+
via annotations. You may choose to use `annotation+label` or just `label` and
90+
if so the example has to be modified to support your configuration.
91+
For more detailed information about ArgoCD resource tracking, please see the
92+
[ArgoCD documentation](https://argo-cd.readthedocs.io/en/stable/user-guide/resource_tracking/).
93+
94+
6. **Can I use this in production?**
6395

6496
This project is in active development and not yet intended for production
6597
use. The _ResourceGraphDefinition_ CRD and other APIs used in this project are not
226 KB
Loading

0 commit comments

Comments
 (0)