# wiz-sec/charts architecture

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

- Interactive diagram: https://gitdiagram.com/wiz-sec/charts
- Repository: https://github.com/wiz-sec/charts

## Overview

##### Project Type and Purpose
- This repository is an open-source collection of Helm charts specifically for deploying various Wiz Kubernetes components (like flux2, git-proxy, wiz-admission-controller, wiz-broker, wiz-common, and others).
- The README instructs users on how to add the repository to Helm, confirming that the primary purpose is to serve as a centralized repository for Kubernetes deployment charts.
- The charts target different areas – for instance, admission control, brokering, sensors, connectors, and network analysis – which hints at modular, loosely coupled deployments in Kubernetes environments.

##### File Structure
- Notice top-level directories such as:
– .circleci: Contains CI/CD configuration, tests, and golden files that validate the charts.
– flux2, git-proxy, wiz-admission-controller, etc.: Each of these is a separate Helm chart. Their internal structure follows the Helm convention (with Chart.yaml, templates folder, values.yaml, and sometimes .helmignore).
- Each chart operates as a self-contained component that can be deployed independently.
- The presence of tests under .circleci indicates continuous integration and automated validation of each Helm chart; these tests may be run as part of the build pipelines.
- There’s also a “wiz-common” chart that likely provides common shared functionality or templates for the other charts.

##### Key Points
a. Main Components:
– CI/CD Pipeline: Represent the “.circleci” directory with its build and test workflows. Illustrate how these pipelines trigger automated tests (such as the golden tests) for multiple charts.
– Helm Charts Repository Modules: Each top-level chart directory (flux2, git-proxy, wiz-admission-controller, wiz-broker, wiz-common, wiz-kubernetes-connector, wiz-kubernetes-integration, wiz-network-analyzer, wiz-outpost-configuration, wiz-outpost-lite, wiz-sensor) should be depicted as an individual component. If applicable, show “wiz-common” as a shared library for other charts.
– User Interaction: Include a component for end users who add the repository via Helm (per the README instructions) and deploy charts to their Kubernetes clusters.
b. Relationships and Interactions:
– Connect “wiz-common” to the components that might depend on or extend it.
– Show data flows from Helm users (or pipelines) to the chart deployment process in Kubernetes.
c. Architectural Patterns/Design Principles:
– Modularity: Each Helm chart is self-contained yet may share common templates or functions (as evidenced by wiz-common).
– Continuous Integration/Continuous Delivery (CI/CD): The CircleCI configuration validates all charts, ensuring each component’s quality before deployment.
– Infrastructure as Code: The charts define Kubernetes resources using templates and values that can be version-controlled and deployed predictably.
d. Relevant Technologies and Frameworks:
– Helm: For package management and deployment of Kubernetes applications.
– Kubernetes: The target platform where the charts will be deployed.
– CircleCI: For maintaining a robust CI/CD pipeline that includes tests and validations (golden tests, integration tests).
– Git/Github: As the version control and management system for the repository, with GitHub-specific files like CODEOWNERS.

##### Detailed Representation and Final Advice
- Zoom in on each chart as a module, optionally detailing subcomponents (Chart.yaml, templates, values.yaml) if necessary.
- Make annotations that explain how the charts are intended to be used and how the CI/CD pipeline ensures their integrity before making them available via the Helm repository.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "User Interaction"
        U["Helm User"]:::user
    end

    subgraph "CI/CD Pipeline"
        CI[".circleci Pipeline"]:::ci
    end

    subgraph "Helm Charts"
        F["flux2"]:::chart
        G["git-proxy"]:::chart
        A["wiz-admission-controller"]:::chart
        B["wiz-broker"]:::chart
        C["wiz-common"]:::common
        K["wiz-kubernetes-connector"]:::chart
        I["wiz-kubernetes-integration"]:::chart
        N["wiz-network-analyzer"]:::chart
        O["wiz-outpost-configuration"]:::chart
        L["wiz-outpost-lite"]:::chart
        S["wiz-sensor"]:::chart
    end

    subgraph "Deployment"
        K8["Kubernetes Cluster"]:::k8s
    end

    CI -->|"validates"| F
    CI -->|"validates"| G
    CI -->|"validates"| A
    CI -->|"validates"| B
    CI -->|"validates"| C
    CI -->|"validates"| K
    CI -->|"validates"| I
    CI -->|"validates"| N
    CI -->|"validates"| O
    CI -->|"validates"| L
    CI -->|"validates"| S

    F -->|"deployed"| K8
    G -->|"deployed"| K8
    A -->|"deployed"| K8
    B -->|"deployed"| K8
    K -->|"deployed"| K8
    I -->|"deployed"| K8
    N -->|"deployed"| K8
    O -->|"deployed"| K8
    L -->|"deployed"| K8
    S -->|"deployed"| K8

    C -->|"shared"| F
    C -->|"shared"| G
    C -->|"shared"| A
    C -->|"shared"| B
    C -->|"shared"| K
    C -->|"shared"| I
    C -->|"shared"| N
    C -->|"shared"| O
    C -->|"shared"| L
    C -->|"shared"| S

    U -->|"deploys"| K8

    click CI "https://github.com/wiz-sec/charts/blob/master/.circleci"
    click F "https://github.com/wiz-sec/charts/tree/master/flux2"
    click G "https://github.com/wiz-sec/charts/tree/master/git-proxy"
    click A "https://github.com/wiz-sec/charts/tree/master/wiz-admission-controller"
    click B "https://github.com/wiz-sec/charts/tree/master/wiz-broker"
    click C "https://github.com/wiz-sec/charts/tree/master/wiz-common"
    click K "https://github.com/wiz-sec/charts/tree/master/wiz-kubernetes-connector"
    click I "https://github.com/wiz-sec/charts/tree/master/wiz-kubernetes-integration"
    click N "https://github.com/wiz-sec/charts/tree/master/wiz-network-analyzer"
    click O "https://github.com/wiz-sec/charts/tree/master/wiz-outpost-configuration"
    click L "https://github.com/wiz-sec/charts/tree/master/wiz-outpost-lite"
    click S "https://github.com/wiz-sec/charts/tree/master/wiz-sensor"

    classDef ci fill:#80dfff,stroke:#000,stroke-width:2px;
    classDef chart fill:#b3ffb3,stroke:#000,stroke-width:2px;
    classDef common fill:#ffdb4d,stroke:#000,stroke-width:2px;
    classDef user fill:#ffb3b3,stroke:#000,stroke-width:2px;
    classDef k8s fill:#ffcc99,stroke:#000,stroke-width:2px;
```
