How krezh/dextek works
Project Type and Purpose
• This is a GitOps‑driven “home operations” repository. You manage multiple Kubernetes clusters (Talos‑provisioned), infrastructure components (IPXE, OpnSense, RouterOS), and applications via declarative manifests (Kustomize, Helm) in Git.
• FluxCD operators in each cluster reconcile the manifests. Terraform handles Talos OS provisioning and router/firewall infrastructure. GitHub Actions and Renovate automate CI/CD and dependency updates.
File‑Structure Analysis
• Top‑level concern separation:
• clusters/…: per‑cluster overlays (dextek, jotunheim, shared) with apps, namespaces, kustomizations
• infrastructure/…: IPXE build scripts, OpnSense/RouterOS configurations, Terraform modules
• .github/, Taskfile.yaml, .taskfiles/: CI/CD workflows (GitHub Actions), tasks (Taskfile)
• bootstrap/flux, clusters/*/bootstrap: initial Flux and Helmfile setups
• Each cluster dir contains:
• apps/: HelmRelease + Kustomize overlays for apps grouped by domain (auth, databases, network, monitoring, games, etc.)
• flux‑system/: Flux operator config (KustomizeController, HelmController, GitRepository, etc.)
• Shared components under clusters/shared/templates and clusters/shared/repositories for common Helm/chart definitions.
• Terraform in clusters/<cluster>/terraform and infrastructure/terraform drives Talos provisioning and router/firewall modules.
README Insights
• Badges confirm use of Kubernetes, Talos, Flux, Renovate.
• Highlights cluster age, uptime, node and pod counts—emphasizes full observability/monitoring.
a. Main Components
• GitHub Repository
• CI/CD Pipelines: GitHub Actions (workflows under .github/workflows), Renovate
• Terraform Service (CLI or GitHub Actions)
• FluxCD Operators in each cluster (KustomizeController, HelmController, NotificationController)
• Kubernetes Clusters (dextek, jotunheim) on Talos OS
• Infrastructure Hosts (PXE/IPXE builder, OpnSense Firewall, RouterOS)
• External Dependencies: Secret stores (Doppler, ExternalSecrets), Container registries (OCI, Helm repos)
b. Relationships and Data Flows
• Developer → GitHub Repo (push manifests, update kustomize overlays)
• GitHub Actions → run linting, tests, publish schema, optionally trigger Terraform/apply
• Renovate → open PRs for chart/terraform provider updates
• FluxCD in-cluster → polls GitHub repo → detects new commits → reconciles Kustomize & HelmRelease resources → Kubernetes API
• Terraform → provisions Talos control plane & worker machines, configures network infrastructure (OpnSense, RouterOS)
• ExternalSecrets Controller → fetches secrets from Doppler → injects into Kubernetes Secrets
c. Architectural Patterns
• GitOps: single source of truth in Git
• Declarative infra: Kustomize overlays and HelmRelease CRDs
• Multi‑cluster: per‑cluster overlays under clusters/<cluster>
• Modular reuse: shared templates and repositories
• Infrastructure as code: Terraform + Talos schema + Taskfile orchestration
d. Key Technologies
• FluxCD (GitRepository, KustomizationController, HelmRelease)
• Kustomize & Helm
• Terraform (with modules under infrastructure/terraform)
• Talos OS for Kubernetes nodes
• GitHub Actions & Renovate
• ExternalSecrets (Doppler provider)