A GitOps repository for a home-lab Kubernetes cluster on Fedora server managed with Flux v2. The cluster is a single-node control-plane+worker running on a small business server. Storage uses local host-path PVs mapped to three HDD mount points (/media/main, /media/backup, /media/yasr). The domain dumbhome.uk routes to the cluster via Cloudflare DNS and NGINX Ingress with cert-manager (Let’s Encrypt + Cloudflare DNS-01).
Node version (build scripts): v24 (.nvmrc)
Language
Key Concepts
Term
Definition
Aliases to avoid
YASR
Yet Another Storage Repository — the /media/yasr volume where all application configs are stored via subPaths
main-volume
The 4Ti HDD at /media/main housing user data (photos, media, documents)
backup-volume
The 4Ti HDD at /media/backup used as rdiff-backup destination for incremental backups
Flux Kustomization
A kustomize.toolkit.fluxcd.io/v1.Kustomization that tells Flux which directory to sync and apply
Kustomization
HelmRelease
A helm.toolkit.fluxcd.io/v2.HelmRelease wrapping a Helm chart installation via Flux
Generic overlay
The apps/generic/base/ + apps/generic/overlays/<app>/patches/ Kustomize pattern for custom (non-Helm) apps
Sealed Secret
A SealedSecret resource encrypted by kubeseal; the cluster’s SealedSecretsController decrypts it to a plain Secret
Reflector
The emberstack/reflector add-on that auto-mirrors Secrets across namespaces via annotations
Cluster config
A per-user directory under clusters/<username>/ containing ClusterKustomization.yaml, secrets.env, and sealed-secret/
Hostpath Provisioner
kubevirt/hostpath-provisioner DaemonSet that dynamically provisions local PVs from StorageClass: hostpath
book-ingest
Copy-only CronJob that submits book .torrent files to Transmission and imports completed supported files into Audiobookshelf
Torrent inbox
YASR-backed drop folder at /media/yasr/configs/book-ingest/inbox mounted into book-ingest as /inbox
_needs-review
Audiobookshelf review folder at /media/main/public/Books/_needs-review for imports whose author/book layout is uncertain
CNPG
CloudNative PostgreSQL operator — manages PostgreSQL clusters via postgresql.cnpg.io/v1.Cluster resources
Forecastle
Service discovery dashboard (stakater/Forecastle) that lists apps via ingress annotations
ACME
Let’s Encrypt certificate issuance; this cluster uses DNS-01 via Cloudflare API
Key Files
Entry Points
File
Purpose
clusters/<user>/ClusterKustomization.yaml
Root Flux Kustomization per cluster; pulls everything else via path:
infrastructure/kube-system/
Bulk of core infra Flux Kustomization manifests (Storage, Monitoring, IngressNginx, CertManagerKustomization, etc.)
infrastructure/setup/install-flux.sh
Bootstraps a new cluster: installs Flux, Sealed Secrets, GitRepo source, and runs configure-cluster
infrastructure/setup/configure-cluster.sh
Encrypts secrets.env → SealedSecret and generates per-app value secrets
containers/container-build.js
Orchestrates podman multi-arch builds for all custom containers
apps/generic/base/
Reusable base Deployment + Service + Ingress for custom apps
Config Files
File
Purpose
AGENTS.md
Master agent instructions for AI coding assistants
_config.yml
Jekyll config for GitHub Pages documentation site
.husky/pre-commit
Husky git hook that runs scripts/pre-commit.js on every commit
book-ingest is a clusters/gandazgul/apps/BookIngestCronJob.yaml instance that runs every 10 minutes, submits top-level .torrent files from the torrent inbox to Transmission with download-dir=/data/books, and then copy-only imports completed supported ebook/audio/video files from the YASR Transmission books source into Audiobookshelf’s Books library. It must not stop, remove, move, or clean up Transmission torrents so seeding can continue. Metadata and conservative folder-name heuristics route confident imports to Author/Book/; uncertain imports go under _needs-review/<torrent-or-folder>. Compressed archives are logged and ignored, not extracted.
Storage Convention
All app configs use the yasr-volume PVC (/media/yasr) with a unique subPath: configs/<app>/
User data uses main-volume PVC (/media/main) with appropriate subPath
Backup targets use backup-volume PVC (/media/backup)
PVs are declared in infrastructure/storage/pv/pv.yaml (templated via Flux substitution)
PVCs in infrastructure/storage/pvc/pvc.yaml (same template)
StorageClass: hdd maps to the hostpath-provisioner
book-ingest uses YASR subPaths for /inbox (configs/book-ingest/inbox), /state (configs/book-ingest/state), and /transmission (configs/transmission/, where /transmission/books corresponds to Transmission’s /data/books). Its Audiobookshelf destination is main-volumesubPath: public/Books mounted as /books.
Secrets Management
Raw secrets in clusters/<user>/secrets.env — gitignored
Run infrastructure/setup/configure-cluster.sh to regenerate SealedSecret.yaml from secrets.env
SealedSecrets use reflector annotations to auto-mirror to default and monitoring namespaces
App-specific value files go in clusters/<user>/apps/values/*.yaml and are converted to Secrets
Apps reference secrets via valuesFrom (HelmRelease) or postBuild.substituteFrom (Kustomization)
Pre-commit hooks (JS-native via husky): trailing-whitespace, end-of-file-fixer, check-added-large-files — see scripts/pre-commit.js
yamllint for manual YAML validation
kubectl apply --dry-run=client -f <file> for manifest validation
kustomize build <dir> for overlay validation
No automated unit/integration test suite exists
Multi-Cluster Support
Three cluster configs: gandazgul (primary), rafag (family), renepor (family)
Each has its own secrets.env, SealedSecret, and ClusterKustomization.yaml with per-cluster substitutions (PHOTOS_PATH, PHOTOS_UID/GID, BITWARDEN_SUBDOMAIN, etc.)
Shared infrastructure in infrastructure/ is cluster-agnostic
Domain Terminology Conventions
CLUSTER_DOMAIN_NAME — the base domain (typically dumbhome.uk)
CLUSTER_NAME — the name of this specific K8s cluster (e.g., gandazgul)
CONTROL_PLANE_IP / CONTROL_PLANE_NAME — auto-detected during install-flux.sh
KUBECTX_NAME — kubectx context name for the cluster (e.g., home)
DYN_DNS_NAME — the dynamic DNS hostname for external access