Repository navigation
Description
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/hydrateannotation constant. - Regenerated deepcopy code.
2. argocd-update (argocd_updater.go, argocd_revisions.go)
- Source matching:
getDesiredRevisions,findSourceUpdateandbuildDesiredSourcesshould treatdrySourceas the app's single source. Thensources[].repoURLmatches anddesiredRevisionmeans the dry commit SHA. - Spec patching:
updateTargetRevisionand Helm/Kustomize image updates must write tospec.sourceHydrator.drySource. TodaysyncApplicationonly patchesspec.source/spec.sources. - Triggering: set the
hydrateannotation 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.
- Wait until
currentOperation.drySHAequals the desired SHA and the phase isHydrated. Fail with Argo CD's message if it'sFailed. - Then sync, and compare
operationState.syncResult.revisionagainst the matchinghydratedSHA. TodaymustPerformUpdatecompares it with the dry SHA, which never matches.
- Wait until
- 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,drySHAnever advances; fall back tolastComparedDryRevision. - With
hydrateToset, Argo CD never moves the output into the sync branch, so either reject that case or expose the hydrated SHA andhydrateTobranch as step outputs so a later step can open the MR.
- A dry commit that doesn't change the rendered output produces no new hydrated commit. If hydration is skipped by
- Messages:
formatSyncMessageshould report thedrySourcetarget 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 andhydrator.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
kargo-governance-bot commentedon Dec 2, 2026
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.