GitOps
Gantry is GitOps-native. Your entire service catalog can be defined as YAML files, checked into Git, and synced bidirectionally between Gantry and a Git repository. This means your catalog is version-controlled, reviewable via pull requests, and reproducible.
There are two complementary approaches:
| Approach | Direction | How it works |
|---|---|---|
| GitOps Plugin | Bidirectional (push + pull) | Built-in plugin that syncs entity changes to/from a Git repository in real-time |
gantry apply CLI | One-way (push to Gantry) | CLI command that reads YAML files and creates/updates entities via the API |
GitOps Plugin
The GitOps plugin provides automatic bidirectional synchronization between your Gantry catalog and a Git repository. Entity changes made in the UI or API are pushed to Git, and changes made directly in Git (via pull requests) are pulled back into Gantry.
Setup
- Go to Plugins in the sidebar
- Find GitOps, open it, and configure the plugin:
| Setting | Required | Description |
|---|---|---|
| Repository URL | Yes | HTTPS Git URL (e.g., https://github.com/org/gantry-catalog.git) |
| Branch | No | Branch to sync with (default: main) |
| Personal Access Token | No | PAT for private repos (HTTPS auth) |
| Base Path | No | Subdirectory within the repo for entity files (default: repo root) |
| Auto-Push | No | Automatically push entity changes to remote (default: true) |
| Commit Author Name | No | Git commit author name (default: Gantry GitOps) |
| Commit Author Email | No | Git commit author email (default: gantry@localhost) |
| Pull Sync Interval | No | How often to auto-pull from Git (e.g., 5m, 1h). Leave empty for manual-only |
- Click Enable to activate the plugin
How It Works
Push (Gantry → Git)
When an entity is created, updated, or deleted through the Gantry UI or API:
- The change is queued in a 2-second debounce window
- All queued changes are batched into a single Git commit
- The commit is pushed to the remote repository (if auto-push is enabled)
This means rapid edits (e.g., bulk imports via gantry apply) result in a single commit rather than one per entity.