# gitops-bridge-dev/gitops-bridge architecture

> Architecture diagram of the GitHub repository gitops-bridge-dev/gitops-bridge, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gitops-bridge-dev/gitops-bridge
- Repository: https://github.com/gitops-bridge-dev/gitops-bridge

## Overview

##### Main Components

a) Infrastructure Layer:
- Multiple IaC Tools (Terraform, Pulumi, EKSCTL, CDK, etc.)
- Cloud Provider Resources (AWS EKS, Cloud Resources)
- Kubernetes Clusters (Hub and Spoke architectures)

b) GitOps Layer:
- ArgoCD/FluxCD Components
- Application Sets
- Git Repositories (Control Plane and Workload repos)

c) Bridge Components:
- Metadata Exchange Mechanism
- Configuration Storage
- Secret Management Systems

**┌─────────────────────────────────────────────┐**
- Git Repositories               │
- (Control Plane, Workloads, Configuration)  │
- ┘
- ↕
**┌─────────────────────────────────────────────┐**
- GitOps Control Plane              │
- (ArgoCD/FluxCD Components)           │
- ┘
- ↕
**┌─────────────────────────────────────────────┐**
- GitOps Bridge Layer              │
- (Metadata Exchange, Configuration)        │
- ┘
- ↕
**┌─────────────────────────────────────────────┐**
- Infrastructure Layer                │
- (IaC Tools, Cloud Resources, Clusters)    │
- ┘

##### Key Elements to Highlight

a) Multi-cluster Support:
- Hub-Spoke architecture
- Distributed cluster management
- Cluster creation patterns

b) Security Integration:
- AWS Secrets Manager
- External Secrets
- Private Git repositories
- IAM roles

c) Infrastructure Provisioning:
- Multiple IaC tool support
- Cloud resource creation
- Kubernetes cluster deployment

##### Specific Workflows

Following key processes:
**IaC → Metadata Generation → GitOps Bridge → Addon Configuration → Deployment**

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Git Repositories"
        GitControl["Control Plane Repository"]:::git
        GitWorkload["Workload Repository"]:::git
        GitConfig["Configuration Repository"]:::git
    end

    subgraph "GitOps Control Plane"
        ArgoCD["ArgoCD"]:::gitops
        click ArgoCD "https://github.com/gitops-bridge-dev/gitops-bridge/tree/main/argocd/"
        FluxCD["FluxCD"]:::gitops
        click FluxCD "https://github.com/gitops-bridge-dev/gitops-bridge/tree/main/fluxcd/"
        AppSets["Application Sets"]:::gitops
    end

    subgraph "GitOps Bridge Layer"
        MetadataExchange["Metadata Exchange"]:::bridge
        ConfigStore["Configuration Storage"]:::bridge
        SecretMgmt["Secret Management"]:::security
        click SecretMgmt "https://github.com/gitops-bridge-dev/gitops-bridge/tree/main/argocd/iac/terraform/examples/eks/aws-secrets-manager/"
    end

    subgraph "Infrastructure Layer"
        subgraph "IaC Tools"
            Terraform["Terraform"]:::iac
            click Terraform "https://github.com/gitops-bridge-dev/gitops-bridge/tree/main/argocd/iac/terraform/"
            Pulumi["Pulumi"]:::iac
            click Pulumi "https://github.com/gitops-bridge-dev/gitops-bridge/tree/main/argocd/iac/pulumi/"
            EKSCTL["EKSCTL"]:::iac
            click EKSCTL "https://github.com/gitops-bridge-dev/gitops-bridge/tree/main/argocd/iac/eksctl/"
            CDK["CDK"]:::iac
            click CDK "https://github.com/gitops-bridge-dev/gitops-bridge/tree/main/argocd/iac/cdk/"
        end

        subgraph "Cluster Architecture"
            HubSpoke["Hub-Spoke Clusters"]:::infra
            click HubSpoke "https://github.com/gitops-bridge-dev/gitops-bridge/tree/main/argocd/iac/terraform/examples/eks/multi-cluster/hub-spoke/"
            Distributed["Distributed Clusters"]:::infra
            click Distributed "https://github.com/gitops-bridge-dev/gitops-bridge/tree/main/argocd/iac/terraform/examples/eks/multi-cluster/distributed/"
        end

        subgraph "Add-ons"
            Karpenter["Karpenter"]:::addon
            click Karpenter "https://github.com/gitops-bridge-dev/gitops-bridge/tree/main/argocd/iac/terraform/examples/eks/karpenter/"
            ArgoWorkflows["Argo Workflows"]:::addon
            click ArgoWorkflows "https://github.com/gitops-bridge-dev/gitops-bridge/tree/main/argocd/iac/terraform/examples/eks/argo-workflows/"
            ArgoIngress["ArgoCD Ingress"]:::addon
            click ArgoIngress "https://github.com/gitops-bridge-dev/gitops-bridge/tree/main/argocd/iac/terraform/examples/eks/argocd-ingress/"
        end
    end

    %% Connections
    GitControl --> ArgoCD
    GitControl --> FluxCD
    GitWorkload --> AppSets
    GitConfig --> ConfigStore

    ArgoCD --> MetadataExchange
    FluxCD --> MetadataExchange
    AppSets --> MetadataExchange

    MetadataExchange --> Terraform
    MetadataExchange --> Pulumi
    MetadataExchange --> EKSCTL
    MetadataExchange --> CDK

    SecretMgmt -.-> HubSpoke
    SecretMgmt -.-> Distributed

    HubSpoke --> Karpenter
    HubSpoke --> ArgoWorkflows
    HubSpoke --> ArgoIngress

    %% Styles
    classDef git fill:#2962FF,stroke:#1565C0,color:white
    classDef gitops fill:#4CAF50,stroke:#388E3C,color:white
    classDef bridge fill:#FFC107,stroke:#FFA000,color:black
    classDef iac fill:#9E9E9E,stroke:#757575,color:white
    classDef infra fill:#607D8B,stroke:#455A64,color:white
    classDef security fill:#F44336,stroke:#D32F2F,color:white
    classDef addon fill:#795548,stroke:#5D4037,color:white

    %% Legend
    subgraph Legend
        L1["Git Components"]:::git
        L2["GitOps Tools"]:::gitops
        L3["Bridge Components"]:::bridge
        L4["IaC Tools"]:::iac
        L5["Infrastructure"]:::infra
        L6["Security"]:::security
        L7["Add-ons"]:::addon
    end
```
