Upload 2 files
Browse files- hpa.yaml +28 -9
- 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:
|
11 |
-
maxReplicas:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
metrics:
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|