How keremar/homelab-infrastructure works
Purpose and Entry Points
This repository is an operational blueprint for building and running a Kubernetes-based microservice platform, from Proxmox cluster provisioning through CI/CD, GitOps, and observability. The numbered directories define the intended execution order. Primary operator entry points are:
• 1-Bootstrap Cluster/1A-IMAGEBUILDER_CAPI_PROXMOX.md
• 3-Kubectl-Deploy/3B-Kubectl-Deploy.md
• 5-ArgoCD/5A-ArgoCD.md
1. Cluster Foundation
A Kubernetes cluster is bootstrapped on Proxmox using Cluster API/image-building guidance, with Calico providing the cluster network layer. This is the infrastructure boundary: subsequent manifests assume a functioning cluster, worker nodes, storage connectivity, and CNI.
• 1-Bootstrap Cluster/cluster.yaml
• 1-Bootstrap Cluster/calico.yaml
• 1-Bootstrap Cluster/1A-IMAGEBUILDER_CAPI_PROXMOX.md
2. External Traffic and Gateway Layer
MetalLB exposes LoadBalancer services on the local network, while NGINX Gateway Fabric implements Gateway API routing. A shared gateway is the north-south ingress boundary; application and platform UIs attach through HTTPRoute resources rather than application-specific ingress controllers.
• 2-MetalLB-NGINXGatewayFabric/metallb-config.yaml
• 2-MetalLB-NGINXGatewayFabric/shared-gateway.yaml
• 2-MetalLB-NGINXGatewayFabric/2A-MetalLB-NGINXGatewayFabric.md
3. Stateful Platform Storage and Workloads
Longhorn is configured as the persistent-storage provider. The deployed system consists of frontend, todo-service, and user-service workloads in staging and production, with per-service databases modeled as StatefulSets plus Services. This creates a service-to-database boundary and makes persistent volumes a cluster-level dependency.
• 3-Kubectl-Deploy/longhorn-storageclass.yaml
• 3-Kubectl-Deploy/production/todo-service/templates/database-statefulset.yaml
• 3-Kubectl-Deploy/production/user-service/templates/database-statefulset.yaml
4. Progressive Application Delivery
Applications are represented as Kubernetes workload templates with Argo Rollouts resources, stable/canary Services, and AnalysisTemplates. Traffic reaches the frontend through an HTTPRoute; internal service access is mediated through Kubernetes Services. Staging additionally contains config/hot-reload-related resources for the todo service.
• 6-Helm-Deploy/frontend/templates/rollout.yaml
• 6-Helm-Deploy/todo-service/templates/canary-service.yaml
• 6-Helm-Deploy/user-service/templates/analysistemplate.yaml
5. Deployment Packaging and Environment Boundary
The repository evolves from direct Kubernetes manifests under 3-Kubectl-Deploy to reusable Helm charts under 6-Helm-Deploy. Each application chart has common defaults and separate staging/production values, making environment configuration a values-level concern while preserving common templates.
• 6-Helm-Deploy/frontend/Chart.yaml
• 6-Helm-Deploy/todo-service/values-staging.yaml
• 6-Helm-Deploy/user-service/values-production.yaml
6. CI, Quality, and GitOps Control Plane
Jenkins supplies CI execution, including purpose-built Python-test and Kubernetes-tools images. SonarQube and Dependency-Track provide code-quality and dependency/security analysis services, backed by PostgreSQL/PVC configuration. Argo CD is the GitOps reconciliation boundary that can apply desired Helm/Kubernetes state to the cluster.
• 4-Jenkins-Setup/jenkins-values.yaml
• 4-Jenkins-Setup/sonarqube-values.yaml
• 5-ArgoCD/argocd-cmd-params-cm.yaml
7. Observability Data Plane
Grafana Alloy is configured as the telemetry collection/forwarding layer for metrics, logs, and traces. Prometheus, Elasticsearch/Kibana, Jaeger, and Grafana form the main observability services; PVCs and secrets identify persistence and credential boundaries. Dashboards provide operational views over cluster and microservice behavior.
• 7_Observability-Stack/metrics/alloy-metrics-config.yaml
• 7_Observability-Stack/logs/alloy-logs-config.yaml
• 7_Observability-Stack/traces/alloy-traces-config.yaml
Main entry points: cluster.yaml Kubernetes cluster · alloy-metrics-config.yaml Grafana Alloy · rollout.yaml Frontend rollout · database-statefulset.yaml Per-service databases
Components 19
Cluster Foundation
- Proxmox cluster bootstrap · Builds the Kubernetes cluster and worker foundation.
1-Bootstrap Cluster/1A-IMAGEBUILDER_CAPI_PROXMOX.md - Kubernetes cluster
1-Bootstrap Cluster/cluster.yaml - Calico
1-Bootstrap Cluster/calico.yaml - Longhorn storage
3-Kubectl-Deploy/longhorn-storageclass.yaml
Traffic Layer
- MetalLB
2-MetalLB-NGINXGatewayFabric/metallb-config.yaml - Shared gateway · North-south Gateway API boundary.
2-MetalLB-NGINXGatewayFabric/shared-gateway.yaml
Application Platform
- Frontend rollout · Receives external application traffic.
6-Helm-Deploy/frontend/templates/rollout.yaml - Todo service
6-Helm-Deploy/todo-service/templates/canary-service.yaml - User service · Uses rollout analysis during progressive delivery.
6-Helm-Deploy/user-service/templates/analysistemplate.yaml - Per-service databases · Todo and user services each retain persistent database state.
3-Kubectl-Deploy/production/todo-service/templates/database-statefulset.yaml
Delivery Control Plane
- Application Helm charts · Common workload templates replace direct manifest deployment.
6-Helm-Deploy/frontend/Chart.yaml - Staging and production values · Separates environment settings from shared templates.
6-Helm-Deploy/todo-service/values-staging.yaml - Jenkins
4-Jenkins-Setup/jenkins-values.yaml - Quality and dependency analysis · CI quality and dependency-security services use persistent backing storage.
4-Jenkins-Setup/sonarqube-values.yaml - Argo CD · Applies desired Helm and Kubernetes state to the cluster.
5-ArgoCD/argocd-cmd-params-cm.yaml
Observability
- Grafana Alloy · Collects and forwards metrics, logs, and traces.
7_Observability-Stack/metrics/alloy-metrics-config.yaml - Prometheus and Grafana
- Elasticsearch and Kibana
- Jaeger
Connections 19
- Proxmox cluster bootstrap → Kubernetes cluster: provisions
- Calico → Kubernetes cluster: networks
- Longhorn storage → Kubernetes cluster: provides PVCs
- MetalLB → Shared gateway: exposes
- Shared gateway → Frontend rollout: HTTPRoute traffic
- Frontend rollout → Todo service: internal service calls
- Frontend rollout → User service: internal service calls
- Todo service → Per-service databases: uses database service
- User service → Per-service databases: uses database service
- Longhorn storage → Per-service databases: persists volumes
- Staging and production values → Application Helm charts: configures
- Jenkins → Quality and dependency analysis: runs analysis
- Jenkins → Application Helm charts: builds and validates
- Argo CD → Application Helm charts: reconciles desired state
- Argo CD → Kubernetes cluster: deploys to
- Kubernetes cluster → Grafana Alloy: emits telemetry
- Grafana Alloy → Prometheus and Grafana: forwards metrics
- Grafana Alloy → Elasticsearch and Kibana: forwards logs
- Grafana Alloy → Jaeger: forwards traces