-
Notifications
You must be signed in to change notification settings - Fork 0
/
istio-hpa.yaml
45 lines (45 loc) · 1.22 KB
/
istio-hpa.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: productpage-obj-service
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: productpage-v1
minReplicas: 1
maxReplicas: 2
metrics:
- type: Object
object:
target:
kind: service
name: productpage
apiVersion: v1
metricName: istio_requests_per_min
targetValue: 100
#---
#apiVersion: autoscaling/v2beta1
#kind: HorizontalPodAutoscaler
#metadata:
# name: productpage-obj-annotation
# annotations:
# metric-config.object.istio-request-per-10min-count.prometheus/per-replica: 'true'
# metric-config.object.istio-request-per-min-count.prometheus/query: >-
# increase(istio_request_duration_milliseconds_count{destination_canonical_service="productpage",destination_canonical_revision="v1",response_code="200"}[1m])
#spec:
# scaleTargetRef:
# kind: Deployment
# name: productpage-v1
# apiVersion: apps/v1
# minReplicas: 1
# maxReplicas: 2
# metrics:
# - type: Object
# object:
# target:
# kind: Pod
# name: productpage-v1
# apiVersion: v1
# metricName: istio-request-per-min-count
# targetValue: '10'