github.com/gocrane/crane@v0.11.0/examples/tsp-workload-dsp.yaml (about) 1 apiVersion: prediction.crane.io/v1alpha1 2 kind: TimeSeriesPrediction 3 metadata: 4 name: tsp-workload-dsp 5 namespace: default 6 spec: 7 targetRef: 8 apiVersion: apps/v1 9 kind: Deployment 10 name: dep-1-100m-500mib 11 namespace: default 12 predictionWindowSeconds: 3600 13 predictionMetrics: 14 - resourceIdentifier: workload-cpu 15 type: ExpressionQuery 16 expressionQuery: 17 expression: 'sum (irate (container_cpu_usage_seconds_total{container!="",image!="",container!="POD",pod=~"^dep-1-100m-500mib-.*$"}[1m]))' 18 algorithm: 19 algorithmType: "dsp" 20 dsp: 21 sampleInterval: "60s" 22 historyLength: "3d" 23 estimators: 24 fft: 25 - marginFraction: "0.2" 26 lowAmplitudeThreshold: "1.0" 27 highFrequencyThreshold: "0.05" 28 minNumOfSpectrumItems: 10 29 maxNumOfSpectrumItems: 20 30 - resourceIdentifier: workload-mem 31 type: ExpressionQuery 32 expressionQuery: 33 expression: 'sum(container_memory_working_set_bytes{container!="",image!="", container!="POD",pod=~"^dep-1-100m-500mib-.*$"})' 34 algorithm: 35 algorithmType: "dsp" 36 dsp: 37 sampleInterval: "60s" 38 historyLength: "3d" 39 estimators: 40 fft: 41 - marginFraction: "0.2" 42 lowAmplitudeThreshold: "1.0" 43 highFrequencyThreshold: "0.05" 44 minNumOfSpectrumItems: 10 45 maxNumOfSpectrumItems: 20