Skip to content

ArgoCD Source Hydrator Support #8277

Backlog
Backlog

Description

@BWagenerGenerali

Pre-submission checklist

  • I have searched existing issues and confirmed this is not a duplicate.
  • I understand that submitting a feature request does not guarantee it will be implemented.

Proposed Feature

With the ArgoCD Source Hydrator recently having graduating to beta, the question arises when Kargo might support it.

The argocd-update and argocd-wait steps would have to be made "Source Hydrator"-aware.

Here's what the LLM has to say about that Today Kargo knows nothing about the source hydrator. On a hydrated Application, `argocd-update` fails as soon as you pass `sources`.

1. Argo CD types Kargo copies in (prerequisite)
pkg/controller/argocd/api/v1alpha1/application_types.go is a cut-down copy of Argo CD's types with only spec.source/sources. Kargo needs:

  • spec.sourceHydrator (drySource, syncSource, hydrateTo).
  • status.sourceHydrator (currentOperation{phase, drySHA, hydratedSHA, message}, lastSuccessfulOperation, lastComparedDryRevision).
  • The argocd.argoproj.io/hydrate annotation constant.
  • Regenerated deepcopy code.

2. argocd-update (argocd_updater.go, argocd_revisions.go)

  • Source matching: getDesiredRevisions, findSourceUpdate and buildDesiredSources should treat drySource as the app's single source. Then sources[].repoURL matches and desiredRevision means the dry commit SHA.
  • Spec patching: updateTargetRevision and Helm/Kustomize image updates must write to spec.sourceHydrator.drySource. Today syncApplication only patches spec.source/spec.sources.
  • Triggering: set the hydrate annotation alongside the existing hard-refresh annotation, because Kargo bypasses the Argo CD API, which would normally set it.
  • Waiting, which is the core change: this becomes two phases.
    1. Wait until currentOperation.drySHA equals the desired SHA and the phase is Hydrated. Fail with Argo CD's message if it's Failed.
    2. Then sync, and compare operationState.syncResult.revision against the matching hydratedSHA. Today mustPerformUpdate compares it with the dry SHA, which never matches.
  • Edge cases:
    • A dry commit that doesn't change the rendered output produces no new hydrated commit. If hydration is skipped by manifest-generate-paths, drySHA never advances; fall back to lastComparedDryRevision.
    • With hydrateTo set, Argo CD never moves the output into the sync branch, so either reject that case or expose the hydrated SHA and hydrateTo branch as step outputs so a later step can open the MR.
  • Messages: formatSyncMessage should report the drySource target revision.

3. Stage health check (pkg/health/checker/builtin/argocd.go)
stageHealthForAppSync compares status.sync.revision with the desired dry SHA. For hydrated apps it should check that lastSuccessfulOperation.drySHA equals the desired SHA and that sync.revision equals that operation's hydratedSHA. Map a Hydrating phase to Unknown or Progressing, and Failed to Unhealthy.

4. Controller event triggers
appHealthOrSyncStatusChanged in pkg/controller/stages/event_handlers.go only re-checks a Stage when an app's health or sync status changes. It must also fire on status.sourceHydrator changes, otherwise Stages only catch up on the periodic requeue.

5. argocd-wait (follow-up)
Add a hydration value to waitFor in argocd_waiter.go, plus the config schema argocd-wait-config.json, the generated stepconfig types and the UI's generated config schemas.

6. Docs and tests (follow-up)

  • Update the step reference docs and the Argo CD integration guide.
  • Add unit tests.
  • Add an e2e suite under hack/test/e2e/suites/. Its Argo CD install needs the commit server and hydrator.enabled.

Effect on your setup: with areas 1–4 done, your default-v2 ClusterPromotionTasks would work unchanged, because the repoURL and dry-SHA desiredRevision keep their meaning.

Effort: areas 1–4 are a medium-sized change touching roughly 6–8 files. It fits as an upstream contribution rather than a fork. I found no existing Kargo issue for it, so opening a proposal first would be worthwhile.

Motivation and Use Case

Enable using more of ArgoCD's features.

Alternatives Considered

No response

Activity

  1. added
    kind/enhancement
    kind/proposal
    on Dec 2, 2026
  2. added
    needs/area
    on Dec 2, 2026
  3. kargo-governance-bot commented on Dec 2, 2026

    @kargo-governance-bot

    Before Starting Work

    Thank you for opening this issue.

    Please do not start work on this issue, and please do not ask to be assigned to it, until a maintainer has triaged it and cleared it for contribution. This applies to bug reports too. A maintainer needs to confirm a bug, and usually reproduce it, before a fix is worth writing.

    An issue is cleared for contribution when none of the blocking labels remain on it. Pull requests that reference an issue that has not been cleared are automatically converted to drafts, which maintainers do not routinely review.

    Maintainers triage issues on a best-effort basis. See the Contributor Guide for details.

  4. added
    needs/priority
    on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementkind/proposalneeds/areaneeds/priority

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions