# datadog/helm-charts architecture

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

- Interactive diagram: https://gitdiagram.com/datadog/helm-charts
- Repository: https://github.com/datadog/helm-charts

## Overview

##### Project Type and Purpose
- This is an open-source repository for Helm charts. It packages various Datadog products such as the Datadog Agent, Datadog Operator, Extended DaemonSet, Observability Pipelines Worker, Private Action Runner, and Synthetics Private Location.
- The purpose is to allow users to easily add the repository and deploy these products onto their Kubernetes clusters using Helm.

##### Analyzing the File Structure
- Top-level directories include .github (for GitHub-related CI/CD workflows), charts (which holds multiple Helm charts for different Datadog products), crds (for custom resource definitions), test (for integration and e2e tests), examples, and documentation files.
- The existence of numerous CI/CD workflow files, Makefile, and configuration files suggests that the repository includes automated testing, deployment, and quality control mechanisms.

##### Key Architectural Components and Their Relationships
- Helm Charts as Core Components:
- Datadog Agent (charts/datadog):
- Represents the main agent deployment on user clusters.
- Datadog Operator (charts/datadog-operator):
- Deploys an operator that likely manages the lifecycle of custom resources (like Datadog Agent CRDs) for automation.
- Extended DaemonSet (charts/extended-daemon-set):
- Provides extended control over DaemonSet functionality in the context of deploying agents.
- Observability Pipelines Worker (charts/observability-pipelines-worker):
- Handles processing or routing of observability data such as logs or metrics.
- Private Action Runner (charts/private-action-runner):
- Supports running private actions within Kubernetes environments, possibly for CI/CD or self-hosted workflows.
- Synthetics Private Location (charts/synthetics-private-location):
- Enables synthetic monitoring from private network locations.
- CRDs Directory:
- This contains the Custom Resource Definitions that are leveraged by the operator and other components deployed using these charts.
- CI/CD Components:
- The .github/workflows and GitLab CI configuration files indicate robust automated build, test, and release pipelines that ensure reliability of the charts.
- Tests:
- The test directory includes a variety of baseline and integration tests. These act as verification layers that the charts’ configurations deploy Datadog products correctly.

##### Relationships & Data Flow
- Each Helm chart is a modular unit that users install. Some charts (like the Operator) provide management and orchestration for the other components (agents or extended functionality). Hence, you want to show directional dependencies that indicate this control and communication. For example:
- The Datadog Operator interacts with the CRDs to manage agent configurations or deployments.
- The Extended DaemonSet may interface directly with the Datadog Agent to augment its deployment on nodes.
- Private Action Runner and Observability Pipelines Worker might interact with external systems (like CI/CD pipelines or third-party data ingestion systems).
- That all these installations ultimately communicate with Datadog service endpoints (outside of the cluster) where monitored data is sent.

##### Important Architectural Patterns
- Modularity: Each chart is an independent package but can be installed together to provide a full observability solution in Kubernetes.
- Separation of concerns: The repository clearly separates the deployment definitions (charts), custom resource definitions (crds), CI/CD configuration (.github, .gitlab-ci.yml), and tests.

##### Technologies, Frameworks, and Tools
- Helm for packaging and deployment
- Kubernetes as the target deployment environment
- GitHub Actions, GitLab pipelines, and Makefiles for CI/CD and testing automation
- Custom Resource Definitions (CRDs) integral for the operator’s functionality

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% CI/CD Components
    H["CI/CD Pipelines"]:::cicd
    J["GitLab CI Pipelines"]:::cicd

    %% Kubernetes Cluster Boundary
    subgraph "Kubernetes Cluster"
        A["Datadog Agent Chart"]:::helm
        B["Datadog Operator Chart"]:::helm
        C["Extended DaemonSet Chart"]:::helm
        D["Observability Pipelines Worker Chart"]:::helm
        E["Private Action Runner Chart"]:::helm
        F["Synthetics Private Location Chart"]:::helm
        G["CRDs"]:::crd
    end

    %% External Service
    I["Datadog SaaS Endpoint"]:::external

    %% Deployment arrows from CI/CD pipelines to Helm charts
    H --> A
    H --> B
    H --> C
    H --> D
    H --> E
    H --> F

    J --> A
    J --> B
    J --> C
    J --> D
    J --> E
    J --> F

    %% Interactions and data flows within the Kubernetes Cluster and beyond
    B -->|"manages"| G
    C -->|"augments"| A
    A -->|"sends-data"| I
    D -->|"processes-data"| I
    E -->|"triggers-actions"| I
    F -->|"monitors"| I

    %% Click Events for Components
    click A "https://github.com/datadog/helm-charts/tree/main/charts/datadog"
    click B "https://github.com/datadog/helm-charts/tree/main/charts/datadog-operator"
    click C "https://github.com/datadog/helm-charts/tree/main/charts/extended-daemon-set"
    click D "https://github.com/datadog/helm-charts/tree/main/charts/observability-pipelines-worker"
    click E "https://github.com/datadog/helm-charts/tree/main/charts/private-action-runner"
    click F "https://github.com/datadog/helm-charts/tree/main/charts/synthetics-private-location"
    click G "https://github.com/datadog/helm-charts/tree/main/crds"
    click H "https://github.com/datadog/helm-charts/tree/main/.github/workflows"
    click J "https://github.com/datadog/helm-charts/blob/main/.gitlab-ci.yml"

    %% Style Definitions
    classDef helm fill:#bbdefb,stroke:#1e88e5,stroke-width:2px,rx:5,ry:5;
    classDef cicd fill:#c8e6c9,stroke:#43a047,stroke-width:2px;
    classDef crd fill:#ffe082,stroke:#fb8c00,stroke-width:2px,stroke-dasharray: 5 5;
    classDef external fill:#ffccbc,stroke:#d84315,stroke-width:2px;
```
