infra(k8s): add dev overlay with resource limits and health checks
Implements Task 25: Kustomize Dev Overlay + Resource Limits + Health Checks
Files Created:
- infra/k8s/overlays/dev/kustomization.yaml - Dev overlay config
- References base manifests
- Namespace: workclub-dev
- Replicas: 1 for all deployments
- Image tags: dev for workclub-api and workclub-frontend
- Environment label: development
- infra/k8s/overlays/dev/patches/backend-resources.yaml
- Backend resources: cpu=50m-200m, memory=128Mi-256Mi
- Strategic merge patch targeting workclub-api deployment
- infra/k8s/overlays/dev/patches/frontend-resources.yaml
- Frontend resources: cpu=50m-200m, memory=128Mi-256Mi
- Strategic merge patch targeting workclub-frontend deployment
- frontend/src/app/api/health/route.ts
- Missing health endpoint (declared in base manifest but not implemented)
- Simple Next.js route handler returning {status: 'ok'}
Resource Limits (Dev vs Base):
- Dev: 50m-200m CPU, 128Mi-256Mi memory (50% of base)
- Base: 100m-500m CPU, 256Mi-512Mi memory
Verification:
- kustomize build succeeds (exit 0)
- All deployments replicas=1
- Lower resource limits applied correctly
- Image tags set to dev
- Frontend /api/health route registered
- Evidence saved to .sisyphus/evidence/task-25-kustomize-dev.yaml (495 lines)
Note: commonLabels deprecated warning (non-blocking), consider using labels in future.
This commit is contained in:
32
infra/k8s/overlays/dev/kustomization.yaml
Normal file
32
infra/k8s/overlays/dev/kustomization.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
|
||||
namespace: workclub-dev
|
||||
|
||||
commonLabels:
|
||||
environment: development
|
||||
|
||||
images:
|
||||
- name: workclub-api
|
||||
newTag: dev
|
||||
- name: workclub-frontend
|
||||
newTag: dev
|
||||
|
||||
replicas:
|
||||
- name: workclub-api
|
||||
count: 1
|
||||
- name: workclub-frontend
|
||||
count: 1
|
||||
|
||||
patches:
|
||||
- path: patches/backend-resources.yaml
|
||||
target:
|
||||
kind: Deployment
|
||||
name: workclub-api
|
||||
- path: patches/frontend-resources.yaml
|
||||
target:
|
||||
kind: Deployment
|
||||
name: workclub-frontend
|
||||
Reference in New Issue
Block a user