What is GitOps Mode
GitOps mode is an alternative to the default imperative Helm installation performed bydorgu cluster setup. Instead of running helm install commands directly against your cluster, GitOps mode scaffolds a complete, Git-ready ArgoCD directory structure that you commit to a repository and let ArgoCD reconcile.
GitOps vs Helm
The imperative Helm driver works well for quick setups and local development. GitOps mode solves the operational limitations that emerge at scale:| Problem (imperative Helm) | Solution (GitOps mode) |
|---|---|
| Chart upgrades require a new CLI release | Edit targetRevision in YAML and push |
| No audit trail for infrastructure changes | Full Git history with diffs, PRs, and approvals |
| No drift reconciliation | ArgoCD continuously reconciles desired vs actual state |
| Limited Helm customization | Full values/*.yaml files under your control |
GitOps mode does not install components directly. It only generates files. You need an ArgoCD instance on the target cluster to reconcile the scaffold. ArgoCD itself is included in the generated scaffold and can be bootstrapped manually.
Generated Directory Structure
Runningdorgu cluster setup --driver gitops produces the following layout:
argocd/root-app.yaml— The root ArgoCD Application that watches theclusters/<name>/apps/directoryclusters/<name>/apps/— One ArgoCD Application per blessed stack componentclusters/<name>/values/— Helm values files tailored to the cluster environment (from the ClusterPersona)
App-of-Apps Pattern
The scaffold uses ArgoCD’s App-of-Apps pattern. A single root application watches a directory of child applications, each pointing to an upstream Helm chart with local values overrides. Adding a new component is as simple as creating a new Application YAML in theapps/ directory and a corresponding values file. ArgoCD picks it up automatically on the next sync.
User Workflow
The end-to-end flow from scaffold to running infrastructure:Step-by-step
Update the root application with your repo URL
Edit Commit and push the change.
argocd/root-app.yaml and set the repoURL field to your Git repository URL:Bootstrap ArgoCD and apply the root application
If ArgoCD is not already running on your cluster, install it first:Then apply the root application:ArgoCD will discover all child applications in the
apps/ directory and begin syncing them.Day-2 Operations
Upgrading a component
To upgrade a blessed stack component (e.g., cert-manager from v1.14.0 to v1.15.0):-
Edit
clusters/<name>/apps/cert-manager.yamland updatetargetRevision: -
Optionally update
clusters/<name>/values/cert-manager.yamlif the new version introduces configuration changes. - Commit and push. ArgoCD detects the change and syncs the new version.
Adding a new component
- Create
clusters/<name>/apps/my-component.yamlwith an ArgoCD Application pointing to the Helm chart. - Create
clusters/<name>/values/my-component.yamlwith your Helm values. - Commit and push. The root application discovers the new child application automatically.
Multi-cluster support
The scaffold uses cluster-scoped directories (clusters/<name>/), making it straightforward to manage multiple clusters from a single repository:
apps/ directory. You can use separate ArgoCD instances per cluster or a single hub ArgoCD managing multiple clusters.
Key Design Decisions
Self-contained scaffold
The generated scaffold includes everything needed to bootstrap a cluster from scratch. There are no external dependencies on the Dorgu CLI after generation — the scaffold is pure ArgoCD YAML and Helm values.Flat layout
Each component gets a single Application YAML and a single values file. There is no deep nesting or abstraction layers. This makes it easy to understand, review in PRs, and debug when something goes wrong.Cluster-scoped directories
Infrastructure configuration is scoped per cluster rather than per environment. This allows clusters in the same environment to have different configurations (e.g., different node counts, storage classes, or cloud provider settings) while sharing the same repository.Next Steps
Cluster Onboarding
Full onboarding guide including the imperative Helm path.
Cluster Setup Command
All flags for dorgu cluster setup including —driver and —gitops-output.
Manifest Generation
How Dorgu analyzes applications and generates Kubernetes manifests.
Configuration
Layered configuration for controlling generated output.