Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
9323d25
fix(hydrator): Add Kustomize, Directory, Plugin field to DrySource
sangyeong01 Sep 13, 2025
f65d5cc
fix(commitserver): Prevent empty path error in manifest writer
sangyeong01 Sep 13, 2025
07bb626
fix(ci): Use server-side apply for E2E tests
sangyeong01 Sep 13, 2025
a19368c
chore(hydrator): Apply Go linter formatting
sangyeong01 Sep 13, 2025
1b174da
test(hydrator): add e2e test data for directory, helm, kustomize, and…
sangyeong01 Sep 13, 2025
b368bca
chore(test): fix lint issues in hydrator_test
sangyeong01 Sep 13, 2025
46611a5
test(e2e): remove --dry-source-path flag
sangyeong01 Sep 14, 2025
222edc8
test(e2e): solve invalid cmp server name
sangyeong01 Sep 15, 2025
cb46cf7
test(e2e): add exec.Command to start CMP server with env vars
sangyeong01 Sep 16, 2025
e0cdc85
chore(e2e): restore removed comments
sangyeong01 Sep 16, 2025
158259c
docs(hydrator): add source configuration options section
sangyeong01 Sep 16, 2025
c920984
refactor(commitserver): remove unnecessary path trimming
sangyeong01 Sep 22, 2025
37a476f
test(e2e): use exec.CommandContext to comply with noctx linter
sangyeong01 Nov 10, 2025
c452513
test(e2e): add inline parameter tests for hydrator source fields
sangyeong01 Dec 2, 2025
607f7a0
docs: add sourceHydrator section to application.yaml
sangyeong01 Dec 2, 2025
2829c93
test(e2e): fix hydrator inline parameter tests
sangyeong01 Dec 4, 2025
98d2266
test(e2e): fix plugin env variable prefix and mixed sources Wait
sangyeong01 Dec 4, 2025
68c1827
test(e2e): remove TestHydratorWithMixedSources
sangyeong01 Dec 4, 2025
143a425
fix: SourceHydrator.DeepEquals
crenshaw-dev Dec 5, 2025
c2d51c7
Merge pull request #1 from crenshaw-dev/feat/hydrator-helm-support
sangyeong01 Dec 5, 2025
4a46258
test: fix assert.Equal argument order in SourceHydrator DeepEquals test
sangyeong01 Dec 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ start-e2e-local: mod-vendor-local dep-ui-local cli-local
kubectl create ns argocd-e2e-external || true
kubectl create ns argocd-e2e-external-2 || true
kubectl config set-context --current --namespace=argocd-e2e
kustomize build test/manifests/base | kubectl apply -f -
kustomize build test/manifests/base | kubectl apply --server-side -f -
kubectl apply -f https://raw.githubusercontent.com/open-cluster-management/api/a6845f2ebcb186ec26b832f60c988537a58f3859/cluster/v1alpha1/0000_04_clusters.open-cluster-management.io_placementdecisions.crd.yaml
# Create GPG keys and source directories
if test -d /tmp/argo-e2e/app/config/gpg; then rm -rf /tmp/argo-e2e/app/config/gpg/*; fi
Expand Down
12 changes: 12 additions & 0 deletions assets/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions controller/hydrator/hydrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,10 @@ func (h *Hydrator) getManifests(ctx context.Context, app *appv1.Application, tar
RepoURL: app.Spec.SourceHydrator.DrySource.RepoURL,
Path: app.Spec.SourceHydrator.DrySource.Path,
TargetRevision: app.Spec.SourceHydrator.DrySource.TargetRevision,
Helm: app.Spec.SourceHydrator.DrySource.Helm,
Kustomize: app.Spec.SourceHydrator.DrySource.Kustomize,
Directory: app.Spec.SourceHydrator.DrySource.Directory,
Plugin: app.Spec.SourceHydrator.DrySource.Plugin,
}
if targetRevision == "" {
targetRevision = app.Spec.SourceHydrator.DrySource.TargetRevision
Expand Down
14 changes: 14 additions & 0 deletions docs/operator-manual/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,3 +283,17 @@ spec:
# circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the
# space used to store the history, so we do not recommend increasing it.
revisionHistoryLimit: 10

# sourceHydrator enables manifest hydration from a dry source to a sync source branch.
# The drySource.helm, drySource.kustomize, drySource.directory, and drySource.plugin fields
# are available and follow the same spec as the source field above.
sourceHydrator:
drySource:
repoURL: https://github.com/argoproj/argocd-example-apps.git
targetRevision: HEAD
path: guestbook
# helm, kustomize, directory, and plugin fields are available here.
# See the source.helm, source.kustomize, source.directory, and source.plugin sections above for details.
syncSource:
targetBranch: env/prod
path: guestbook-hydrated
106 changes: 106 additions & 0 deletions docs/user-guide/source-hydrator.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,112 @@ It is important to note that hydration only cleans the currently configured appl
If there are multiple repository-write Secrets available for a repo, the source hydrator will non-deterministically
select one of the matching Secrets and log a warning saying "Found multiple credentials for repoURL".

## Source Configuration Options

The source hydrator supports various source types through inline configuration options in the `drySource` field. This allows you to use Helm charts, Kustomize applications, directories, and plugins with environment-specific configurations.

### Helm Charts

You can use Helm charts by specifying the `helm` field in the `drySource`:

```yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-helm-app
spec:
sourceHydrator:
drySource:
repoURL: https://github.com/argoproj/argocd-example-apps
path: helm-guestbook
targetRevision: HEAD
helm:
valueFiles:
- values-prod.yaml
parameters:
- name: image.tag
value: v1.2.3
releaseName: my-release
syncSource:
targetBranch: environments/prod
path: helm-guestbook-hydrated
```

### Kustomize Applications

For Kustomize applications, use the `kustomize` field:

```yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-kustomize-app
spec:
sourceHydrator:
drySource:
repoURL: https://github.com/argoproj/argocd-example-apps
path: kustomize-guestbook
targetRevision: HEAD
kustomize:
namePrefix: prod-
nameSuffix: -v1
images:
- gcr.io/heptio-images/ks-guestbook-demo:0.2
syncSource:
targetBranch: environments/prod
path: kustomize-guestbook-hydrated
```

### Directory Applications

For plain directory applications with specific options, use the `directory` field:

```yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-directory-app
spec:
sourceHydrator:
drySource:
repoURL: https://github.com/argoproj/argocd-example-apps
path: guestbook
targetRevision: HEAD
directory:
recurse: true
syncSource:
targetBranch: environments/prod
path: guestbook-hydrated
```

### Config Management Plugins

You can also use Config Management Plugins by specifying the `plugin` field:

```yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-plugin-app
spec:
sourceHydrator:
drySource:
repoURL: https://github.com/argoproj/argocd-example-apps
path: my-plugin-app
targetRevision: HEAD
plugin:
name: my-custom-plugin
env:
- name: ENV_VAR
value: prod
syncSource:
targetBranch: environments/prod
path: my-plugin-app-hydrated
```

!!! note "Feature Parity"
The source hydrator supports the same configuration options as the regular Application source field. You can use any combination of these source types with their respective configuration options to match your application's needs.

## Pushing to a "Staging" Branch

The source hydrator can be used to push hydrated manifests to a "staging" branch instead of the `syncSource` branch.
Expand Down
Loading
Loading