Skip to content

Commit

Permalink
Odigos alogside argocd (#1694)
Browse files Browse the repository at this point in the history
Co-authored-by: Tamir David <tamirdavid@Tamirs-MacBook-Pro.local>
  • Loading branch information
tamirdavid1 and Tamir David authored Nov 6, 2024
1 parent 4b63a3d commit 83143ad
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"pages": [
{
"group": "Installation",
"pages": ["setup/installation", "setup/installation-options", "setup/docker-registry"]
"pages": ["setup/installation", "setup/installation-options", "setup/docker-registry", "setup/odigos-with-argocd"]
},
"setup/upgrade",
"setup/uninstall"
Expand Down
31 changes: 31 additions & 0 deletions docs/setup/odigos-with-argocd.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: "Configure Odigos with Argo CD"
sidebarTitle: "Odigos with Argo CD"
---

This guide explains how to configure Argo CD to work seamlessly with Odigos by preserving the custom labels, annotations, and other fields that Odigos injects into workloads. By utilizing the ignoreDifferences setting in Argo CD, you can prevent these Odigos-specific fields from being overwritten during synchronization.

## Setting up `ignoreDifferences` at the System Level

To configure Argo CD to ignore specific differences at a **system-wide level**, follow the [Argo CD documentation](https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#system-level-configuration) on configuring `ignoreDifferences`. This approach ensures that fields injected by Odigos will not be removed or modified during Argo CD sync operations.

### Configuration Example

In your Argo CD configuration, add the following entries under `resource.customizations.ignoreDifferences.all` in the `data` section:

```yaml
data:
resource.customizations.ignoreDifferences.all: |
jqPathExpressions:
- .metadata.labels."odigos-instrumentation"
- .metadata.annotations | select(has("odigos.io"))
- .spec.template.metadata.labels | select(has("odigos.io"))
- .spec.template.spec.containers[].resources.limits | select(keys[] | startswith("instrumentation.odigos.io"))
```
These paths specify fields added by Odigos that you want Argo CD to ignore during synchronization.
Refer to the [Argo CD documentation on diffing](https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/) for further guidance on configuring `ignoreDifferences`.

By setting up `ignoreDifferences` in this way, Argo CD will avoid syncing the fields injected by Odigos, allowing the instrumentation to function without interference.

0 comments on commit 83143ad

Please sign in to comment.