Skip to content

Commit

Permalink
Fix validation throwing url undefined error
Browse files Browse the repository at this point in the history
  • Loading branch information
eliihen committed Dec 10, 2024
1 parent 3c9c72e commit c67b315
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ cluster_metrics "feature" {
{{- if eq $destinationName $.Values.clusterMetrics.opencost.metricsSource }}
{{- $destinationFound = true }}
{{- $destination := index $.Values.destinations $index }}
{{- $destinationUrl := $destination.url }}
{{- $destinationUrl := $destination.url | default $destination.fromUrl | default "" }}
{{- $openCostMetricsUrl := $destinationUrl }}
{{- if regexMatch "/api/prom/push" $destinationUrl }}
{{- $openCostMetricsUrl = (regexReplaceAll "^(.*)/api/prom/push$" $destinationUrl "${1}/api/prom") }}
Expand Down

0 comments on commit c67b315

Please sign in to comment.