File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ func Run(kubeconfigPath string,
2121 scaleWindow time.Duration ,
2222 metricName string ,
2323 scaleThreshold int64 ,
24- metricsInterval time.Duration ) error {
24+ metricsInterval time.Duration ,
25+ metricsGroupKind string ) error {
2526 autoScalerOptions := scaler_types.AutoScalerOptions {
2627 Namespace : namespace ,
2728 ScaleInterval : scaleInterval ,
@@ -34,6 +35,7 @@ func Run(kubeconfigPath string,
3435 Namespace : namespace ,
3536 MetricName : metricName ,
3637 MetricInterval : metricsInterval ,
38+ GroupKind : metricsGroupKind ,
3739 }
3840
3941 pluginLoader , err := pluginloader .New ()
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ func main() {
1717 scaleInterval := flag .Duration ("scale-interval" , time .Minute , "Interval to call check scale function" )
1818 scaleWindow := flag .Duration ("scale-window" , time .Minute , "Time window after initial value to act upon" )
1919 metricsInterval := flag .Duration ("metrics-poll-interval" , time .Minute , "Interval to poll custom metrics" )
20+ metricsGroupKind := flag .String ("metrics-group-kind" , "" , "Metrics resource kind" )
2021 metricName := flag .String ("metric-name" , "" , "Metric name from custom metrics" )
2122 scaleThreshold := flag .Int64 ("scale-threshold" , 0 , "Maximum allowed value for metric to be considered below active" )
2223 flag .Parse ()
@@ -29,7 +30,8 @@ func main() {
2930 * scaleWindow ,
3031 * metricName ,
3132 * scaleThreshold ,
32- * metricsInterval ); err != nil {
33+ * metricsInterval ,
34+ * metricsGroupKind ); err != nil {
3335 errors .PrintErrorStack (os .Stderr , err , 5 )
3436
3537 os .Exit (1 )
You can’t perform that action at this time.
0 commit comments