Skip to content

Commit

Permalink
Remove option to specify an alternate metric name
Browse files Browse the repository at this point in the history
Signed-off-by: Ram Cohen <[email protected]>
  • Loading branch information
RamCohen committed Mar 1, 2022
1 parent 56d430f commit 1d44417
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pkg/scalers/gcp_storage_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,7 @@ func parseGcsMetadata(config *ScalerConfig) (*gcsMetadata, error) {
meta.gcpAuthorization = auth
}

var metricName = ""
if val, ok := config.TriggerMetadata["metricName"]; ok {
metricName = kedautil.NormalizeString(fmt.Sprintf("gcp-storage-%s", val))
} else {
metricName = kedautil.NormalizeString(fmt.Sprintf("gcp-storage-%s", meta.bucketName))
}

var metricName = kedautil.NormalizeString(fmt.Sprintf("gcp-storage-%s", meta.bucketName))
meta.metricName = GenerateMetricNameWithIndex(config.ScalerIndex, metricName)

return &meta, nil
Expand Down

0 comments on commit 1d44417

Please sign in to comment.