--- 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