- Configure workspace Git repository with comprehensive .gitignore - Add Odoo as submodule for ERP reference code - Include documentation: SETUP.md, GIT-STRUCTURE.md - Add gitignore templates for projects (backend, frontend, database) - Structure supports independent repos per project/subproject level Workspace includes: - core/ - Reusable patterns, modules, orchestration system - projects/ - Active projects (erp-suite, gamilit, trading-platform, etc.) - knowledge-base/ - Reference code and patterns (includes Odoo submodule) - devtools/ - Development tools and templates - customers/ - Client implementations template 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
67 lines
1.8 KiB
YAML
67 lines
1.8 KiB
YAML
# =============================================================================
|
|
# GAMILIT Backend - Horizontal Pod Autoscaler
|
|
# =============================================================================
|
|
# Purpose: Automatically scale backend pods based on CPU/Memory usage
|
|
# Min Replicas: 3
|
|
# Max Replicas: 10
|
|
# Target CPU: 70%
|
|
# Target Memory: 80%
|
|
# =============================================================================
|
|
|
|
apiVersion: autoscaling/v2
|
|
kind: HorizontalPodAutoscaler
|
|
metadata:
|
|
name: gamilit-backend-hpa
|
|
namespace: gamilit-production
|
|
labels:
|
|
app: gamilit
|
|
component: backend
|
|
spec:
|
|
scaleTargetRef:
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: gamilit-backend
|
|
|
|
minReplicas: 3
|
|
maxReplicas: 10
|
|
|
|
metrics:
|
|
# CPU-based scaling
|
|
- type: Resource
|
|
resource:
|
|
name: cpu
|
|
target:
|
|
type: Utilization
|
|
averageUtilization: 70
|
|
|
|
# Memory-based scaling
|
|
- type: Resource
|
|
resource:
|
|
name: memory
|
|
target:
|
|
type: Utilization
|
|
averageUtilization: 80
|
|
|
|
behavior:
|
|
scaleDown:
|
|
stabilizationWindowSeconds: 300 # Wait 5 minutes before scaling down
|
|
policies:
|
|
- type: Percent
|
|
value: 50 # Scale down max 50% of pods at a time
|
|
periodSeconds: 60
|
|
- type: Pods
|
|
value: 1 # Or scale down max 1 pod at a time
|
|
periodSeconds: 60
|
|
selectPolicy: Min
|
|
|
|
scaleUp:
|
|
stabilizationWindowSeconds: 0 # Scale up immediately
|
|
policies:
|
|
- type: Percent
|
|
value: 100 # Scale up max 100% of pods at a time
|
|
periodSeconds: 30
|
|
- type: Pods
|
|
value: 2 # Or scale up max 2 pods at a time
|
|
periodSeconds: 30
|
|
selectPolicy: Max
|