# crisp-sh/helm-charts architecture

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

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

## Overview

##### Project type and purpose
- This is a chart repository (Helm charts) for packaging and deploying two logical applications into a Kubernetes cluster:
a. **open-webui** (the core web UI + supporting services)
b. **pipelines** (a pipeline orchestration component)
- The README confirms the purpose: hosting and distributing Helm charts for Open WebUI.

##### File structure
- Top-level: `.github/workflows` (CI/CD), `charts/`, `package.json`, config files.
- Under `charts/` you have two subdirectories:
- `open-webui/`
- `pipelines/`
- Each chart contains standard Helm artifacts: `Chart.yaml`, `values.yaml` (+ env-specific overrides), and Kubernetes templates (`deployment.yaml`, `service.yaml`, `ingress.yaml`, PVC, ServiceAccount, extra resources, etc.).

##### README for additional insights
- Implied use cases: users will install these charts into their own Kubernetes clusters (GKE, Minikube), deploying a web UI and pipeline automation side by side or separately.

##### Main components and their relationships
a. **Helm Chart Repository**
- Contains two charts; published to `https://helm.openwebui.com`.
- CI/CD workflows automatically lint, test, and release charts via GitHub Actions.
b. **Kubernetes Cluster**
- Two namespaces (or one shared) each for `open-webui` and `pipelines`.
- Deployments & Services for pods.
- Ingress configured for the web UI (with managed certificate).
- Redis (via a `websocket-redis.yaml`) for real-time messaging.
- PVC for persistent storage.
c. **External Users & Clients**
- End users access the Web UI via Ingress/load balancer endpoint.
- Pipeline clients may interact via API/service endpoints.
d. **CI/CD Pipeline (GitHub Actions)**
- Lint and test charts (`helm-test-*.yml`).
- Automate releases (`helm-release.yml`).

##### Architectural patterns and design principles
- **Declarative Infrastructure**: All Kubernetes resources are defined as code in Helm templates.
- **Environment-specific overrides**: `values-gke-min.yaml`, `values-minikube.yaml`.
- **Separation of Concerns**:
- Web UI layer (Ingress → Service → Deployment pods + Redis)
- Pipeline layer (ServiceAccount → Deployment → Service)
- **CI/CD as Code**: GitHub workflows orchestrate chart testing and publishing.

##### Technologies, frameworks, libraries
- Helm (charts, templating engine)
- Kubernetes API objects (Ingress, Deployment, Service, PVC, ServiceAccount, ConfigMaps)
- GitHub Actions (CI/CD)
- External DNS/Managed Cert (GKE Ingress add-on or cert-manager)
- Redis (messaging backend for WebSocket)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External users
    Users["End Users"]:::external
    PipelineClients["Pipeline Clients"]:::external

    %% CI/CD Pipeline
    subgraph "CI/CD Pipeline" 
        direction TB
        GHTestOpen["helm-test-open-webui.yml"]:::cicd
        GHTestPipelines["helm-test-pipelines.yml"]:::cicd
        GHRelease["helm-release.yml"]:::cicd
    end

    HelmRepo["Helm Chart Repository"]:::repo

    %% Kubernetes Cluster
    subgraph "Kubernetes Cluster" 
        direction TB

        subgraph "Namespace: open-webui"
            direction TB
            OWIngress["ingress.yaml"]:::resource
            OWService["service.yaml"]:::resource
            OWDeployment["workload-manager.yaml"]:::resource
            OWRedis["websocket-redis.yaml"]:::stateful
            OWPVC["pvc.yaml"]:::stateful
        end

        subgraph "Namespace: pipelines"
            direction TB
            PipService["service.yaml"]:::resource
            PipDeployment["deployment.yaml"]:::resource
            PipPVC["pvc.yaml"]:::stateful
        end
    end

    %% Data flows
    Users -->|access via| OWIngress
    OWIngress -->|routes to| OWService
    OWService -->|forwards to| OWDeployment
    OWDeployment <-->|pub/sub| OWRedis
    OWDeployment -->|stores data| OWPVC

    PipelineClients -->|invoke| PipService
    PipService -->|runs tasks on| PipDeployment
    PipDeployment -->|stores data| PipPVC

    %% CI/CD flows
    GHTestOpen --> GHRelease
    GHTestPipelines --> GHRelease
    GHRelease --> HelmRepo
    HelmRepo -->|helm install/upgrade| KubernetesCluster

    %% Click events
    click GHTestOpen "https://github.com/crisp-sh/helm-charts/blob/main/.github/workflows/helm-test-open-webui.yml"
    click GHTestPipelines "https://github.com/crisp-sh/helm-charts/blob/main/.github/workflows/helm-test-pipelines.yml"
    click GHRelease "https://github.com/crisp-sh/helm-charts/blob/main/.github/workflows/helm-release.yml"
    click HelmRepo "https://github.com/crisp-sh/helm-charts/tree/main/charts/"
    click OWIngress "https://github.com/crisp-sh/helm-charts/blob/main/charts/open-webui/templates/ingress.yaml"
    click OWService "https://github.com/crisp-sh/helm-charts/blob/main/charts/open-webui/templates/service.yaml"
    click OWDeployment "https://github.com/crisp-sh/helm-charts/blob/main/charts/open-webui/templates/workload-manager.yaml"
    click OWRedis "https://github.com/crisp-sh/helm-charts/blob/main/charts/open-webui/templates/websocket-redis.yaml"
    click OWPVC "https://github.com/crisp-sh/helm-charts/blob/main/charts/open-webui/templates/pvc.yaml"
    click PipService "https://github.com/crisp-sh/helm-charts/blob/main/charts/pipelines/templates/service.yaml"
    click PipDeployment "https://github.com/crisp-sh/helm-charts/blob/main/charts/pipelines/templates/deployment.yaml"
    click PipPVC "https://github.com/crisp-sh/helm-charts/blob/main/charts/pipelines/templates/pvc.yaml"

    %% Styles
    classDef external fill:#f2f2f2,stroke:#aaa
    classDef cicd fill:#cce5ff,stroke:#339,stroke-width:1px
    classDef repo fill:#fff2cc,stroke:#aa7700
    classDef resource fill:#d9ead3,stroke:#6aa84f
    classDef stateful fill:#ffe599,stroke:#b45f06
    classDef KubernetesCluster fill:none,stroke:#000,stroke-width:2px,stroke-dasharray: 5 5
```
