Files
telecom-platform/deployments/kubernetes/manifests/hpa.yaml
T
nutcas3 1887901d3c feat: Add carrier connector HorizontalPodAutoscaler with CPU and memory-based scaling
- Add carrier-connector-hpa HorizontalPodAutoscaler in telecom-platform namespace
- Add scaling configuration targeting carrier-connector Deployment (2-4 replicas)
- Add CPU metric with 70% average utilization threshold
- Add memory metric with 80% average utilization threshold
2026-04-25 05:35:05 +03:00

210 lines
4.0 KiB
YAML

---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: api-server-hpa
namespace: telecom-platform
labels:
app: api-server
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: api-server
minReplicas: 3
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: 10
periodSeconds: 60
scaleUp:
stabilizationWindowSeconds: 60
policies:
- type: Percent
value: 50
periodSeconds: 60
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: charging-engine-hpa
namespace: telecom-platform
labels:
app: charging-engine
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: charging-engine
minReplicas: 2
maxReplicas: 6
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 80
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: packet-gateway-hpa
namespace: telecom-platform
labels:
app: packet-gateway
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: packet-gateway
minReplicas: 2
maxReplicas: 4
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 75
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 85
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: web-dashboard-hpa
namespace: telecom-platform
labels:
app: web-dashboard
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: web-dashboard
minReplicas: 2
maxReplicas: 6
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 80
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: carrier-connector-hpa
namespace: telecom-platform
labels:
app: carrier-connector
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: carrier-connector
minReplicas: 2
maxReplicas: 4
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 80
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: prometheus-hpa
namespace: telecom-monitoring
labels:
app: prometheus
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: prometheus
minReplicas: 1
maxReplicas: 3
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 80
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 85
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: grafana-hpa
namespace: telecom-monitoring
labels:
app: grafana
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: grafana
minReplicas: 1
maxReplicas: 2
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 80