GitOps Cluster Consolidation & Version Control Roadmap
This roadmap outlines the strategic phased approach for consolidating disparate, tag-drifted, or unmanaged GitOps clusters (environments) back into a fully version-controlled lifecycle managed off of a single main branch with tagging.
Objective
To eliminate repository drift, simplify environment configuration, and establish a clear promotion path by:
- Baselining all clusters onto a single trunk (
main) with no active tags or branches. - Cleaning up all unused/stale git branches and tags.
- Separating testing environments onto a dedicated long-lived
Testingbranch. - Pinning all remaining environments (production, shared services) to a new, immutable release tag (
v2.0).
High-Level Flowchart
flowchart TD
%% Current State
subgraph Current [Current State: Drift & Disparate Mapping]
C_Prod[Prod Clusters / Tags/Branches]
C_Test[Test Clusters / Diverse Tags]
C_Unmanaged[Unmanaged Clusters / No Sync]
end
%% Phase 1
subgraph Phase1 [Phase 1: Trunk Consolidation]
Main_Branch[(Git Repo: main branch)]
P1_Sync[Point ALL Cluster GitOps/ResourceSync to main branch]
P1_Clean[Prune all stale tags & inactive branches]
end
%% Phase 2
subgraph Phase2 [Phase 2: Testing Separation]
Test_Branch[(Git Repo: Testing branch)]
P2_Sync[Point Test Clusters to 'Testing' branch]
end
%% Phase 3
subgraph Phase3 [Phase 3: Version Stabilization]
V2_Tag[(Git Tag: v2.0)]
P3_Sync[Point Production & Other Clusters to 'v2.0' tag]
end
%% Transitions
Current -->|Align and Point to main| P1_Sync
P1_Sync -->|Prune old Git refs| P1_Clean
P1_Clean -->|Create 'Testing' from main| Test_Branch
Test_Branch -->|Configure Sync| P2_Sync
P1_Clean -->|Tag main as v2.0| V2_Tag
V2_Tag -->|Configure Sync| P3_Sync
%% Styling
style Current fill:#fdd,stroke:#f66,stroke-width:2px;
style Phase1 fill:#ffd,stroke:#dd6,stroke-width:2px;
style Phase2 fill:#dfd,stroke:#6b6,stroke-width:2px;
style Phase3 fill:#ddf,stroke:#66b,stroke-width:2px;Phased Consolidation Plan
Phase 1: Trunk Consolidation (Stabilization Baseline)
Goal: Consolidate all GitOps controllers/ResourceSync configurations to point strictly to the main branch with zero tag/revision overrides.
- Map and Align Configurations:
- Update all cluster GitOps configs (e.g., Komodo
[[resource_sync]]target revisions or ArgoCD target revisions) to use themainbranch. - Ensure all cluster-specific directories (e.g.,
komodo/prod/,komodo/test/,komodo/dev/) are unified onmain.
- Update all cluster GitOps configs (e.g., Komodo
- Reconcile and Validate:
- Allow GitOps controllers to reconcile. Confirm that all clusters are running stable configurations served purely from
main.
- Allow GitOps controllers to reconcile. Confirm that all clusters are running stable configurations served purely from
- Repository Pruning:
- Delete all unused, stale, and tracking branches.
- Purge old tags from the remote git origin to prevent metadata clutter and reference confusion.
Phase 2: Testing Isolation
Goal: Branch out the testing clusters to a dedicated, long-lived branch to isolate validation work from main production configurations.
- Branch Creation:
- Branch
Testingdirectly from the cleaned and verifiedmainbranch.
- Branch
- Target Re-pointing:
- Modify the GitOps sync configurations of your Test Clusters to track the
Testingbranch instead ofmain.
- Modify the GitOps sync configurations of your Test Clusters to track the
- Promotion Workflow Baseline:
- Features/workloads are committed to
main(or individual feature branches), validated, merged tomain, and then merged frommaintoTestingfor soak tests.
- Features/workloads are committed to
Phase 3: Release Pinning (v2.0 Tag)
Goal: Establish release stability by pinning production and all non-test clusters to an immutable point-in-time release.
- Tag Generation:
- Tag the stable
mainbranch with the new version tag:v2.0.
- Tag the stable
- Target Re-pointing:
- Update the GitOps sync configurations for all remaining clusters (e.g., Production, Shared Core Services) to target
refs/tags/v2.0.
- Update the GitOps sync configurations for all remaining clusters (e.g., Production, Shared Core Services) to target
- Establish Lifecycle Operations:
- All subsequent production updates are promoted from
Testingback tomain, and then promoted to production by updating/moving the target tag (e.g.,v2.1,v2.2) or updating the tag pointer.
- All subsequent production updates are promoted from
Key Benefits
- Clean Git Slate: Drastically reduces active git refs, making branch history easy to read and manage.
- Predictable Promotion: Features move from
main$\rightarrow$Testingbranch $\rightarrow$v2.0tag. - Auditability: Clear division of what is being tested versus what is running in production based purely on git references.
Long-Term Management
To ensure continuous operational stability and transparency, clusters are categorized by environment type and mapped to specific Git target references, utilizing a flat repository structure for environment settings.
Cluster Target References
Different environments track different Git references depending on their operational requirements and strictness levels:
Test Clusters:
- Target Reference:
Testingbranch. - Usage: Serves as the immediate validation target for developers and GitOps sync, ensuring new features and configurations are continuously integrated and tested.
- Target Reference:
Pre-Production and Normal Production Clusters:
- Target Reference:
Mainbranch. - Usage: Serves as the primary stable branch. Pre-production acts as the final validation gate, while normal production tracks the main trunk directly for rapid, reliable delivery of verified features.
- Target Reference:
Strictly Managed Clusters:
- Target Reference: Tagged releases (e.g.,
v2.x). - Usage: Pin to immutable release tags to guarantee absolute control over rollout schedules and facilitate rigorous change management.
- Target Reference: Tagged releases (e.g.,
Flat Repository Structure
Instead of deep hierarchies or branching drift for configuration variants, the repository is organized with a flat directory structure at its root or specific config directory (e.g., komodo/ or gitops/).
For each environment, a dedicated, self-contained subdirectory contains all specific configurations and override settings:
This flat design guarantees that:
- High Visibility: All environment-specific settings are completely visible in their respective subdirectories.
- No Hidden Overrides: Eliminates nested inheritance or complex drift, making configurations easy to audit, compare, and modify.
- Declarative Consistency: All target references can read from the same commit or release tag while cleanly resolving environment-specific configurations via their designated subdirectory.