# iam-veeramalla/helm-zero-to-hero architecture

> Architecture diagram of the GitHub repository iam-veeramalla/helm-zero-to-hero, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/iam-veeramalla/helm-zero-to-hero
- Repository: https://github.com/iam-veeramalla/helm-zero-to-hero

## Overview

##### Project type and purpose
- This is a “helm-zero-to-hero” tutorial repository aimed at teaching Helm basics.
- It includes four tutorial markdown files (01-04) explaining Helm concepts and two example microservices (“payments” and “shipping”) packaged as Helm charts under the “best-commerce” chart repository.

##### File structure
- Top-level:
- 01-04-*.md – sequential lesson content (what Helm is, its components, how to create & deploy charts).
- best-commerce/ – a Helm chart repo containing:
– index.yaml – the chart repository index.
– payments-0.1.0.tgz & shipping-0.1.0.tgz – packaged charts.
– payments/ and shipping/ directories – each with Chart.yaml, values.yaml, .helmignore, and a templates/ folder (deployment.yaml, service.yaml, ingress.yaml, hpa.yaml, serviceaccount.yaml, tests, _helpers.tpl).
- No application source code—only chart definitions and tutorial docs.

##### README
- Confirms the goal: “Learn Helm from basics.” No further architectural notes.

a. Main components
- Developer workstation (helm CLI + git)
- Chart repository (best-commerce; HTTP server hosting index.yaml + .tgz artifacts)
- Helm client/server interaction (Helm v3 is client-only but conceptualizes client → Tiller for Helm v2; for v3 show only Helm CLI → K8s API)
- Kubernetes cluster:
- API server
- payments deployment & pods, shipping deployment & pods
- Services (ClusterIP)
- Ingress controller & Ingress resources
- HorizontalPodAutoscaler for each service
b. Relationships & interactions
- Developer edits chart source (templates + values.yaml) → helm package → .tgz
- helm repo index (index.yaml) updated → chart repo server
- Developer runs helm install/upgrade pointing at chart repo URL → Helm CLI renders templates client-side, then calls Kubernetes API
- Kubernetes API creates/updates Deployments, Services, HPAs, Ingress, ServiceAccounts
- Ingress controller routes external HTTP traffic to service endpoints
c. Architectural patterns & design principles
- Template-driven, values-driven configuration (separation of concerns)
- Microservice separation: each of payments & shipping is its own chart, deployable independently
- Git-ops friendly: chart repo as source of truth
- Declarative, idempotent resource definitions
d. Key technologies & frameworks
- Helm v3, Kubernetes API, Ingress controller (e.g., nginx), HorizontalPodAutoscaler (metrics server)
- Chart schema & templating engine (Go templates)
- HTTP-based chart repository (could be GitHub Pages, S3, etc.)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Authoring & Packaging Layer
    subgraph "Authoring & Packaging"
        direction TB
        Developer["Developer Workstation\n(IDE / CLI)"]:::user
        subgraph "Tutorial Documentation"
            direction TB
            Doc1["01-what-is-helm.md"]:::user
            Doc2["02-components-of-helm.md"]:::user
            Doc3["03-deploy-helm-chart.md"]:::user
            Doc4["04-create-helm-chart.md"]:::user
        end
        subgraph "Chart Source"
            direction TB
            PaymentsSource["best-commerce/payments/"]:::user
            ChartYAML1["Chart.yaml"]:::user
            ValuesYAML1["values.yaml"]:::user
            Ignore1[".helmignore"]:::user
            Templates1["templates/"]:::user
            ShippingSource["best-commerce/shipping/"]:::user
            ChartYAML2["Chart.yaml"]:::user
            ValuesYAML2["values.yaml"]:::user
            Ignore2[".helmignore"]:::user
            Templates2["templates/"]:::user
        end
        HelmCLI["Helm CLI"]:::user
    end

    Developer -->|edits docs| Doc1
    Developer --> Doc2
    Developer --> Doc3
    Developer --> Doc4
    Developer -->|edits templates| PaymentsSource
    PaymentsSource --> ChartYAML1
    PaymentsSource --> ValuesYAML1
    PaymentsSource --> Ignore1
    PaymentsSource --> Templates1
    Developer -->|edits templates| ShippingSource
    ShippingSource --> ChartYAML2
    ShippingSource --> ValuesYAML2
    ShippingSource --> Ignore2
    ShippingSource --> Templates2
    Developer -->|runs helm package| HelmCLI

    %% Chart Repository Layer
    subgraph "Chart Repository" 
        direction TB
        Index["index.yaml"]:::repo
        PaymentsTgz["payments-0.1.0.tgz"]:::repo
        ShippingTgz["shipping-0.1.0.tgz"]:::repo
    end

    HelmCLI -->|helm package + repo index| Index
    HelmCLI --> PaymentsTgz
    HelmCLI --> ShippingTgz

    %% Deployment & Runtime Layer
    subgraph "Deployment & Runtime"
        direction TB
        HelmCLI -->|helm install/upgrade| APIServer["Kubernetes API Server"]:::control-plane
        APIServer -->|creates| PaymentsDeployment["payments Deployment & Pods"]:::workload
        APIServer -->|creates| ShippingDeployment["shipping Deployment & Pods"]:::workload
        APIServer -->|creates| PaymentsService["payments Service (ClusterIP)"]:::workload
        APIServer -->|creates| ShippingService["shipping Service (ClusterIP)"]:::workload
        APIServer -->|creates| PaymentsHPA["payments HPA"]:::workload
        APIServer -->|creates| ShippingHPA["shipping HPA"]:::workload
        APIServer -->|creates| PaymentsSA["payments ServiceAccount"]:::workload
        APIServer -->|creates| ShippingSA["shipping ServiceAccount"]:::workload
        APIServer -->|creates| IngressRes["Ingress Resources"]:::networking
        IngressController["Ingress Controller"]:::networking
        IngressController -->|"routes traffic"| PaymentsService
        IngressController -->|"routes traffic"| ShippingService
    end

    %% Click Events
    click Doc1 "https://github.com/iam-veeramalla/helm-zero-to-hero/blob/main/01-what-is-helm.md"
    click Doc2 "https://github.com/iam-veeramalla/helm-zero-to-hero/blob/main/02-components-of-helm.md"
    click Doc3 "https://github.com/iam-veeramalla/helm-zero-to-hero/blob/main/03-deploy-helm-chart.md"
    click Doc4 "https://github.com/iam-veeramalla/helm-zero-to-hero/blob/main/04-create-helm-chart.md"
    click Index "https://github.com/iam-veeramalla/helm-zero-to-hero/blob/main/best-commerce/index.yaml"
    click PaymentsTgz "https://github.com/iam-veeramalla/helm-zero-to-hero/blob/main/best-commerce/payments-0.1.0.tgz"
    click ShippingTgz "https://github.com/iam-veeramalla/helm-zero-to-hero/blob/main/best-commerce/shipping-0.1.0.tgz"
    click PaymentsSource "https://github.com/iam-veeramalla/helm-zero-to-hero/tree/main/best-commerce/payments/"
    click ChartYAML1 "https://github.com/iam-veeramalla/helm-zero-to-hero/blob/main/best-commerce/payments/Chart.yaml"
    click ValuesYAML1 "https://github.com/iam-veeramalla/helm-zero-to-hero/blob/main/best-commerce/payments/values.yaml"
    click Ignore1 "https://github.com/iam-veeramalla/helm-zero-to-hero/blob/main/best-commerce/payments/.helmignore"
    click Templates1 "https://github.com/iam-veeramalla/helm-zero-to-hero/tree/main/best-commerce/payments/templates/"
    click ShippingSource "https://github.com/iam-veeramalla/helm-zero-to-hero/tree/main/best-commerce/shipping/"
    click ChartYAML2 "https://github.com/iam-veeramalla/helm-zero-to-hero/blob/main/best-commerce/shipping/Chart.yaml"
    click ValuesYAML2 "https://github.com/iam-veeramalla/helm-zero-to-hero/blob/main/best-commerce/shipping/values.yaml"
    click Ignore2 "https://github.com/iam-veeramalla/helm-zero-to-hero/blob/main/best-commerce/shipping/.helmignore"
    click Templates2 "https://github.com/iam-veeramalla/helm-zero-to-hero/tree/main/best-commerce/shipping/templates/"

    %% Styles
    classDef user fill:#add8e6,stroke:#000
    classDef repo fill:#ffa500,stroke:#000
    classDef control-plane fill:#90ee90,stroke:#000
    classDef workload fill:#ffff99,stroke:#000
    classDef networking fill:#dda0dd,stroke:#000
```
