# smana/cloud-native-ref architecture

> Architecture diagram of the GitHub repository smana/cloud-native-ref, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/smana/cloud-native-ref
- Repository: https://github.com/smana/cloud-native-ref

## Overview

##### Main Components

a. Core Infrastructure Layer:
- AWS EKS (Kubernetes) cluster as the foundation
- Network infrastructure (VPC, Subnets, VPN via Tailscale)
- OpenBao cluster for secrets management
- Storage components (S3 buckets)

b. Platform Services Layer:
- Flux GitOps engine
- Crossplane for infrastructure provisioning
- Harbor registry
- Gateway API for ingress
- Cilium for networking and security

c. Observability Stack:
- VictoriaMetrics for metrics
- Grafana for visualization
- Vector for log collection
- Grafana OnCall for alerting

d. Security Layer:
- Cert-manager for certificate management
- External Secrets Operator
- ZITADEL for identity management
- Kyverno for policy management

**┌─ Cloud Provider (AWS) ──────────────────────────────────────┐**

- ┌─ Infrastructure Layer ─────────────────────────┐         │

- EKS Cluster                                   │         │
- Network (VPC/Subnets)                         │         │
- OpenBao Cluster                               │         │

- ┘         │

- ┌─ Platform Services ──────────────────────────┐           │

- Flux         Crossplane      Harbor         │           │
- Gateway API  Cilium          CloudNative PG │           │

- ┘           │

- ┌─ Observability ─────────────┐  ┌─ Security ───────────┐ │

- VictoriaMetrics  Grafana   │  │  Cert-manager        │ │
- Vector           OnCall    │  │  External Secrets    │ │
- ZITADEL             │ │
- ┘  └───────────────────────┘ │

- ┘

##### Key Relationships to Highlight

- Flux's GitOps control flow
- Crossplane's infrastructure provisioning flow
- Security components' interactions
- Observability data flow
- Network connectivity paths

##### Metadata

- A title: "Cloud Native Platform Architecture"
- A version number
- External dependencies

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph AWS["AWS Cloud Provider"]
        subgraph InfraLayer["Infrastructure Layer"]
            EKS["AWS EKS Cluster"]:::infra
            Network["Network Infrastructure"]:::infra
            OpenBao["OpenBao Cluster"]:::infra
            S3["S3 Storage"]:::infra
        end

        subgraph PlatformServices["Platform Services Layer"]
            Flux["Flux GitOps"]:::platform
            Crossplane["Crossplane"]:::platform
            Harbor["Harbor Registry"]:::platform
            Gateway["Gateway API"]:::platform
            Cilium["Cilium"]:::platform
        end

        subgraph ObsStack["Observability Stack"]
            Victoria["VictoriaMetrics"]:::obs
            Grafana["Grafana"]:::obs
            Vector["Vector"]:::obs
            OnCall["Grafana OnCall"]:::obs
        end

        subgraph SecLayer["Security Layer"]
            CertMgr["Cert-manager"]:::security
            ExtSecrets["External Secrets"]:::security
            Zitadel["ZITADEL"]:::security
            Kyverno["Kyverno"]:::security
        end
    end

    %% Relationships
    EKS --> Flux
    Flux --> Crossplane
    Flux --> Harbor
    Flux --> Gateway
    Flux --> Cilium
    
    Vector --> Victoria
    Victoria --> Grafana
    Grafana --> OnCall
    
    CertMgr --> Gateway
    ExtSecrets --> OpenBao
    Zitadel --> Gateway
    Kyverno --> EKS

    %% Styling
    classDef infra fill:#2374ab
    classDef platform fill:#2a9d8f
    classDef obs fill:#8338ec
    classDef security fill:#e63946

    %% Click Events
    click EKS "https://github.com/Smana/cloud-native-ref/tree/main/opentofu/eks/"
    click Network "https://github.com/Smana/cloud-native-ref/tree/main/opentofu/network/"
    click OpenBao "https://github.com/Smana/cloud-native-ref/tree/main/opentofu/openbao/cluster/"
    click Flux "https://github.com/Smana/cloud-native-ref/tree/main/flux/"
    click Crossplane "https://github.com/Smana/cloud-native-ref/tree/main/infrastructure/base/crossplane/"
    click Harbor "https://github.com/Smana/cloud-native-ref/tree/main/tooling/base/harbor/"
    click Gateway "https://github.com/Smana/cloud-native-ref/tree/main/infrastructure/base/gapi/"
    click Cilium "https://github.com/Smana/cloud-native-ref/tree/main/infrastructure/base/cilium/"
    click Victoria "https://github.com/Smana/cloud-native-ref/tree/main/observability/base/victoria-metrics-k8s-stack/"
    click Grafana "https://github.com/Smana/cloud-native-ref/tree/main/observability/base/grafana-operator/"
    click Vector "https://github.com/Smana/cloud-native-ref/tree/main/observability/base/vector-agent/"
    click OnCall "https://github.com/Smana/cloud-native-ref/tree/main/observability/base/grafana-oncall/"
    click CertMgr "https://github.com/Smana/cloud-native-ref/tree/main/security/base/cert-manager/"
    click ExtSecrets "https://github.com/Smana/cloud-native-ref/tree/main/security/base/external-secrets/"
    click Zitadel "https://github.com/Smana/cloud-native-ref/tree/main/security/base/zitadel/"
    click Kyverno "https://github.com/Smana/cloud-native-ref/tree/main/security/base/kyverno/"
```
