digopala commited on
Commit
0c544f6
·
verified ·
1 Parent(s): 5b1f64c

Upload 2 files

Browse files
Files changed (2) hide show
  1. hpa.yaml +28 -9
  2. preprocessor.yaml +44 -0
hpa.yaml CHANGED
@@ -6,13 +6,32 @@ spec:
6
  scaleTargetRef:
7
  apiVersion: apps/v1
8
  kind: Deployment
9
- name: triton-deployment
10
- minReplicas: 1
11
- maxReplicas: 5
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  metrics:
13
- - type: Resource
14
- resource:
15
- name: cpu
16
- target:
17
- type: Utilization
18
- averageUtilization: 70
 
 
 
 
 
 
 
6
  scaleTargetRef:
7
  apiVersion: apps/v1
8
  kind: Deployment
9
+ name: triton-deployment # must match the Deployment name in k8s.yaml
10
+ minReplicas: 2
11
+ maxReplicas: 10
12
+ behavior:
13
+ scaleUp:
14
+ stabilizationWindowSeconds: 30
15
+ policies:
16
+ - type: Percent
17
+ value: 100
18
+ periodSeconds: 60
19
+ scaleDown:
20
+ stabilizationWindowSeconds: 60
21
+ policies:
22
+ - type: Percent
23
+ value: 50
24
+ periodSeconds: 60
25
  metrics:
26
+ - type: Resource
27
+ resource:
28
+ name: cpu
29
+ target:
30
+ type: Utilization
31
+ averageUtilization: 60
32
+ - type: Resource
33
+ resource:
34
+ name: memory
35
+ target:
36
+ type: Utilization
37
+ averageUtilization: 70
preprocessor.yaml ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ apiVersion: apps/v1
2
+ kind: Deployment
3
+ metadata:
4
+ name: preprocessor
5
+ spec:
6
+ replicas: 2
7
+ selector:
8
+ matchLabels: { app: preprocessor }
9
+ template:
10
+ metadata:
11
+ labels: { app: preprocessor }
12
+ spec:
13
+ containers:
14
+ - name: preprocessor
15
+ image: yourrepo/preprocessor:latest # <-- replace with actual image
16
+ ports:
17
+ - containerPort: 8080
18
+ resources:
19
+ requests:
20
+ cpu: "200m"
21
+ memory: "256Mi"
22
+ limits:
23
+ cpu: "1"
24
+ memory: "512Mi"
25
+ readinessProbe:
26
+ httpGet: { path: /health, port: 8080 }
27
+ initialDelaySeconds: 5
28
+ periodSeconds: 5
29
+ livenessProbe:
30
+ httpGet: { path: /live, port: 8080 }
31
+ initialDelaySeconds: 10
32
+ periodSeconds: 10
33
+ ---
34
+ apiVersion: v1
35
+ kind: Service
36
+ metadata:
37
+ name: preprocessor-svc
38
+ spec:
39
+ selector: { app: preprocessor }
40
+ ports:
41
+ - name: http
42
+ port: 80
43
+ targetPort: 8080
44
+ type: ClusterIP