How kubescape/synchronizer works
Main Components
a) Client-Side Components:
• Synchronizer Clients (Multiple instances)
• ETCD Clusters (Data source for each client)
• Client Adapters Layer
• In-cluster adapter (for kubernetes resources)
• HTTP endpoint adapter
• Backend adapter
b) Server-Side Components:
• Synchronizer Server
• Apache Pulsar (Message broker)
• Event Ingester
• Database
• Authentication Service
Key Architectural Patterns to Highlight
• Event-Driven Architecture
• Adapter Pattern (visible in the adapters/ directory)
• Publisher-Subscriber Pattern (using Pulsar)
• Domain-Driven Design (evident from the domain/ directory structure)
Top Layer: Client Infrastructure (Multiple Clusters)
Middle Layer: Communication & Message Broker
Bottom Layer: Backend Infrastructure
Data Flow Representation
• Bi-directional synchronization paths:
1. Cluster → Synchronizer Client → Server → Pulsar → Event Ingester → Database
2. Database → Event Ingester → Pulsar → Server → Synchronizer Client → Cluster
Additional Elements
• Configuration components (from config/ directory)
• Authentication flow (from cmd/server/authentication)
• Core domain objects (from domain/ directory)
• Messaging interfaces (from messaging/ directory)
Detailed Component Connections
[ETCD Cluster] ←→ [Synchronizer Client]
• ↕
[Adapter Layer (In-cluster/HTTP/Backend)]
• ↕
[Synchronizer Server] ←→ [Authentication]
• ↕
[Pulsar Message Broker]
• ↕
[Event Ingester]
• ↕
[Database]
Implementation Details to Note
• Version indicators for adapters (v1 as shown in the file structure)
• Different types of events supported (from domain/ directory)
• Configuration paths
• Monitoring/metrics points (visible in adapter metrics)