Skip to content

Commit

Permalink
drop the cli/ui support section, no longer makes sense
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
  • Loading branch information
crenshaw-dev committed Apr 3, 2024
1 parent 89da1e1 commit 15353bb
Showing 1 changed file with 0 additions and 81 deletions.
81 changes: 0 additions & 81 deletions docs/proposals/manifest-hydrator.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,87 +335,6 @@ message CommitManifestsResponse {
}
```

#### CLI/UI Support

It should be easy to enable manifest hydration via the CLI or the UI.

Consider the following app:

```yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: dev-west
spec:
sources:
- repoURL: https://github.com/argoproj/argocd-example-apps
helm:
valueFiles:
- $values/values-dev.yaml
- repoURL: https://github.com/argoproj/argocd-example-apps-values
targetRevision: main
path: environments/dev/west
ref: values
```
```bash
argocd app dev-west enable-hydrator --target-branch environments/prd --target-path west --primary-source-index 1
```

The `--primary-source-index 1` is necessary to make the Helm values repo the primary source of truth for the app, i.e. we will track that branch as the source of new dry commits for hydration.

The command will need to print the following instructions before actually making the change:

```text
To finish enabling manifest hydration, you will need to commit changes to git. In the meantime, auto-sync should be disabled.
This Application is managed by an ApplicationSet. If you have not configured the ApplicationSet to ignore the auto-sync setting, auto-sync may be re-enabled automatically.
Continue to disable auto-sync (we will re-enable it later)? [Y/n] Y
Waiting one second to make sure the change applied... success, auto-sync is disabled!
Before finalizing the change, please commit the following to the `.argocd-source` file in https://github.com/argoproj/argocd-example-apps-values under the `environments/dev/west` directory (if multiple apps use that directory, you can use `.argocd-source-dev-west`).
sources:
- ref: values
- helm:
valueFiles:
- $values/values-dev.yaml
These settings can no longer be managed in the Application CR and must instead be committed to git.
After committing the change, confirm to continue. If you choose to cancel, we will pause to re-enable auto-sync. [Y/n] Y
Updating the Application CR to use manifest hydration. The Application may appear unhealthy for a moment while the manifests are initially hydrated and pushed to the environments/dev branch...
The Application has been updated and is now synced to environments/dev. Waiting for the Application to become healthy...
The Application is healthy, and migration is complete!
```

The CLI should have a mode to do the git push bit on the user's behalf to avoid the interactive mode.

The final Application manifest should look like this:

```yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: dev-west
spec:
sourceHydrator:
drySource:
- repoURL: https://github.com/argoproj/argocd-example-apps
targetRevision: main
path: environments/dev/west
writeTo:
targetBranch: environments/dev
path: west
```
A similar user experience should be made available via the UI.
### Use cases

#### Use case 1:
Expand Down

0 comments on commit 15353bb

Please sign in to comment.