Skip to content

Commit

Permalink
incorporate recent changes
Browse files Browse the repository at this point in the history
Signed-off-by: Zbynek Roubalik <[email protected]>
  • Loading branch information
Zbynek Roubalik committed Oct 13, 2021
1 parent 5316b74 commit 65248cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/scalers/mysql_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func parseMySQLMetadata(config *ScalerConfig) (*mySQLMetadata, error) {
if meta.connectionString != "" {
meta.dbName = parseMySQLDbNameFromConnectionStr(meta.connectionString)
}
meta.metricName = kedautil.NormalizeString(fmt.Sprintf("mysql-%s", meta.dbName))
meta.metricName = GenerateMetricNameWithIndex(meta.scalerIndex, kedautil.NormalizeString(fmt.Sprintf("mysql-%s", meta.dbName)))

return &meta, nil
}
Expand Down Expand Up @@ -205,7 +205,7 @@ func (s *mySQLScaler) GetMetricSpecForScaling() []v2beta2.MetricSpec {

externalMetric := &v2beta2.ExternalMetricSource{
Metric: v2beta2.MetricIdentifier{
Name: GenerateMetricNameWithIndex(s.metadata.scalerIndex, s.metadata.metricName),
Name: s.metadata.metricName,
},
Target: v2beta2.MetricTarget{
Type: v2beta2.AverageValueMetricType,
Expand Down

0 comments on commit 65248cf

Please sign in to comment.