Skip to content

Commit

Permalink
Merge pull request grafana#2264 from adrian291/accept_header
Browse files Browse the repository at this point in the history
[grafana] Possibility to change Accept header for dashboard downloader
  • Loading branch information
zanhsieh authored Mar 7, 2023
2 parents 2bf5f25 + bc9eb1d commit 55564fc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/grafana/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: grafana
version: 6.52.0
version: 6.52.1
appVersion: 9.4.3
kubeVersion: "^1.8.0-0"
description: The leading tool for querying and visualizing time series and metrics.
Expand Down
6 changes: 5 additions & 1 deletion charts/grafana/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,19 @@ data:
--connect-timeout 60 \
--max-time 60 \
{{- if not $value.b64content }}
{{- if not $value.acceptHeader }}
-H "Accept: application/json" \
{{- else }}
-H "Accept: {{ $value.acceptHeader }}" \
{{- end }}
{{- if $value.token }}
-H "Authorization: token {{ $value.token }}" \
{{- end }}
{{- if $value.bearerToken }}
-H "Authorization: Bearer {{ $value.bearerToken }}" \
{{- end }}
{{- if $value.basic }}
-H "Basic: {{ $value.basic }}" \
-H "Authorization: Basic {{ $value.basic }}" \
{{- end }}
{{- if $value.gitlabToken }}
-H "PRIVATE-TOKEN: {{ $value.gitlabToken }}" \
Expand Down
1 change: 1 addition & 0 deletions charts/grafana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,7 @@ dashboards: {}
# local-dashboard-azure:
# url: https://example.com/repository/test-azure.json
# basic: ''
# acceptHeader: '*/*'

## Reference to external ConfigMap per provider. Use provider name as key and ConfigMap name as value.
## A provider dashboards must be defined either by external ConfigMaps or in values.yaml, not in both.
Expand Down

0 comments on commit 55564fc

Please sign in to comment.