Skip to content

Commit

Permalink
[stable/grafana] Fix sed replacing special sources (helm#22960)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Voronkov <[email protected]>
  • Loading branch information
Antiarchitect authored and includerandom committed Jul 19, 2020
1 parent 452e0e2 commit 8c1268f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stable/grafana/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: grafana
version: 5.3.1
version: 5.3.2
appVersion: 7.0.3
kubeVersion: "^1.8.0-0"
description: The leading tool for querying and visualizing time series and metrics.
Expand Down
2 changes: 1 addition & 1 deletion stable/grafana/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ data:
-H "Accept: application/json" \
-H "Content-Type: application/json;charset=UTF-8" \
{{ end }}
{{- if $value.url -}}"{{ $value.url }}"{{- else -}}"https://grafana.com/api/dashboards/{{ $value.gnetId }}/revisions/{{- if $value.revision -}}{{ $value.revision }}{{- else -}}1{{- end -}}/download"{{- end -}}{{ if $value.datasource }} | sed 's/"datasource":[^,]*/"datasource": "{{ $value.datasource }}"/g'{{ end }}{{- if $value.b64content -}} | base64 -d {{- end -}} \
{{- if $value.url -}}"{{ $value.url }}"{{- else -}}"https://grafana.com/api/dashboards/{{ $value.gnetId }}/revisions/{{- if $value.revision -}}{{ $value.revision }}{{- else -}}1{{- end -}}/download"{{- end -}}{{ if $value.datasource }} | sed '/-- .* --/! s/"datasource":.*,/"datasource": "{{ $value.datasource }}",/g'{{ end }}{{- if $value.b64content -}} | base64 -d {{- end -}} \
> "/var/lib/grafana/dashboards/{{ $provider }}/{{ $key }}.json"
{{- end -}}
{{- end }}
Expand Down

0 comments on commit 8c1268f

Please sign in to comment.