68 lines
1.5 KiB
YAML
68 lines
1.5 KiB
YAML
apiVersion: autoscaling/v2
|
|
kind: HorizontalPodAutoscaler
|
|
metadata:
|
|
name: lionsdev-client-hpa
|
|
namespace: lions-apps
|
|
labels:
|
|
app: lionsdev-client
|
|
app.kubernetes.io/name: lionsdev-client
|
|
app.kubernetes.io/part-of: lions-infrastructure
|
|
app.kubernetes.io/managed-by: lionsctl
|
|
spec:
|
|
scaleTargetRef:
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: lionsdev-client
|
|
minReplicas: 2
|
|
maxReplicas: 10
|
|
metrics:
|
|
- type: Resource
|
|
resource:
|
|
name: cpu
|
|
target:
|
|
type: Utilization
|
|
averageUtilization: 70
|
|
- type: Resource
|
|
resource:
|
|
name: memory
|
|
target:
|
|
type: Utilization
|
|
averageUtilization: 80
|
|
behavior:
|
|
scaleDown:
|
|
stabilizationWindowSeconds: 300
|
|
policies:
|
|
- type: Percent
|
|
value: 50
|
|
periodSeconds: 60
|
|
- type: Pods
|
|
value: 2
|
|
periodSeconds: 60
|
|
selectPolicy: Min
|
|
scaleUp:
|
|
stabilizationWindowSeconds: 60
|
|
policies:
|
|
- type: Percent
|
|
value: 100
|
|
periodSeconds: 30
|
|
- type: Pods
|
|
value: 4
|
|
periodSeconds: 30
|
|
selectPolicy: Max
|
|
---
|
|
apiVersion: policy/v1
|
|
kind: PodDisruptionBudget
|
|
metadata:
|
|
name: lionsdev-client-pdb
|
|
namespace: lions-apps
|
|
labels:
|
|
app: lionsdev-client
|
|
app.kubernetes.io/name: lionsdev-client
|
|
app.kubernetes.io/part-of: lions-infrastructure
|
|
app.kubernetes.io/managed-by: lionsctl
|
|
spec:
|
|
minAvailable: 1
|
|
selector:
|
|
matchLabels:
|
|
app: lionsdev-client
|