mirror of
https://github.com/luxfi/dex.git
synced 2026-10-30 14:45:46 +00:00
88 lines
1.7 KiB
YAML
88 lines
1.7 KiB
YAML
apiVersion: autoscaling/v2
|
|
kind: HorizontalPodAutoscaler
|
|
metadata:
|
|
name: lxdex-hpa
|
|
namespace: lxdex-production
|
|
spec:
|
|
scaleTargetRef:
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
name: lxdex-node
|
|
minReplicas: 3
|
|
maxReplicas: 9
|
|
metrics:
|
|
- type: Resource
|
|
resource:
|
|
name: cpu
|
|
target:
|
|
type: Utilization
|
|
averageUtilization: 70
|
|
- type: Resource
|
|
resource:
|
|
name: memory
|
|
target:
|
|
type: Utilization
|
|
averageUtilization: 80
|
|
- type: Pods
|
|
pods:
|
|
metric:
|
|
name: lx_orders_per_second
|
|
target:
|
|
type: AverageValue
|
|
averageValue: "1000000"
|
|
behavior:
|
|
scaleDown:
|
|
stabilizationWindowSeconds: 300
|
|
policies:
|
|
- type: Percent
|
|
value: 50
|
|
periodSeconds: 60
|
|
- type: Pods
|
|
value: 1
|
|
periodSeconds: 60
|
|
selectPolicy: Min
|
|
scaleUp:
|
|
stabilizationWindowSeconds: 60
|
|
policies:
|
|
- type: Percent
|
|
value: 100
|
|
periodSeconds: 30
|
|
- type: Pods
|
|
value: 3
|
|
periodSeconds: 30
|
|
selectPolicy: Max
|
|
---
|
|
apiVersion: policy/v1
|
|
kind: PodDisruptionBudget
|
|
metadata:
|
|
name: lxdex-pdb
|
|
namespace: lxdex-production
|
|
spec:
|
|
minAvailable: 2
|
|
selector:
|
|
matchLabels:
|
|
app: lxdex
|
|
component: node
|
|
---
|
|
apiVersion: autoscaling.k8s.io/v1
|
|
kind: VerticalPodAutoscaler
|
|
metadata:
|
|
name: lxdex-vpa
|
|
namespace: lxdex-production
|
|
spec:
|
|
targetRef:
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
name: lxdex-node
|
|
updatePolicy:
|
|
updateMode: "Auto"
|
|
resourcePolicy:
|
|
containerPolicies:
|
|
- containerName: lxdex
|
|
minAllowed:
|
|
cpu: 4
|
|
memory: 8Gi
|
|
maxAllowed:
|
|
cpu: 64
|
|
memory: 128Gi
|
|
controlledResources: ["cpu", "memory"] |