Hamburger Cross Icon
ArgoCD Deployment Tracking Collector - Lunar Collector

ArgoCD Deployment Tracking Collector

Collector Experimental Ci CdOrchestration

Runs on a central GitOps repo, correlates each ArgoCD Application to the service that builds its image, and pushes that service's deployment posture onto its own component out-of-band. Post-merge only (cannot gate PRs). Do not also run argocd-deployment-gate on the same service.

Add argocd-deployment-tracking to your lunar-config.yml:
uses: github://earthly/lunar-lib/collectors/argocd-deployment-tracking@v1.0.5

What This Integration Collects

This integration includes 1 collector that gather metadata from your systems.

Collector code

tracking

Correlates each ArgoCD Application back to the source-code component it deploys (annotation -> image -> tag -> repoURL, first match wins), then writes that application's deployment posture onto the source component's Component JSON using the out-of-band collect syntax (lunar collect --component --sha ). Applications that can't be resolved are skipped with a logged reason — no bogus cross-component writes. Only ever lands on the source's default-branch HEAD, so it is a post-merge system of record and cannot gate PRs.

argocd gitops cross-component out-of-band collect deployment posture correlation continuous delivery
Book a demo

How Collectors Fit into Lunar

Lunar watches your code and CI/CD systems to collect SDLC data from config files, test results, IaC, deployment configurations, security scans, and more.

Collectors are the automatic data-gathering layer. They extract structured metadata from your repositories and pipelines, feeding it into Lunar's centralized database where guardrails evaluate it to enforce your engineering standards.

Learn How Lunar Works
1
Collectors Gather Data This Integration
Triggered by code changes or CI pipelines, collectors extract metadata from config files, tool outputs, test results, and scans
2
{ } Centralized as JSON
All data merged into each component's unified metadata document
3
Guardrails Enforce Standards
Real-time feedback in PRs and AI workflows

Example Collected Data

This collector writes structured metadata to the Component JSON. Here's an example of the data it produces:

{ } component.json Component JSON
{
  "cd": {
    "gitops": {
      "source": {
        "tool": "argocd",
        "integration": "external"
      },
      "linked_from": "github.com/org/gitops",
      "applications": [
        {
          "name": "payment-api",
          "path": "apps/payment-api.yaml",
          "valid": true,
          "kind": "Application",
          "project": "platform",
          "sync_policy": {
            "automated": true,
            "prune": true,
            "self_heal": true
          },
          "destination": {
            "server": "https://kubernetes.default.svc",
            "namespace": "payments"
          },
          "source_ref": {
            "repoURL": "https://github.com/org/gitops.git",
            "path": "payment-api",
            "targetRevision": "HEAD"
          },
          "images": ["myregistry.io/payment-api"]
        }
      ]
    }
  }
}

Configuration

Configure this collector in your lunar-config.yml.

Inputs

Input Required Default Description
find_command Optional find . -type f \( -name '*.yaml' -o -name '*.yml' \) Command to find candidate YAML files (must output one file path per line).
correlate_by Optional annotation,image,repoURL Ordered, comma-separated correlation strategies (first match wins). Options annotation, image, tag, repoURL.
component_annotation Optional lunar.earthly.dev/component Application annotation key that carries the source component id, for the annotation correlation strategy.
image_registry_aliases Required Comma-separated old=new registry-host aliases used to normalize image references for the image correlation strategy. Empty disables normalization.
tag_key Required Component meta/tag field that maps a component to its ArgoCD app name, for the tag correlation strategy.

Documentation

View on GitHub

ArgoCD Deployment Tracking Collector

Pushes each ArgoCD Application's deployment posture from a central GitOps repo onto the service component it deploys, out-of-band.

Overview

Experimental. Runs on the repo that holds the ArgoCD files (a central GitOps repo), correlates each Application to the service component that builds its image (annotation, then image-match, then repoURL), and writes that app's deployment posture onto that service's Component JSON out-of-band, so the gitops/argocd policies evaluate on the service even though the ArgoCD config lives elsewhere. The write lands on the service's default-branch HEAD, so it only describes post-merge main and cannot gate PRs; use it for correlation and dashboards. Do not also run argocd-deployment-gate on the same service: both write .cd.gitops.applications and the hub appends across records, so pick one path per service.

Collected Data

This collector writes to the following Component JSON paths on each resolved service component (out-of-band):

Path Type Description
.cd.gitops.applications[] array The Application(s) that deploy this service, copied from the GitOps repo
.cd.gitops.source object {tool: argocd, integration: external}
.cd.gitops.linked_from string The GitOps component the posture was pushed from

Installation

Add to the GitOps repo's lunar-config.yml:

collectors:
  - uses: github://earthly/lunar-lib/collectors/argocd-deployment-tracking@v1.0.0
    on: ["domain:your-gitops-repo"]
    # with:
    #   correlate_by: "annotation,image,repoURL"

Open Source

This collector is open source and available on GitHub. Contribute improvements, report issues, or fork it for your own use.

View Repository

Ready to Automate Your Standards?

See how Lunar can turn your AGENTS.md, engineering wiki, compliance docs, or postmortem action items into automated guardrails with our 200+ built-in guardrails.

Works with any process
check AI agent rules & prompt files
check Post-mortem action items
check Security & compliance policies
check Testing & quality requirements
Automate Now
Paste your AGENTS.md or manual process doc and get guardrails in minutes
Book a Demo