# ssri7774/homelab architecture

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

- Interactive diagram: https://gitdiagram.com/ssri7774/homelab
- Repository: https://github.com/ssri7774/homelab

## Overview

This repository is GitOps configuration for a hybrid K3s homelab, rather than an application codebase. Its principal workflow is Flux reconciling repository manifests into the cluster; Terraform also provisions cluster components. The documented security flow stores credentials in Vault and uses External Secrets Operator (ESO) to inject them into the cluster. The tree shows configured applications and infrastructure, but no source excerpts were supplied, so edges are limited to relationships stated in the README; the Forgejo service itself is not present in the tree.

Main entry points: [`apps/external-secrets/helmrelease.yaml`](https://github.com/ssri7774/homelab/blob/main/apps/external-secrets/helmrelease.yaml) (External Secrets), [`apps/kustomization.yaml`](https://github.com/ssri7774/homelab/blob/main/apps/kustomization.yaml) (Cluster manifests), [`cluster/flux-system/gotk-sync.yaml`](https://github.com/ssri7774/homelab/blob/main/cluster/flux-system/gotk-sync.yaml) (FluxCD), [`infrastructure/terraform`](https://github.com/ssri7774/homelab/tree/main/infrastructure/terraform) (Terraform provisioning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gitops["GitOps platform"]
  node_flux["FluxCD<br/>[gotk-sync.yaml]"]
  node_clusterconfig["Cluster manifests<br/>[kustomization.yaml]"]
  node_terraform["Terraform provisioning"]
  node_cluster{{"K3s cluster"}}
  node_physical["Physical control plane"]
  node_workers["NAS worker VMs"]
end

subgraph group_network["Networking"]
  node_technitium["Technitium DNS<br/>[deployment.yaml]"]
  node_traefik["Traefik ingress"]
end

subgraph group_security["Secrets and identity"]
  node_vault[("HashiCorp Vault<br/>[helmrelease.yaml]")]
  node_eso["External Secrets<br/>[helmrelease.yaml]"]
end

subgraph group_workloads["Applications and data"]
  node_n8n["n8n automation<br/>[helmrelease.yaml]"]
  node_marga["Marga service<br/>[deployment.yaml]"]
  node_zitadel["Zitadel identity<br/>[helmrelease.yaml]"]
  node_postgres[("PostgreSQL clusters")]
  node_milvus[("Milvus service<br/>[milvus.yaml]")]
  node_rabbitmq["RabbitMQ service<br/>[rabbitmq.yaml]"]
end

subgraph group_operations["Operations"]
  node_monitoring["Monitoring stack<br/>[helmrelease.yaml]"]
  node_backup["Backup jobs"]
end

node_operator(("Cluster operator"))

node_operator -->|"maintains"| node_clusterconfig
node_flux -->|"reconciles"| node_clusterconfig
node_terraform -->|"provisions"| node_cluster
node_physical -->|"hosts control plane"| node_cluster
node_workers -->|"hosts workers"| node_cluster
node_vault -->|"supplies secrets"| node_eso
node_eso -->|"injects secrets"| node_cluster
node_cluster -->|"runs"| node_technitium
node_cluster -->|"runs"| node_traefik
node_cluster -->|"runs"| node_n8n
node_cluster -->|"runs"| node_marga
node_cluster -->|"runs"| node_zitadel
node_cluster -->|"runs"| node_postgres
node_cluster -->|"runs"| node_milvus
node_cluster -->|"runs"| node_rabbitmq
node_cluster -->|"runs"| node_monitoring
node_cluster -->|"runs"| node_backup

click node_flux "https://github.com/ssri7774/homelab/blob/main/cluster/flux-system/gotk-sync.yaml"
click node_clusterconfig "https://github.com/ssri7774/homelab/blob/main/apps/kustomization.yaml"
click node_terraform "https://github.com/ssri7774/homelab/tree/main/infrastructure/terraform"
click node_technitium "https://github.com/ssri7774/homelab/blob/main/apps/technitium/deployment.yaml"
click node_traefik "https://github.com/ssri7774/homelab/blob/main/apps/monitoring/traefik-servicemonitor.yaml"
click node_vault "https://github.com/ssri7774/homelab/blob/main/apps/vault/helmrelease.yaml"
click node_eso "https://github.com/ssri7774/homelab/blob/main/apps/external-secrets/helmrelease.yaml"
click node_n8n "https://github.com/ssri7774/homelab/blob/main/apps/n8n/helmrelease.yaml"
click node_marga "https://github.com/ssri7774/homelab/blob/main/apps/marga/deployment.yaml"
click node_zitadel "https://github.com/ssri7774/homelab/blob/main/apps/zitadel/helmrelease.yaml"
click node_postgres "https://github.com/ssri7774/homelab/blob/main/apps/marga/postgres-cluster.yaml"
click node_milvus "https://github.com/ssri7774/homelab/blob/main/apps/milvus/milvus.yaml"
click node_rabbitmq "https://github.com/ssri7774/homelab/blob/main/apps/rabbitmq/rabbitmq.yaml"
click node_monitoring "https://github.com/ssri7774/homelab/blob/main/apps/monitoring/helmrelease.yaml"
click node_backup "https://github.com/ssri7774/homelab/blob/main/apps/marga-backup/cronjob-offsite.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_flux,node_clusterconfig,node_terraform,node_cluster,node_physical,node_workers toneBlue
class node_technitium,node_traefik toneAmber
class node_vault,node_eso toneMint
class node_n8n,node_marga,node_zitadel,node_postgres,node_milvus,node_rabbitmq toneRose
class node_monitoring,node_backup,node_operator toneIndigo
```

## Components

### GitOps platform

- [FluxCD](https://github.com/ssri7774/homelab/blob/main/cluster/flux-system/gotk-sync.yaml): `cluster/flux-system/gotk-sync.yaml`
- [Cluster manifests](https://github.com/ssri7774/homelab/blob/main/apps/kustomization.yaml): `apps/kustomization.yaml`
- [Terraform provisioning](https://github.com/ssri7774/homelab/tree/main/infrastructure/terraform): `infrastructure/terraform`
- **K3s cluster**
- **Physical control plane**
- **NAS worker VMs**

### Networking

- [Technitium DNS](https://github.com/ssri7774/homelab/blob/main/apps/technitium/deployment.yaml): `apps/technitium/deployment.yaml`
- [Traefik ingress](https://github.com/ssri7774/homelab/blob/main/apps/monitoring/traefik-servicemonitor.yaml): `apps/monitoring/traefik-servicemonitor.yaml`

### Secrets and identity

- [HashiCorp Vault](https://github.com/ssri7774/homelab/blob/main/apps/vault/helmrelease.yaml): `apps/vault/helmrelease.yaml`
- [External Secrets](https://github.com/ssri7774/homelab/blob/main/apps/external-secrets/helmrelease.yaml): `apps/external-secrets/helmrelease.yaml`

### Applications and data

- [n8n automation](https://github.com/ssri7774/homelab/blob/main/apps/n8n/helmrelease.yaml): `apps/n8n/helmrelease.yaml`
- [Marga service](https://github.com/ssri7774/homelab/blob/main/apps/marga/deployment.yaml): `apps/marga/deployment.yaml`
- [Zitadel identity](https://github.com/ssri7774/homelab/blob/main/apps/zitadel/helmrelease.yaml): `apps/zitadel/helmrelease.yaml`
- [PostgreSQL clusters](https://github.com/ssri7774/homelab/blob/main/apps/marga/postgres-cluster.yaml): `apps/marga/postgres-cluster.yaml`
- [Milvus service](https://github.com/ssri7774/homelab/blob/main/apps/milvus/milvus.yaml): `apps/milvus/milvus.yaml`
- [RabbitMQ service](https://github.com/ssri7774/homelab/blob/main/apps/rabbitmq/rabbitmq.yaml): `apps/rabbitmq/rabbitmq.yaml`

### Operations

- [Monitoring stack](https://github.com/ssri7774/homelab/blob/main/apps/monitoring/helmrelease.yaml): `apps/monitoring/helmrelease.yaml`
- [Backup jobs](https://github.com/ssri7774/homelab/blob/main/apps/marga-backup/cronjob-offsite.yaml): `apps/marga-backup/cronjob-offsite.yaml`

### Other components

- **Cluster operator**

## Connections

- Cluster operator → Cluster manifests: maintains (evidence: `README.md`)
- FluxCD → Cluster manifests: reconciles (evidence: `README.md`)
- Terraform provisioning → K3s cluster: provisions (evidence: `README.md`)
- Physical control plane → K3s cluster: hosts control plane (evidence: `README.md`)
- NAS worker VMs → K3s cluster: hosts workers (evidence: `README.md`)
- HashiCorp Vault → External Secrets: supplies secrets (evidence: `README.md`)
- External Secrets → K3s cluster: injects secrets (evidence: `README.md`)
- K3s cluster → Technitium DNS: runs (evidence: `README.md`)
- K3s cluster → Traefik ingress: runs (evidence: `README.md`)
- K3s cluster → n8n automation: runs (evidence: `README.md`)
- K3s cluster → Marga service: runs (evidence: `README.md`)
- K3s cluster → Zitadel identity: runs (evidence: `README.md`)
- K3s cluster → PostgreSQL clusters: runs (evidence: `README.md`)
- K3s cluster → Milvus service: runs (evidence: `README.md`)
- K3s cluster → RabbitMQ service: runs (evidence: `README.md`)
- K3s cluster → Monitoring stack: runs (evidence: `README.md`)
- K3s cluster → Backup jobs: runs (evidence: `README.md`)
