# fluxcd/flux2-kustomize-helm-example architecture

> Architecture diagram of the GitHub repository fluxcd/flux2-kustomize-helm-example, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fluxcd/flux2-kustomize-helm-example
- Repository: https://github.com/fluxcd/flux2-kustomize-helm-example

## Overview

This repository is a Flux and Kustomize configuration example for deploying Podinfo and shared infrastructure to staging and production clusters. Flux reconciles per-cluster definitions; those definitions separate infrastructure from applications, and application overlays combine shared Helm configuration with environment-specific values. Infrastructure controllers precede infrastructure custom resources, which in turn precede application reconciliation. The README documents these dependencies and Helm version policies; no source excerpts were supplied, so the graph omits undocumented runtime details.

Main entry points: [`infrastructure/configs`](https://github.com/fluxcd/flux2-kustomize-helm-example/tree/main/infrastructure/configs) (Infrastructure resources), [`clusters/staging/infrastructure.yaml`](https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/clusters/staging/infrastructure.yaml) (Staging infrastructure sync), [`clusters/production/infrastructure.yaml`](https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/clusters/production/infrastructure.yaml) (Production infrastructure sync), [`clusters/staging/apps.yaml`](https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/clusters/staging/apps.yaml) (Staging apps sync)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cluster["Cluster reconciliation"]
  node_staging_artifacts["Staging artifacts<br/>[artifacts.yaml]"]
  node_production_artifacts["Production artifacts<br/>[artifacts.yaml]"]
  node_staging_infra_sync["Staging infrastructure sync"]
  node_production_infra_sync["Production infrastructure sync"]
  node_staging_apps_sync["Staging apps sync<br/>[apps.yaml]"]
  node_production_apps_sync["Production apps sync<br/>[apps.yaml]"]
end

subgraph group_apps["Podinfo applications"]
  node_base_app["Shared Podinfo release<br/>[release.yaml]"]
  node_app_namespace["Podinfo namespace<br/>[namespace.yaml]"]
  node_helm_repository["Podinfo Helm repository<br/>[repository.yaml]"]
  node_staging_overlay["Staging overlay<br/>[kustomization.yaml]"]
  node_staging_values["Staging values"]
  node_production_overlay["Production overlay<br/>[kustomization.yaml]"]
  node_production_values["Production values"]
end

subgraph group_infra["Infrastructure"]
  node_infra_controllers["Controller releases"]
  node_cert_manager["cert-manager release<br/>[cert-manager.yaml]"]
  node_envoy_gateway["Envoy Gateway release<br/>[envoy-gateway.yaml]"]
  node_infra_configs["Infrastructure resources"]
  node_issuers["Cluster issuers"]
  node_gateway_config["Gateway configuration<br/>[gateway.yaml]"]
end

node_git(("Configuration repository"))
node_flux["Flux controllers"]
node_helm_service["Helm chart service"]
node_oci_registry["OCI chart registry"]
node_kubernetes[("Kubernetes clusters")]
node_acme["Let's Encrypt API"]

node_git -->|"provides config"| node_staging_artifacts
node_git -->|"provides config"| node_production_artifacts
node_staging_artifacts -->|"splits artifacts"| node_staging_infra_sync
node_staging_artifacts -->|"splits artifacts"| node_staging_apps_sync
node_production_artifacts -->|"splits artifacts"| node_production_infra_sync
node_production_artifacts -->|"splits artifacts"| node_production_apps_sync
node_flux -->|"reconciles"| node_staging_infra_sync
node_flux -->|"reconciles"| node_production_infra_sync
node_flux -->|"reconciles"| node_staging_apps_sync
node_flux -->|"reconciles"| node_production_apps_sync
node_staging_infra_sync -->|"syncs"| node_infra_controllers
node_production_infra_sync -->|"syncs"| node_infra_controllers
node_staging_infra_sync -->|"syncs"| node_infra_configs
node_production_infra_sync -->|"syncs"| node_infra_configs
node_staging_infra_sync -->|"orders after controllers"| node_infra_configs
node_production_infra_sync -->|"orders after controllers"| node_infra_configs
node_staging_apps_sync -->|"syncs"| node_staging_overlay
node_production_apps_sync -->|"syncs"| node_production_overlay
node_staging_apps_sync -->|"waits for"| node_infra_configs
node_production_apps_sync -->|"waits for"| node_infra_configs
node_staging_overlay -->|"patches shared release"| node_base_app
node_staging_overlay -->|"applies values"| node_staging_values
node_production_overlay -->|"patches shared release"| node_base_app
node_production_overlay -->|"applies values"| node_production_values
node_base_app -->|"targets namespace"| node_app_namespace
node_base_app -->|"references chart source"| node_helm_repository
node_flux -->|"monitors versions"| node_helm_repository
node_flux -->|"installs and upgrades"| node_helm_service
node_cert_manager -->|"references chart source"| node_oci_registry
node_flux -->|"checks chart versions"| node_oci_registry
node_infra_configs -->|"includes resources"| node_issuers
node_infra_configs -->|"includes resources"| node_gateway_config
node_issuers -->|"requests certificates"| node_acme
node_staging_infra_sync -->|"applies resources"| node_kubernetes
node_production_infra_sync -->|"applies resources"| node_kubernetes
node_staging_apps_sync -->|"applies releases"| node_kubernetes
node_production_apps_sync -->|"applies releases"| node_kubernetes

click node_staging_artifacts "https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/clusters/staging/artifacts.yaml"
click node_production_artifacts "https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/clusters/production/artifacts.yaml"
click node_staging_infra_sync "https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/clusters/staging/infrastructure.yaml"
click node_production_infra_sync "https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/clusters/production/infrastructure.yaml"
click node_staging_apps_sync "https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/clusters/staging/apps.yaml"
click node_production_apps_sync "https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/clusters/production/apps.yaml"
click node_base_app "https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/apps/base/podinfo/release.yaml"
click node_app_namespace "https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/apps/base/podinfo/namespace.yaml"
click node_helm_repository "https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/apps/base/podinfo/repository.yaml"
click node_staging_overlay "https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/apps/staging/kustomization.yaml"
click node_staging_values "https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/apps/staging/podinfo-values.yaml"
click node_production_overlay "https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/apps/production/kustomization.yaml"
click node_production_values "https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/apps/production/podinfo-values.yaml"
click node_infra_controllers "https://github.com/fluxcd/flux2-kustomize-helm-example/tree/main/infrastructure/controllers"
click node_cert_manager "https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/infrastructure/controllers/cert-manager.yaml"
click node_envoy_gateway "https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/infrastructure/controllers/envoy-gateway.yaml"
click node_infra_configs "https://github.com/fluxcd/flux2-kustomize-helm-example/tree/main/infrastructure/configs"
click node_issuers "https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/infrastructure/configs/cluster-issuers.yaml"
click node_gateway_config "https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/infrastructure/configs/gateway.yaml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_staging_artifacts,node_production_artifacts,node_staging_infra_sync,node_production_infra_sync,node_staging_apps_sync,node_production_apps_sync toneBlue
class node_base_app,node_app_namespace,node_helm_repository,node_staging_overlay,node_staging_values,node_production_overlay,node_production_values,node_kubernetes toneAmber
class node_infra_controllers,node_cert_manager,node_envoy_gateway,node_infra_configs,node_issuers,node_gateway_config,node_acme toneMint
class node_git,node_flux,node_helm_service,node_oci_registry toneIndigo
```

## Components

### Cluster reconciliation

- [Staging artifacts](https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/clusters/staging/artifacts.yaml): `clusters/staging/artifacts.yaml`
- [Production artifacts](https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/clusters/production/artifacts.yaml): `clusters/production/artifacts.yaml`
- [Staging infrastructure sync](https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/clusters/staging/infrastructure.yaml): `clusters/staging/infrastructure.yaml`
- [Production infrastructure sync](https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/clusters/production/infrastructure.yaml): `clusters/production/infrastructure.yaml`
- [Staging apps sync](https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/clusters/staging/apps.yaml): `clusters/staging/apps.yaml`
- [Production apps sync](https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/clusters/production/apps.yaml): `clusters/production/apps.yaml`

### Podinfo applications

- [Shared Podinfo release](https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/apps/base/podinfo/release.yaml): `apps/base/podinfo/release.yaml`
- [Podinfo namespace](https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/apps/base/podinfo/namespace.yaml): `apps/base/podinfo/namespace.yaml`
- [Podinfo Helm repository](https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/apps/base/podinfo/repository.yaml): `apps/base/podinfo/repository.yaml`
- [Staging overlay](https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/apps/staging/kustomization.yaml): `apps/staging/kustomization.yaml`
- [Staging values](https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/apps/staging/podinfo-values.yaml): `apps/staging/podinfo-values.yaml`
- [Production overlay](https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/apps/production/kustomization.yaml): `apps/production/kustomization.yaml`
- [Production values](https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/apps/production/podinfo-values.yaml): `apps/production/podinfo-values.yaml`

### Infrastructure

- [Controller releases](https://github.com/fluxcd/flux2-kustomize-helm-example/tree/main/infrastructure/controllers): `infrastructure/controllers`
- [cert-manager release](https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/infrastructure/controllers/cert-manager.yaml): `infrastructure/controllers/cert-manager.yaml`
- [Envoy Gateway release](https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/infrastructure/controllers/envoy-gateway.yaml): `infrastructure/controllers/envoy-gateway.yaml`
- [Infrastructure resources](https://github.com/fluxcd/flux2-kustomize-helm-example/tree/main/infrastructure/configs): `infrastructure/configs`
- [Cluster issuers](https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/infrastructure/configs/cluster-issuers.yaml): `infrastructure/configs/cluster-issuers.yaml`
- [Gateway configuration](https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/infrastructure/configs/gateway.yaml): `infrastructure/configs/gateway.yaml`

### Other components

- **Configuration repository**
- **Flux controllers**
- **Helm chart service**
- **OCI chart registry**
- **Kubernetes clusters**
- **Let's Encrypt API**

## Connections

- Configuration repository → Staging artifacts: provides config (evidence: `README.md`)
- Configuration repository → Production artifacts: provides config (evidence: `README.md`)
- Staging artifacts → Staging infrastructure sync: splits artifacts (evidence: `README.md`)
- Staging artifacts → Staging apps sync: splits artifacts (evidence: `README.md`)
- Production artifacts → Production infrastructure sync: splits artifacts (evidence: `README.md`)
- Production artifacts → Production apps sync: splits artifacts (evidence: `README.md`)
- Flux controllers → Staging infrastructure sync: reconciles (evidence: `README.md`)
- Flux controllers → Production infrastructure sync: reconciles (evidence: `README.md`)
- Flux controllers → Staging apps sync: reconciles (evidence: `README.md`)
- Flux controllers → Production apps sync: reconciles (evidence: `README.md`)
- Staging infrastructure sync → Controller releases: syncs (evidence: `README.md`)
- Production infrastructure sync → Controller releases: syncs (evidence: `README.md`)
- Staging infrastructure sync → Infrastructure resources: syncs (evidence: `README.md`)
- Production infrastructure sync → Infrastructure resources: syncs (evidence: `README.md`)
- Staging infrastructure sync → Infrastructure resources: orders after controllers (evidence: `README.md`)
- Production infrastructure sync → Infrastructure resources: orders after controllers (evidence: `README.md`)
- Staging apps sync → Staging overlay: syncs (evidence: `README.md`)
- Production apps sync → Production overlay: syncs (evidence: `README.md`)
- Staging apps sync → Infrastructure resources: waits for (evidence: `README.md`)
- Production apps sync → Infrastructure resources: waits for (evidence: `README.md`)
- Staging overlay → Shared Podinfo release: patches shared release (evidence: `README.md`)
- Staging overlay → Staging values: applies values (evidence: `README.md`)
- Production overlay → Shared Podinfo release: patches shared release (evidence: `README.md`)
- Production overlay → Production values: applies values (evidence: `README.md`)
- Shared Podinfo release → Podinfo namespace: targets namespace (evidence: `README.md`)
- Shared Podinfo release → Podinfo Helm repository: references chart source (evidence: `README.md`)
- Flux controllers → Podinfo Helm repository: monitors versions (evidence: `README.md`)
- Flux controllers → Helm chart service: installs and upgrades (evidence: `README.md`)
- cert-manager release → OCI chart registry: references chart source (evidence: `README.md`)
- Flux controllers → OCI chart registry: checks chart versions (evidence: `README.md`)
- Infrastructure resources → Cluster issuers: includes resources (evidence: `README.md`)
- Infrastructure resources → Gateway configuration: includes resources (evidence: `README.md`)
- Cluster issuers → Let's Encrypt API: requests certificates (evidence: `README.md`)
- Staging infrastructure sync → Kubernetes clusters: applies resources (evidence: `README.md`)
- Production infrastructure sync → Kubernetes clusters: applies resources (evidence: `README.md`)
- Staging apps sync → Kubernetes clusters: applies releases (evidence: `README.md`)
- Production apps sync → Kubernetes clusters: applies releases (evidence: `README.md`)
