# ibm-messaging/mq-helm architecture

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

- Interactive diagram: https://gitdiagram.com/ibm-messaging/mq-helm
- Repository: https://github.com/ibm-messaging/mq-helm

## Overview

##### Project type and purpose
- This repository is a Helm chart for deploying IBM MQ containers into Kubernetes (“ibm-mq” under charts/), plus a collection of sample deployments for various cloud/Kubernetes environments (samples/…).
- It is an infrastructure-as-code/DevOps project, not an application codebase. Its goal is to package IBM MQ container definitions, Kubernetes manifests, and knobs (via values.yaml) so operators can deploy MQ clusters, HA configurations, licensing annotations, and related resources reliably.

##### File structure
- Top-level directories:
- charts/ibm-mq/… → Helm chart code (Chart.yaml, values.yaml, templates/).
- samples/… → dozens of example overlays and scripts targeting AWS, Azure, GKE, OpenShift, Minikube, etc.
- charts/ibm-mq/templates contains Kubernetes manifest templates: ConfigMap, ServiceAccount, StatefulSet, PVC, Services (ClusterIP, LoadBalancer), Ingress/Route, Metrics Service.
- values.yaml drives templating of image versions, storage, HA mode, licensing annotations, ingress hosts, ports.
- CI/CD: .github/workflows/release.yml builds chart package and pushes to Helm repo.

##### README for additional insights
- README explains prerequisites (Helm 3, kubectl), chart features (MQ container version, native HA, licensing via IBM License Service).
- Mentions optional IBM License Service operator running in cluster to track usage via Pod annotations.

##### Elements
- Clear labels: “Helm Client”, “Kubernetes API”, “MQ StatefulSet”, “PVC (data, log)”, “ServiceAccount”, etc.
- Helm → API Server (install)
- API Server → each resource type (creation)
- MQ Pod → PVC (mount)
- MQ Pod → Service (serve traffic)
- Ingress → Service (ingress traffic)
- License Operator → LicenseService CR
- Orange for Helm/client-side elements
- Gray for optional License operator path

##### Detail and essential elements
- Break out the Helm chart folder as its own component, showing values.yaml feeding into templates.
- Dual-mode architecture: single MQ queue manager vs. Native HA multi-pod queue manager.
- Call out the licensing annotation extension point.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Helm Client Side
    subgraph "Helm Client" 
        direction TB
        HC["Helm Client"]:::orange
        subgraph "Helm Chart Structure" 
            direction TB
            CR["Chart Root"]:::orange
            CM["Chart.yaml"]:::orange
            HI[".helmignore"]:::orange
            VA["values.yaml"]:::orange
            HP["_helpers.tpl"]:::orange
            NO["NOTES.txt"]:::orange
        end
    end

    HC -->|"renders templates with values"| CR

    %% Kubernetes Cluster
    subgraph "Kubernetes Cluster" 
        direction TB
        KAPI["API Server"]:::green

        subgraph "Kubernetes Resources"
            direction TB
            CMAP["ConfigMap"]:::green
            SA["ServiceAccount"]:::green
            SS["StatefulSet"]:::green
            subgraph "Persistent Volumes"
                direction TB
                PVC1["PVC Data"]:::storage
                PVC2["PVC Log"]:::storage
            end
            subgraph "Services"
                direction TB
                S_INT["ClusterIP Service"]:::green
                S_QM["QM Service"]:::green
                S_LB_EXT["LoadBalancer Service"]:::green
                S_HACRR["HA-CRR LB Service"]:::green
                S_NHA["Native HA Service"]:::green
                S_WEB["Web Console Service"]:::green
                S_MET["Metrics Service"]:::green
            end
            subgraph "Ingress & Routes"
                direction TB
                ING["Ingress"]:::green
                R_QM["Route QM"]:::green
                R_WEB["Route Web"]:::green
                R_HACRR["Route HA-CRR"]:::green
            end
        end

        KAPI -->|"creates"| CMAP
        KAPI -->|"creates"| SA
        KAPI -->|"creates"| SS
        KAPI -->|"creates"| PVC1
        KAPI -->|"creates"| PVC2
        KAPI -->|"creates"| S_INT
        KAPI -->|"creates"| S_QM
        KAPI -->|"creates"| S_LB_EXT
        KAPI -->|"creates"| S_HACRR
        KAPI -->|"creates"| S_NHA
        KAPI -->|"creates"| S_WEB
        KAPI -->|"creates"| S_MET
        KAPI -->|"creates"| ING
        KAPI -->|"creates"| R_QM
        KAPI -->|"creates"| R_WEB
        KAPI -->|"creates"| R_HACRR

        SS -->|"mounts"| PVC1
        SS -->|"mounts"| PVC2
        SS -->|"runs Pods"| MQP["MQ Pods"]:::green
        MQP -->|"serves traffic"| S_INT
        MQP -->|"serves traffic"| S_QM
        ING -->|"forwards"| S_WEB
        ING -->|"forwards"| S_INT
    end

    %% Optional License Operator
    subgraph "Optional IBM License Operator" 
        direction TB
        OP["License Service Operator"]:::gray
        CRD["LicenseService CR"]:::gray
        OP -->|"watches annotations"| MQP
        OP -->|"creates"| CRD
    end

    %% Sample Deploy Pipelines
    subgraph "Sample Deploy Pipelines (AWS, Azure, GKE...)" 
        direction TB
        SD["Deploy Scripts & Overlays"]:::purple
        ST["Test Scripts (send/get message)"]:::purple
        SD -->|"helm install + kubectl"| HC
        ST -->|"interacts with"| MQP
    end

    %% CI/CD
    CI["GitHub Actions Release Workflow"]:::orange
    CI -->|"builds chart package"| CR

    %% Click Events
    click CR "https://github.com/ibm-messaging/mq-helm/tree/main/charts/ibm-mq/"
    click CM "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/Chart.yaml"
    click HI "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/.helmignore"
    click VA "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/values.yaml"
    click HP "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/templates/_helpers.tpl"
    click NO "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/templates/NOTES.txt"
    click CMAP "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/templates/config-map.yaml"
    click SA "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/templates/serviceaccount.yaml"
    click SS "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/templates/stateful-set.yaml"
    click PVC1 "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/templates/pvc-data.yaml"
    click PVC2 "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/templates/pvc-log.yaml"
    click S_INT "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/templates/service.yaml"
    click S_QM "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/templates/service-qm.yaml"
    click S_LB_EXT "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/templates/service-loadbalancer.yaml"
    click S_HACRR "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/templates/service-loadbalancer-hacrr.yaml"
    click S_NHA "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/templates/service-nativeha.yaml"
    click S_WEB "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/templates/service-web.yaml"
    click S_MET "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/templates/metrics-service.yaml"
    click ING "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/templates/service-ingress.yaml"
    click R_QM "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/templates/route-qm.yaml"
    click R_WEB "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/templates/route-web.yaml"
    click R_HACRR "https://github.com/ibm-messaging/mq-helm/blob/main/charts/ibm-mq/templates/route-hacrr.yaml"
    click CI "https://github.com/ibm-messaging/mq-helm/blob/main/.github/workflows/release.yml"
    click SD "https://github.com/ibm-messaging/mq-helm/tree/main/samples/*/deploy/"
    click ST "https://github.com/ibm-messaging/mq-helm/tree/main/samples/*/test/"

    %% Styles
    classDef orange fill:#FFA500,stroke:#333,stroke-width:1px;
    classDef green fill:#A0E3A0,stroke:#333,stroke-width:1px;
    classDef storage fill:#87CEEB,stroke:#333,stroke-width:1px;
    classDef gray stroke-dasharray: 5 5,fill:#D3D3D3,stroke:#666,stroke-width:1px;
    classDef purple fill:#D8BFD8,stroke:#333,stroke-width:1px;
```
