Add support for OCI registries as a hydration destination
Summary
Add support for OCI registries as a sourceHydrator.syncSource, allowing Argo CD to render manifests from a dry Git source, publish the hydrated manifests as an OCI artifact, and then sync the Application from that artifact.
Today, the Source Hydrator assumes that the hydrated output is stored in Git. The syncSource API is modeled around a Git branch:
sourceHydrator:
drySource:
repoURL: https://github.com/argoproj/argocd-example-apps.git
targetRevision: HEAD
path: guestbook
syncSource:
repoURL: https://github.com/example/hydrated-manifests.git
targetBranch: environments/prod
path: guestbookI would like to support OCI as an alternative hydrated output:
sourceHydrator:
drySource:
repoURL: https://github.com/argoproj/argocd-example-apps.git
targetRevision: HEAD
path: guestbook
syncSource:
repoURL: oci://myreg.io/myorg/argo-cd-example
targetRevision: 1.18.9
path: .In this case Argo CD would:
- Resolve and render the
drySourceas it does today. - Package the hydrated manifests as an OCI artifact.
- Push the artifact to
myreg.io/myorg/argo-cd-example:1.18.9. - Record the resulting OCI digest.
- Use the OCI artifact as the Application's sync source.
The intention is not to replace Git-backed hydration. OCI would be an additional output backend.
Motivation
For many environments, storing generated manifests in another Git branch is useful because it provides Git history and integrates naturally with pull-request-based promotion. However, Git is not always the desired storage or distribution mechanism for generated artifacts.
Argo CD already supports consuming OCI artifacts as regular Application sources. Extending the Source Hydrator to publish its generated output to OCI would allow the same OCI workflow to be used without requiring an external CI system to perform the hydration and push.
Some usecases:
- Artifact-oriented GitOps
- Content-addressed hydrated manifests
- Promotion without regenerating manifests
- Separate source and artifact storage
- Reduced generated Git content
Proposal
The Source Hydrator should support multiple hydrated-output backends, starting with the existing Git implementation and a new OCI implementation.
Source: argoproj/argo-cd