Turborepo + pnpm monorepo for k3s homelab cluster on Intel NUCs. - Apps: Next.js web frontend, Express API (TypeScript, Dockerfiles, k8s manifests) - Packages: shared UI, ESLint config, TypeScript config, Drizzle DB schemas - Infra/Ansible: bare-metal provisioning with roles for common, k3s-server, k3s-agent, hardening - Infra/Kubernetes: ArgoCD GitOps (app-of-apps + ApplicationSets), platform components (cert-manager, Traefik, CloudNativePG, Valkey, Longhorn, Sealed Secrets), namespaces - Observability: kube-prometheus-stack, Loki, Promtail as ArgoCD Applications - CI/CD: GitHub Actions for PR builds, preview deploys, production deploys - DX: Taskfile, utility scripts, copier templates, Ubiquiti network docs
46 lines
1.0 KiB
YAML
46 lines
1.0 KiB
YAML
# Prerequisites: CloudNativePG operator must be installed first.
|
|
# Install: helm install cnpg cloudnative-pg/cloudnative-pg --namespace cnpg-system --create-namespace
|
|
---
|
|
apiVersion: postgresql.cnpg.io/v1
|
|
kind: Cluster
|
|
metadata:
|
|
name: homelab-pg
|
|
namespace: platform
|
|
spec:
|
|
instances: 2
|
|
primaryUpdateStrategy: unsupervised
|
|
|
|
storage:
|
|
storageClass: longhorn
|
|
size: 10Gi
|
|
|
|
postgresql:
|
|
parameters:
|
|
max_connections: "100"
|
|
shared_buffers: 256MB
|
|
effective_cache_size: 512MB
|
|
work_mem: 4MB
|
|
|
|
bootstrap:
|
|
initdb:
|
|
database: homelab
|
|
owner: homelab
|
|
secret:
|
|
name: homelab-pg-credentials
|
|
|
|
backup:
|
|
barmanObjectStore:
|
|
destinationPath: s3://homelab-pg-backups/
|
|
endpointURL: http://minio.platform.svc:9000
|
|
s3Credentials:
|
|
accessKeyId:
|
|
name: pg-backup-s3-credentials
|
|
key: ACCESS_KEY_ID
|
|
secretAccessKey:
|
|
name: pg-backup-s3-credentials
|
|
key: SECRET_ACCESS_KEY
|
|
retentionPolicy: "30d"
|
|
|
|
monitoring:
|
|
enablePodMonitor: true
|