# hidalgowhat/littlehomelab-infra architecture

> Architecture diagram of the GitHub repository hidalgowhat/littlehomelab-infra, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hidalgowhat/littlehomelab-infra
- Repository: https://github.com/hidalgowhat/littlehomelab-infra

## Overview

#### Purpose and Operating Model
This repository is GitOps desired state for a Raspberry Pi Kubernetes cluster. It defines cluster bootstrap resources, Argo CD application registrations, shared infrastructure configuration, and workload manifests. The primary operational entry point is the root Argo CD application at `bootstrap/root-app.yaml`.

#### Bootstrap and GitOps Control Plane
Bootstrap manifests establish the initial reconciliation chain:
- `bootstrap/root-app.yaml` is the root/app-of-apps entry point.
- `bootstrap/infra-argo-app.yaml` registers infrastructure management with Argo CD.
- `bootstrap/cluster-issuer.yaml` provides early certificate issuer setup.

Argo CD is expected to continuously pull this repository and apply the declared application hierarchy rather than workloads being deployed manually.

#### Argo CD Application Layer
`argocd-apps/` is the central orchestration boundary. Each Application points Argo CD at a repository subtree or external chart/source:
- `argocd-apps/argocd-config-app.yaml`
- `argocd-apps/cert-manager-app.yaml`
- `argocd-apps/cilium-infra-app.yaml`
- `argocd-apps/monitoring-stack-app.yaml`
- `argocd-apps/homepage.yaml`
- `argocd-apps/ping-app.yaml`

This separates application registration and sync policy from the Kubernetes manifests they reconcile.

#### Cluster Infrastructure
Infrastructure services provide shared networking and certificate capabilities before or alongside workloads:
- Certificate-manager configuration is declared in `infrastructure/cert-manager/placeholder` and applied through `argocd-apps/cert-manager-app.yaml`.
- Cilium network configuration defines cluster address allocation and L2 advertisement behavior in `infrastructure/cilium-configs/ippool.yaml` and `infrastructure/cilium-configs/l2policy.yaml`.
- Certificate issuance configuration is represented in `apps/cert-manager-configs/cluster-issuer.yaml`.

These resources form critical platform dependencies for ingress, service exposure, and TLS.

#### Workload Applications
Application manifests are grouped under `apps/`, with each group owning its Kubernetes resources:
- Homepage includes namespace, RBAC, ConfigMap, Deployment, Service, and Ingress: `apps/homepage/deployment.yaml`, `apps/homepage/service.yaml`, `apps/homepage/ingress.yaml`.
- Ping is a simple reachable workload with runtime configuration: `apps/ping/deployment.yaml`, `apps/ping/service.yaml`, `apps/ping/ping-ingress.yaml`.
- Monitoring contributes Grafana ingress configuration in `apps/monitoring/grafana-ingress.yaml`.
- Argo CD ingress is declared separately at `apps/argocd/ingress.yaml`.

#### Traffic and Certificate Flow
External traffic enters through Kubernetes Ingress resources, then routes to application Services and Deployments. Relevant ingress endpoints include `apps/homepage/ingress.yaml`, `apps/ping/ping-ingress.yaml`, and `apps/monitoring/grafana-ingress.yaml`. Cilium supplies network/L2 exposure policy, while cert-manager and the cluster issuer support TLS certificate provisioning for ingress consumers.

#### Reconciliation Flow and Boundaries
The primary control flow is: bootstrap manifests → root Argo CD application → child Application CRs in `argocd-apps/` → infrastructure or workload directory manifests. Infrastructure configuration is deliberately separated from workload definitions, while `apps/` groups workload-local Kubernetes objects. External runtime dependencies are Kubernetes, Argo CD, Cilium, cert-manager, and a monitoring stack with Grafana exposure.

Main entry points: [`apps/cert-manager-configs/cluster-issuer.yaml`](https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/cert-manager-configs/cluster-issuer.yaml) (Cluster Issuer Config), [`bootstrap/root-app.yaml`](https://github.com/hidalgowhat/littlehomelab-infra/blob/main/bootstrap/root-app.yaml) (Root Application), [`apps/homepage/ingress.yaml`](https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/homepage/ingress.yaml) (Homepage Ingress), [`apps/ping/ping-ingress.yaml`](https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/ping/ping-ingress.yaml) (Ping Ingress)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_bootstrap["Bootstrap"]
  node_root_app["Root Application<br/>Argo Application<br/>[root-app.yaml]"]
  node_infra_argo_app["Infrastructure Registration<br/>Argo Application"]
  node_bootstrap_issuer["Bootstrap Issuer<br/>ClusterIssuer"]
end

subgraph group_argo["Argo CD Control"]
  node_argocd{{"Argo CD<br/>GitOps controller"}}
  node_application_crs["Child Applications<br/>Argo Application CRs"]
end

subgraph group_platform["Shared Platform"]
  node_cilium_pool["Cilium IP Pool<br/>network config<br/>[ippool.yaml]"]
  node_cilium_l2["Cilium L2 Policy<br/>network config<br/>[l2policy.yaml]"]
  node_cert_manager["cert-manager Config<br/>platform manifests"]
  node_cluster_issuer["Cluster Issuer Config<br/>ClusterIssuer"]
end

subgraph group_workloads["Workloads"]
  node_homepage_ingress["Homepage Ingress<br/>[ingress.yaml]"]
  node_homepage_service["Homepage Service<br/>[service.yaml]"]
  node_homepage_deployment["Homepage Deployment<br/>[deployment.yaml]"]
  node_ping_ingress["Ping Ingress<br/>[ping-ingress.yaml]"]
  node_ping_service["Ping Service<br/>[service.yaml]"]
  node_ping_deployment["Ping Deployment<br/>[deployment.yaml]"]
  node_grafana_ingress["Grafana Ingress"]
  node_argocd_ingress["Argo CD Ingress<br/>[ingress.yaml]"]
end

node_kubernetes{{"Kubernetes Cluster<br/>runtime"}}

node_argocd -->|"reconciles"| node_root_app
node_root_app -->|"applies"| node_infra_argo_app
node_root_app -->|"registers"| node_application_crs
node_root_app -->|"applies"| node_bootstrap_issuer
node_application_crs -->|"syncs"| node_cert_manager
node_application_crs -->|"syncs"| node_cilium_pool
node_application_crs -->|"syncs"| node_cilium_l2
node_application_crs -->|"syncs"| node_cluster_issuer
node_application_crs -->|"syncs"| node_homepage_ingress
node_application_crs -->|"syncs"| node_ping_ingress
node_application_crs -->|"syncs"| node_grafana_ingress
node_application_crs -->|"syncs"| node_argocd_ingress
node_cilium_pool -->|"configures networking"| node_kubernetes
node_cilium_l2 -->|"configures exposure"| node_kubernetes
node_cert_manager -->|"provides controller"| node_cluster_issuer
node_cluster_issuer -.->|"provisions TLS"| node_homepage_ingress
node_cluster_issuer -.->|"provisions TLS"| node_ping_ingress
node_cluster_issuer -.->|"provisions TLS"| node_grafana_ingress
node_homepage_ingress -->|"routes to"| node_homepage_service
node_homepage_service -->|"selects"| node_homepage_deployment
node_ping_ingress -->|"routes to"| node_ping_service
node_ping_service -->|"selects"| node_ping_deployment
node_argocd_ingress -->|"exposes"| node_argocd

click node_root_app "https://github.com/hidalgowhat/littlehomelab-infra/blob/main/bootstrap/root-app.yaml"
click node_infra_argo_app "https://github.com/hidalgowhat/littlehomelab-infra/blob/main/bootstrap/infra-argo-app.yaml"
click node_bootstrap_issuer "https://github.com/hidalgowhat/littlehomelab-infra/blob/main/bootstrap/cluster-issuer.yaml"
click node_cilium_pool "https://github.com/hidalgowhat/littlehomelab-infra/blob/main/infrastructure/cilium-configs/ippool.yaml"
click node_cilium_l2 "https://github.com/hidalgowhat/littlehomelab-infra/blob/main/infrastructure/cilium-configs/l2policy.yaml"
click node_cert_manager "https://github.com/hidalgowhat/littlehomelab-infra/blob/main/infrastructure/cert-manager/placeholder"
click node_cluster_issuer "https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/cert-manager-configs/cluster-issuer.yaml"
click node_homepage_ingress "https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/homepage/ingress.yaml"
click node_homepage_service "https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/homepage/service.yaml"
click node_homepage_deployment "https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/homepage/deployment.yaml"
click node_ping_ingress "https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/ping/ping-ingress.yaml"
click node_ping_service "https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/ping/service.yaml"
click node_ping_deployment "https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/ping/deployment.yaml"
click node_grafana_ingress "https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/monitoring/grafana-ingress.yaml"
click node_argocd_ingress "https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/argocd/ingress.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_root_app,node_infra_argo_app,node_bootstrap_issuer toneBlue
class node_argocd,node_application_crs toneAmber
class node_cilium_pool,node_cilium_l2,node_cert_manager,node_cluster_issuer toneMint
class node_homepage_ingress,node_homepage_service,node_homepage_deployment,node_ping_ingress,node_ping_service,node_ping_deployment,node_grafana_ingress,node_argocd_ingress toneRose
class node_kubernetes toneNeutral
```

## Components

### Bootstrap

Initial GitOps resources.

- [Root Application](https://github.com/hidalgowhat/littlehomelab-infra/blob/main/bootstrap/root-app.yaml): Argo Application · App-of-apps reconciliation entry point. · `bootstrap/root-app.yaml`
- [Infrastructure Registration](https://github.com/hidalgowhat/littlehomelab-infra/blob/main/bootstrap/infra-argo-app.yaml): Argo Application · `bootstrap/infra-argo-app.yaml`
- [Bootstrap Issuer](https://github.com/hidalgowhat/littlehomelab-infra/blob/main/bootstrap/cluster-issuer.yaml): ClusterIssuer · Early certificate issuer setup. · `bootstrap/cluster-issuer.yaml`

### Argo CD Control

Application registration and reconciliation.

- **Argo CD**: GitOps controller · Continuously reconciles declared applications.
- **Child Applications**: Argo Application CRs · Registers platform and workload sync targets.

### Shared Platform

Networking and certificate capabilities.

- [Cilium IP Pool](https://github.com/hidalgowhat/littlehomelab-infra/blob/main/infrastructure/cilium-configs/ippool.yaml): network config · Defines cluster address allocation. · `infrastructure/cilium-configs/ippool.yaml`
- [Cilium L2 Policy](https://github.com/hidalgowhat/littlehomelab-infra/blob/main/infrastructure/cilium-configs/l2policy.yaml): network config · Advertises service addresses on the LAN. · `infrastructure/cilium-configs/l2policy.yaml`
- [cert-manager Config](https://github.com/hidalgowhat/littlehomelab-infra/blob/main/infrastructure/cert-manager/placeholder): platform manifests · `infrastructure/cert-manager/placeholder`
- [Cluster Issuer Config](https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/cert-manager-configs/cluster-issuer.yaml): ClusterIssuer · Certificate issuance configuration for ingress TLS. · `apps/cert-manager-configs/cluster-issuer.yaml`

### Workloads

Ingress-exposed application resources.

- [Homepage Ingress](https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/homepage/ingress.yaml): Ingress · `apps/homepage/ingress.yaml`
- [Homepage Service](https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/homepage/service.yaml): Service · `apps/homepage/service.yaml`
- [Homepage Deployment](https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/homepage/deployment.yaml): Deployment · `apps/homepage/deployment.yaml`
- [Ping Ingress](https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/ping/ping-ingress.yaml): Ingress · `apps/ping/ping-ingress.yaml`
- [Ping Service](https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/ping/service.yaml): Service · `apps/ping/service.yaml`
- [Ping Deployment](https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/ping/deployment.yaml): Deployment · `apps/ping/deployment.yaml`
- [Grafana Ingress](https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/monitoring/grafana-ingress.yaml): Ingress · Exposes the monitoring stack's Grafana endpoint. · `apps/monitoring/grafana-ingress.yaml`
- [Argo CD Ingress](https://github.com/hidalgowhat/littlehomelab-infra/blob/main/apps/argocd/ingress.yaml): Ingress · `apps/argocd/ingress.yaml`

### Other components

- **Kubernetes Cluster**: runtime

## Connections

- Argo CD → Root Application: reconciles
- Root Application → Infrastructure Registration: applies
- Root Application → Child Applications: registers
- Root Application → Bootstrap Issuer: applies
- Child Applications → cert-manager Config: syncs
- Child Applications → Cilium IP Pool: syncs
- Child Applications → Cilium L2 Policy: syncs
- Child Applications → Cluster Issuer Config: syncs
- Child Applications → Homepage Ingress: syncs
- Child Applications → Ping Ingress: syncs
- Child Applications → Grafana Ingress: syncs
- Child Applications → Argo CD Ingress: syncs
- Cilium IP Pool → Kubernetes Cluster: configures networking
- Cilium L2 Policy → Kubernetes Cluster: configures exposure
- cert-manager Config → Cluster Issuer Config: provides controller
- Cluster Issuer Config → Homepage Ingress: provisions TLS
- Cluster Issuer Config → Ping Ingress: provisions TLS
- Cluster Issuer Config → Grafana Ingress: provisions TLS
- Homepage Ingress → Homepage Service: routes to
- Homepage Service → Homepage Deployment: selects
- Ping Ingress → Ping Service: routes to
- Ping Service → Ping Deployment: selects
- Argo CD Ingress → Argo CD: exposes
