Skip to content

Commit

Permalink
Merge pull request #3292 from dig-whois/main
Browse files Browse the repository at this point in the history
[grafana] Support for overriding the server and call back urls
  • Loading branch information
zanhsieh authored Aug 28, 2024
2 parents aaa1547 + c48cae8 commit 44e86c5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
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: 8.4.9
version: 8.5.0
appVersion: 11.1.5
kubeVersion: "^1.8.0-0"
description: The leading tool for querying and visualizing time series and metrics.
Expand Down
2 changes: 2 additions & 0 deletions charts/grafana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ need to instead set `global.imageRegistry`.
| `imageRenderer.service.targetPort` | image-renderer service port used by service | `8081` |
| `imageRenderer.appProtocol` | Adds the appProtocol field to the service | `` |
| `imageRenderer.grafanaSubPath` | Grafana sub path to use for image renderer callback url | `''` |
| `imageRenderer.serverURL` | Remote image renderer url | `''` |
| `imageRenderer.renderingCallbackURL` | Callback url for the Grafana image renderer | `''` |
| `imageRenderer.podPortName` | name of the image-renderer port on the pod | `http` |
| `imageRenderer.revisionHistoryLimit` | number of image-renderer replica sets to keep | `10` |
| `imageRenderer.networkPolicy.limitIngress` | Enable a NetworkPolicy to limit inbound traffic from only the created grafana pods | `true` |
Expand Down
8 changes: 8 additions & 0 deletions charts/grafana/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -1059,9 +1059,17 @@ containers:
{{- end }}
{{- if .Values.imageRenderer.enabled }}
- name: GF_RENDERING_SERVER_URL
{{- if .Values.imageRenderer.serverURL }}
value: {{ .Values.imageRenderer.serverURL | quote }}
{{- else }}
value: http://{{ include "grafana.fullname" . }}-image-renderer.{{ include "grafana.namespace" . }}:{{ .Values.imageRenderer.service.port }}/render
{{- end }}
- name: GF_RENDERING_CALLBACK_URL
{{- if .Values.imageRenderer.renderingCallbackURL }}
value: {{ .Values.imageRenderer.renderingCallbackURL | quote }}
{{- else }}
value: {{ .Values.imageRenderer.grafanaProtocol }}://{{ include "grafana.fullname" . }}.{{ include "grafana.namespace" . }}:{{ .Values.service.port }}/{{ .Values.imageRenderer.grafanaSubPath }}
{{- end }}
{{- end }}
- name: GF_PATHS_DATA
value: {{ (get .Values "grafana.ini").paths.data }}
Expand Down
4 changes: 4 additions & 0 deletions charts/grafana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,10 @@ imageRenderer:
targetCPU: "60"
targetMemory: ""
behavior: {}
# The url of remote image renderer if it is not in the same namespace with the grafana instance
serverURL: ""
# The callback url of grafana instances if it is not in the same namespace with the remote image renderer
renderingCallbackURL: ""
image:
# -- The Docker registry
registry: docker.io
Expand Down

0 comments on commit 44e86c5

Please sign in to comment.