File tree Expand file tree Collapse file tree 4 files changed +41
-0
lines changed Expand file tree Collapse file tree 4 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ ../web-hpa.yaml.erb
Original file line number Diff line number Diff line change 1+ ../web-hpa.yaml.erb
Original file line number Diff line number Diff line change 1+ apiVersion: autoscaling/v2
2+ kind: HorizontalPodAutoscaler
3+ metadata:
4+ name: web-hpa
5+ labels:
6+ app: web
7+ environment: <%= environment %>
8+ spec:
9+ scaleTargetRef:
10+ apiVersion: apps/v1
11+ kind: Deployment
12+ name: web
13+ minReplicas: 3
14+ maxReplicas: 10
15+ metrics:
16+ - type: Resource
17+ resource:
18+ name: cpu
19+ target:
20+ type: Utilization
21+ averageUtilization: 75
22+ behavior:
23+ scaleDown:
24+ stabilizationWindowSeconds: 300
25+ policies:
26+ - type: Percent
27+ value: 50
28+ periodSeconds: 60
29+ scaleUp:
30+ stabilizationWindowSeconds: 60
31+ policies:
32+ - type: Percent
33+ value: 100
34+ periodSeconds: 60
35+ - type: Pods
36+ value: 2
37+ periodSeconds: 60
38+ selectPolicy: Max
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ metadata:
55 annotations:
66 shipit.shopify.io/restart: 'true'
77spec:
8+ replicas: <%= environment == 'production' ? 3 : 2 %>
89 strategy:
910 type: RollingUpdate
1011 rollingUpdate:
You can’t perform that action at this time.
0 commit comments