VirtualGitOps: AI-Native State Management
Seamlessly manage infrastructure state using HTTP Git protocols without the legacy overhead.
IaCConsole introduces VirtualGitOps, a paradigm shift that replaces traditional Git repositories for GitOps workflows (ArgoCD, Flux, Jenkins) with a dynamic, AI-native configuration engine.
The Core Insight: GitOps Without the Bloat
Traditional GitOps relies on Git as a state storage mechanism. However, deployment tools like ArgoCD and Flux only actually need three things: the current tree at HEAD, the ability to poll/watch for changes, and a diff between two states. They do not need 5 years of commit history.
Over time, configuration repositories bloat to 50GB+ with history that no one uses. Furthermore, treating configuration as flat text files in a .git folder is inherently “legacy” and sub-optimal for the AI era. AI agents need structured data, semantic diffs, and immediate context—not a git clone command.
VirtualGitOps solves this by acting as a “virtual” Git server. It speaks the standard Git Smart HTTP protocol perfectly, ensuring 100% backward compatibility with existing CI/CD tools, but stores the actual state dynamically in the IaCConsole Configuration Management Database (CMDB) rather than relying on .git objects.
Architecture
The system is built on three core layers to support both legacy deployment tools and modern AI agents simultaneously.
1. Git Protocol Support Layer
This is the boundary that makes everything backward-compatible. ArgoCD, Flux, and the git CLI will never know the difference.
- Dynamic Pack Building: The endpoints (
git-upload-packandgit-receive-pack) build pack files on-demand directly from database snapshots, not from stored git objects. - Shallow by Default: Clones are served efficiently without massive history transfers. Clients get exactly what they need: the current configuration state.
- Branch Routing: Git refs (e.g.,
refs/heads/production) map perfectly to IaCConsole Workspaces and Dimensions (tenant + environment).
2. Core Application Logic & Storage
- History Depth Capping: The system maintains only the necessary recent snapshots (e.g., the last 10 states) for rollback safety. Old snapshots are garbage-collected. No indefinite repository growth.
- Semantic Storage: Because state is stored as structured data (JSON/BSON) in the CMDB rather than text blobs, the engine can perform semantic diffs (e.g., “replicas changed from 2 to 4”) rather than raw text patches.
- Immutable Audit Trail: The audit log (who changed what) is kept separate from the object storage, providing compliance without inflating the Git state.
3. AI-Native Interface (MCP)
This is the new surface that traditional Git cannot provide. Instead of forcing AI agents to run git clone and parse text, IaCConsole exposes an MCP (Model Context Protocol) server. Agents can natively call structured tools like:
query_dimensions: Get structured desired state without pulling files.set_dimension: Apply configuration patches cleanly via API. This makes the system truly “AI-native”—agents interact via API tools, while legacy CI/CD interacts via Git protocols.
How to Use VirtualGitOps
For CI/CD and GitOps Tools (ArgoCD, Flux, Jenkins)
You can provide the VirtualGitOps URL directly to your deployment tools. They will pull the configuration exactly as if it were GitHub or GitLab, but the responses are generated on-the-fly.
Use the following format, replacing token with your actual IaCConsole API token and orgName with your organization name:
git clone https://your_api_token:your_api_token@api.iacconsole.com/v1/git/orgName
(Note: The token is used for both the username and password fields in the Basic Auth URL format).
Pulling Updates Locally
Because VirtualGitOps is stateless and generates a new, single-commit snapshot on every request (rather than maintaining a linear, incremental commit history), your local Git client will see each update as a divergent branch with no common ancestor.
To pull the latest changes from the CMDB without encountering a “divergent branches” or “refusing to merge unrelated histories” error, you must use the --force and --rebase flags:
git pull --force --rebase
This tells Git to discard your local history and perfectly sync your local branch to the newly generated snapshot from the server. This is a common and safe pattern for interacting with stateless virtual Git endpoints.
For AI Agents (MCP Protocol)
AI agents do not need to use Git. Connect them directly to the underlying CMDB via the MCP transport.
See the AI Integration via MCP guide for full details on leveraging the AI-native interface.