Files
ljwx-deploy/apps/ljwx-health/base/hpa.yaml
T

66 lines
1.3 KiB
YAML

apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: ljwx-boot
namespace: ljwx-health
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: ljwx-boot
minReplicas: 2
maxReplicas: 4
behavior:
scaleUp:
stabilizationWindowSeconds: 60
policies:
- type: Pods
value: 1
periodSeconds: 60
scaleDown:
stabilizationWindowSeconds: 300
policies:
- type: Percent
value: 25
periodSeconds: 60
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: ljwx-admin
namespace: ljwx-health
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: ljwx-admin
minReplicas: 2
maxReplicas: 4
behavior:
scaleUp:
stabilizationWindowSeconds: 60
policies:
- type: Pods
value: 1
periodSeconds: 60
scaleDown:
stabilizationWindowSeconds: 300
policies:
- type: Percent
value: 25
periodSeconds: 60
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70