Skip to content

Commit

Permalink
Remove some prometheus const
Browse files Browse the repository at this point in the history
Signed-off-by: Rick Brouwer <[email protected]>
  • Loading branch information
rickbrouwer committed Oct 23, 2024
1 parent 064838e commit aca6cd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
4 changes: 4 additions & 0 deletions pkg/scalers/loki_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ func parseLokiMetadata(config *scalersconfig.ScalerConfig) (lokiMetadata, error)
return meta, fmt.Errorf("error parsing loki metadata: %w", err)
}

if config.AsMetricSource {
meta.Threshold = 0
}

auth, err := authentication.GetAuthConfigs(config.TriggerMetadata, config.AuthParams)
if err != nil {
return meta, err
Expand Down
12 changes: 0 additions & 12 deletions pkg/scalers/prometheus_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,6 @@ import (
kedautil "github.com/kedacore/keda/v2/pkg/util"
)

const (
promServerAddress = "serverAddress"
promQuery = "query"
promQueryParameters = "queryParameters"
promThreshold = "threshold"
promActivationThreshold = "activationThreshold"
promNamespace = "namespace"
promCustomHeaders = "customHeaders"
ignoreNullValues = "ignoreNullValues"
unsafeSsl = "unsafeSsl"
)

type prometheusScaler struct {
metricType v2.MetricTargetType
metadata *prometheusMetadata
Expand Down

0 comments on commit aca6cd4

Please sign in to comment.