# apache/apisix-helm-chart architecture

> Architecture diagram of the GitHub repository apache/apisix-helm-chart, 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/apache/apisix-helm-chart
- Repository: https://github.com/apache/apisix-helm-chart

## Overview

##### Project type and purpose
- This is an infrastructure-as-code project made up of Helm charts for Kubernetes. Its purpose is to deploy and configure:
- Apache APISIX (the API gateway and etcd)
- APISIX Dashboard (the web UI and Admin API)
- APISIX Ingress Controller (CRDs and controller pods)
- You’re not drawing application code or business logic. Instead you’re illustrating how Helm packages turn into running K8s resources and how those resources interact at runtime.

##### File structure
- Top-level:
- charts/ – three sub-charts (apisix, apisix-dashboard, apisix-ingress-controller)
- docs/, test/, CI workflows, Makefile
- Each chart has:
- Chart.yaml, values.yaml (public interface)
- templates/ (Kubernetes YAML resources: Deployments, Services, ConfigMaps, Ingress, CRDs)
- crds/ in the ingress-controller chart
- The presence of CRDs and templates signals a custom-resource-based controller pattern.

##### README
- Confirms three deliverables (APISIX, Dashboard, Ingress Controller), compatibility matrix, usage link.

##### Detail
- Don’t group everything into “APISIX”. Break out etcd, gateway, admin API, Dashboard UI, Ingress Controller.
- CRDs (ApisixRoute, PluginConfig, etc.) as a separate layer.
- Test harness (kind cluster) only if needed to illustrate pipeline, otherwise omit.
- Helm lifecycles: chart fetch → template → apply → release hooks.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Actors
    DevOps("DevOps Engineer"):::external
    APIClients("API Clients"):::external
    DashboardUsers("Dashboard Users"):::external

    %% Helm Subsystem
    subgraph "Helm Charts" 
        direction TB
        HelmRoot["charts/"]:::helm
        APISIXChart["charts/apisix/"]:::helm
        DashboardChart["charts/apisix-dashboard/"]:::helm
        IngressCtrlChart["charts/apisix-ingress-controller/"]:::helm
    end

    %% Kubernetes Cluster
    subgraph "Kubernetes Cluster"
        direction TB

        subgraph "Control Plane"
            direction TB
            APIServer["Kubernetes API Server"]:::k8s-api
            K8sEtcd["etcd (K8s datastore)"]:::etcd
        end

        subgraph "Workloads"
            direction TB
            subgraph "APISIX"
                direction TB
                APISIXEtcd["APISIX etcd StatefulSet"]:::workload
                APISIXDeployment["APISIX Gateway Deployment"]:::workload
                APISIXConfig["APISIX ConfigMap"]:::config
                APISIXAdminSvc["APISIX Admin API Service"]:::service
                APISIXProxySvc["APISIX Proxy Service"]:::service
                APISIXAdminIngress["APISIX Admin Ingress"]:::ingress
                APISIXControlIngress["APISIX Control Ingress"]:::ingress
            end

            subgraph "Dashboard"
                direction TB
                DashboardDeployment["Dashboard Deployment"]:::workload
                DashboardSvc["Dashboard Service"]:::service
                DashboardIngress["Dashboard Ingress"]:::ingress
            end

            subgraph "Ingress Controller"
                direction TB
                CRDs["Ingress Controller CRDs"]:::crd
                IngressCtrlDeploy["Ingress Controller Deployment"]:::controller
                IngressCtrlRBAC["Ingress Controller RBAC"]:::config
                IngressCtrlSvc["Ingress Controller Service"]:::service
                ApisixClientSvc["Ingress Controller Apisix Client Service"]:::service
            end
        end
    end

    %% Flows and Interactions
    DevOps -->|"helm install"| HelmRoot
    HelmRoot --> APISIXChart
    HelmRoot --> DashboardChart
    HelmRoot --> IngressCtrlChart
    APISIXChart -->|renders templates| APIServer
    DashboardChart -->|renders templates| APIServer
    IngressCtrlChart -->|renders templates| APIServer

    APIServer -->|creates| APISIXEtcd
    APIServer -->|creates| APISIXDeployment
    APIServer -->|creates| APISIXConfig
    APIServer -->|creates| APISIXAdminSvc
    APIServer -->|creates| APISIXProxySvc
    APIServer -->|creates| APISIXAdminIngress
    APIServer -->|creates| APISIXControlIngress

    APIServer -->|creates| DashboardDeployment
    APIServer -->|creates| DashboardSvc
    APIServer -->|creates| DashboardIngress

    APIServer -->|creates| CRDs
    APIServer -->|creates| IngressCtrlDeploy
    APIServer -->|creates| IngressCtrlRBAC
    APIServer -->|creates| IngressCtrlSvc
    APIServer -->|creates| ApisixClientSvc

    IngressCtrlDeploy -->|"watches CRDs"| APIServer
    IngressCtrlDeploy -->|"reconcile → Admin API"| APISIXAdminSvc

    APIClients -->|request| APISIXProxySvc
    DashboardUsers -->|browse UI| DashboardIngress
    DashboardDeployment -->|calls Admin API| APISIXAdminSvc

    %% Click Events
    click HelmRoot "https://github.com/apache/apisix-helm-chart/tree/master/charts/"
    click APISIXChart "https://github.com/apache/apisix-helm-chart/tree/master/charts/apisix/"
    click APISIXEtcd "https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix/charts/etcd-9.7.3.tgz"
    click APISIXDeployment "https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix/templates/deployment.yaml"
    click APISIXAdminSvc "https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix/templates/service-admin.yaml"
    click APISIXProxySvc "https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix/templates/service-gateway.yaml"
    click APISIXAdminIngress "https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix/templates/ingress-admin.yaml"
    click APISIXControlIngress "https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix/templates/ingress-control.yaml"
    click APISIXConfig "https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix/templates/configmap.yaml"
    click DashboardChart "https://github.com/apache/apisix-helm-chart/tree/master/charts/apisix-dashboard/"
    click DashboardDeployment "https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix-dashboard/templates/deployment.yaml"
    click DashboardSvc "https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix-dashboard/templates/service.yaml"
    click DashboardIngress "https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix-dashboard/templates/ingress.yaml"
    click IngressCtrlChart "https://github.com/apache/apisix-helm-chart/tree/master/charts/apisix-ingress-controller/"
    click CRDs "https://github.com/apache/apisix-helm-chart/tree/master/charts/apisix-ingress-controller/crds/"
    click IngressCtrlDeploy "https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix-ingress-controller/templates/deployment.yaml"
    click IngressCtrlRBAC "https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix-ingress-controller/templates/rbac.yaml"
    click IngressCtrlSvc "https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix-ingress-controller/templates/service.yaml"
    click ApisixClientSvc "https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix-ingress-controller/templates/service-apisix.yaml"

    %% Styles
    classDef external fill:#f9f,stroke:#333,stroke-width:1px
    classDef helm fill:#bbf,stroke:#333,stroke-width:1px
    classDef k8s-api fill:#bfb,stroke:#333,stroke-width:1px
    classDef etcd fill:#ddd,stroke:#333,stroke-width:1px,stroke-dasharray: 5 5
    classDef workload fill:#ffb,stroke:#333,stroke-width:1px
    classDef service fill:#bff,stroke:#333,stroke-width:1px
    classDef ingress fill:#fbf,stroke:#333,stroke-width:1px
    classDef config fill:#efe,stroke:#333,stroke-width:1px
    classDef crd fill:#ffd,stroke:#333,stroke-width:1px,stroke-dasharray: 2 2
    classDef controller fill:#fbd,stroke:#333,stroke-width:1px
```
