apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: api-server-hpa namespace: telecom-platform labels: app.kubernetes.io/name: api-server-hpa app.kubernetes.io/component: autoscaling app.kubernetes.io/part-of: telecom-platform spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: api-server 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 - type: Pods pods: metric: name: http_requests_per_second target: type: AverageValue averageValue: "100" - type: Object object: metric: name: queue_messages describedObject: apiVersion: v1 kind: Service name: api-server target: type: Value value: "1000" behavior: scaleDown: stabilizationWindowSeconds: 300 policies: - type: Percent value: 10 periodSeconds: 60 - type: Pods value: 2 periodSeconds: 60 selectPolicy: Min scaleUp: stabilizationWindowSeconds: 60 policies: - type: Percent value: 50 periodSeconds: 60 - type: Pods value: 4 periodSeconds: 60 selectPolicy: Max --- apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: charging-engine-hpa namespace: telecom-platform labels: app.kubernetes.io/name: charging-engine-hpa app.kubernetes.io/component: autoscaling app.kubernetes.io/part-of: telecom-platform spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: charging-engine minReplicas: 2 maxReplicas: 8 metrics: - type: Resource resource: name: cpu target: type: Utilization averageUtilization: 75 - type: Resource resource: name: memory target: type: Utilization averageUtilization: 85 - type: Pods pods: metric: name: billing_events_per_second target: type: AverageValue averageValue: "50" behavior: scaleDown: stabilizationWindowSeconds: 300 policies: - type: Percent value: 10 periodSeconds: 60 scaleUp: stabilizationWindowSeconds: 60 policies: - type: Percent value: 100 periodSeconds: 60 --- apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: packet-gateway-hpa namespace: telecom-platform labels: app.kubernetes.io/name: packet-gateway-hpa app.kubernetes.io/component: autoscaling app.kubernetes.io/part-of: telecom-platform spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: packet-gateway minReplicas: 2 maxReplicas: 12 metrics: - type: Resource resource: name: cpu target: type: Utilization averageUtilization: 60 - type: Resource resource: name: memory target: type: Utilization averageUtilization: 75 - type: Pods pods: metric: name: packets_per_second target: type: AverageValue averageValue: "1000" behavior: scaleDown: stabilizationWindowSeconds: 300 policies: - type: Percent value: 15 periodSeconds: 60 scaleUp: stabilizationWindowSeconds: 30 policies: - type: Percent value: 200 periodSeconds: 60 --- apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: web-dashboard-hpa namespace: telecom-platform labels: app.kubernetes.io/name: web-dashboard-hpa app.kubernetes.io/component: autoscaling app.kubernetes.io/part-of: telecom-platform spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: web-dashboard minReplicas: 1 maxReplicas: 6 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: active_sessions target: type: AverageValue averageValue: "50" behavior: scaleDown: stabilizationWindowSeconds: 300 policies: - type: Percent value: 20 periodSeconds: 60 scaleUp: stabilizationWindowSeconds: 60 policies: - type: Percent value: 100 periodSeconds: 60