github.com/gocrane/crane@v0.11.0/examples/autoscaling/effective-hpa.yaml (about) 1 apiVersion: autoscaling.crane.io/v1alpha1 2 kind: EffectiveHorizontalPodAutoscaler 3 metadata: 4 name: php-apache 5 spec: 6 # ScaleTargetRef is the reference to the workload that should be scaled. 7 scaleTargetRef: 8 apiVersion: apps/v1 9 kind: Deployment 10 name: php-apache 11 minReplicas: 1 # MinReplicas is the lower limit replicas to the scale target which the autoscaler can scale down to. 12 maxReplicas: 10 # MaxReplicas is the upper limit replicas to the scale target which the autoscaler can scale up to. 13 scaleStrategy: Auto # ScaleStrategy indicate the strategy to scaling target, value can be "Auto" and "Preview". 14 # Metrics contains the specifications for which to use to calculate the desired replica count. 15 metrics: 16 - type: Resource 17 resource: 18 name: cpu 19 target: 20 type: Utilization 21 averageUtilization: 50 22 # Prediction defines configurations for predict resources. 23 # If unspecified, defaults don't enable prediction. 24 prediction: 25 predictionWindowSeconds: 3600 # PredictionWindowSeconds is the time window to predict metrics in the future. 26 predictionAlgorithm: 27 algorithmType: dsp 28 dsp: 29 sampleInterval: "60s" 30 historyLength: "7d"