# devops-ia/helm-opencti architecture

> Architecture diagram of the GitHub repository devops-ia/helm-opencti, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/devops-ia/helm-opencti
- Repository: https://github.com/devops-ia/helm-opencti

## Overview

##### Main Components
- OpenCTI Server: This is the central component as reflected by the chart’s “server” templates (deployment, service, ingress, configmaps, etc.).
- Worker: The “worker” folder indicates that asynchronous/background tasks or processing are handled via separate deployments.
- Connectors: There is a dedicated “connector” folder in templates plus multiple example connector configurations. These connectors likely represent integrations with third-party threat intelligence sources (e.g., AlienVault, MISP, Shodan, etc.).
- Kubernetes Resources: Represent the overall Kubernetes objects (Deployments, Services, ConfigMaps, Secrets, Network Policies, etc.) that are being deployed.
- CI/CD Pipelines: The .github/workflows directory indicates that automated testing, linting, version checking, and release processes are implemented, which support the deployment lifecycle.

##### Relationships and Interactions
- The OpenCTI Server interacts with the Worker and Connector components to render the platform’s cyber threat intelligence capabilities.
- The Connectors serve as external integration points, pulling in threat intelligence data or interacting with third-party security tools.
- The Server and Worker communicate through internal APIs or data queues, indicating a decoupled microservice design within the Kubernetes cluster.
- CI/CD pipelines (from the .github folder) automate chart testing, linting, and updating processes, ensuring consistency across releases.

##### Architectural Patterns & Design Principles
- Kubernetes and Helm: The structure uses Helm’s templating system to define Kubernetes resources. This represents an Infrastructure-as-Code (IaC) pattern that enables repeatable, declarative deployment.
- Microservices Decomposition: Though all parts are deployed as separate Kubernetes deployments, they are isolated in function (server, worker, connectors) which resembles a microservices architecture.
- Separation of Concerns: Deploying server, worker, and connectors separately is a good example of separating logic into distinct roles that communicate with each other through defined interfaces.
- Extensibility: The connector examples suggest that the chart is designed for pluggable integrations, which is key to the system’s flexibility and ease of extension.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Entities
    CP["CI/CD Pipeline"]:::cicd
    ER["External Registries (Helm Chart/OCI)"]:::external
    KR["Kubernetes Resources"]:::k8s

    %% Deployment into Kubernetes Cluster
    subgraph "Kubernetes Cluster"
        SERV["OpenCTI Server"]:::server
        WORK["OpenCTI Worker"]:::worker
        subgraph "Connectors"
            CTemp["Connector Templates"]:::connector
            CEx["Connector Examples"]:::connector
        end
    end

    %% External to Internal Flow
    CP -->|"deploys"| KR
    ER -->|"fetches"| KR
    KR -->|"deploys to"| SERV

    %% Internal Communications
    SERV <-->|"communicates"| WORK
    SERV <-->|"integrates with"| CTemp
    SERV <-->|"integrates with"| CEx

    %% Click Events
    click SERV "https://github.com/devops-ia/helm-opencti/tree/main/charts/opencti/templates/server"
    click WORK "https://github.com/devops-ia/helm-opencti/tree/main/charts/opencti/templates/worker"
    click CTemp "https://github.com/devops-ia/helm-opencti/tree/main/charts/opencti/templates/connector"
    click CEx "https://github.com/devops-ia/helm-opencti/tree/main/charts/opencti/connector-examples"
    click KR "https://github.com/devops-ia/helm-opencti/tree/main/charts/opencti"
    click CP "https://github.com/devops-ia/helm-opencti/tree/main/.github/workflows"

    %% Styles
    classDef server fill:#add8e6,stroke:#00008b,stroke-width:2px;
    classDef worker fill:#90ee90,stroke:#006400,stroke-width:2px;
    classDef connector fill:#ffa500,stroke:#ff8c00,stroke-width:2px;
    classDef cicd fill:#ff7f7f,stroke:#ff0000,stroke-width:2px,stroke-dasharray: 5, 5;
    classDef k8s fill:#e0e0e0,stroke:#808080,stroke-width:2px;
    classDef external fill:#ffd700,stroke:#daa520,stroke-width:2px;
```
