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
72 lines
1.5 KiB
YAML
72 lines
1.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: valkey
|
|
namespace: platform
|
|
labels:
|
|
app: valkey
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: valkey
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: valkey
|
|
spec:
|
|
containers:
|
|
- name: valkey
|
|
image: valkey/valkey:8.0-alpine
|
|
ports:
|
|
- containerPort: 6379
|
|
args:
|
|
- "--requirepass"
|
|
- "$(VALKEY_PASSWORD)"
|
|
- "--maxmemory"
|
|
- "256mb"
|
|
- "--maxmemory-policy"
|
|
- "allkeys-lru"
|
|
env:
|
|
- name: VALKEY_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: valkey-credentials
|
|
key: password
|
|
resources:
|
|
requests:
|
|
memory: 128Mi
|
|
cpu: 100m
|
|
limits:
|
|
memory: 512Mi
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: 6379
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: 6379
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 20
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /data
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: valkey-data
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: valkey-data
|
|
namespace: platform
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
storageClassName: longhorn
|
|
resources:
|
|
requests:
|
|
storage: 2Gi
|