Add image rendering sidecar

This PS is to add a sidecar for the grafana image renderer. Starting
with Grafana v10 it will be necessary to use an image rendering plugin
or remote renderer.

https://grafana.com/docs/grafana/latest/setup-grafana/image-rendering/

Change-Id: I4ebdac84769a646fa8154f80aaa2692c9f89eeb8
This commit is contained in:
Ritchie, Frank (fr801x) 2024-06-06 14:04:32 -04:00
parent bea89e68f2
commit b946e5ba05
4 changed files with 24 additions and 1 deletions

View File

@ -15,7 +15,7 @@ apiVersion: v1
appVersion: v9.2.10
description: OpenStack-Helm Grafana
name: grafana
version: 0.1.23
version: 0.1.24
home: https://grafana.com/
sources:
- https://github.com/grafana/grafana

View File

@ -51,6 +51,18 @@ spec:
{{ .Values.labels.grafana.node_selector_key }}: {{ .Values.labels.grafana.node_selector_value | quote }}
initContainers:
{{ tuple $envAll "grafana" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
{{- if .Values.conf.grafana.image_rendering_sidecar.enabled }}
- name: grafana-image-renderer
{{ tuple $envAll "grafana_image_renderer" | include "helm-toolkit.snippets.image" | indent 10 }}
restartPolicy: Always
ports:
- containerPort: {{ tuple "grafana" "image_rendering" "grafana" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
readinessProbe:
tcpSocket:
port: {{ tuple "grafana" "image_rendering" "grafana" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
initialDelaySeconds: 15
periodSeconds: 10
{{- end }}
containers:
- name: grafana
{{ tuple $envAll "grafana" | include "helm-toolkit.snippets.image" | indent 10 }}
@ -88,6 +100,12 @@ spec:
key: ca.crt
name: prometheus-tls-api
{{- end }}
{{- if .Values.conf.grafana.image_rendering_sidecar.enabled }}
- name: GF_RENDERING_SERVER_URL
value: "http://localhost:{{ tuple "grafana" "image_rendering" "grafana" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}/render"
- name: GF_RENDERING_CALLBACK_URL
value: "http://localhost:{{ tuple "grafana" "internal" "grafana" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}"
{{- end }}
{{- if .Values.pod.env.grafana }}
{{ include "helm-toolkit.utils.to_k8s_env_vars" .Values.pod.env.grafana | indent 12 }}
{{- end }}

View File

@ -24,6 +24,7 @@ images:
grafana_db_session_sync: docker.io/openstackhelm/heat:stein-ubuntu_bionic
selenium_tests: docker.io/openstackhelm/osh-selenium:latest-ubuntu_focal
image_repo_sync: docker.io/library/docker:17.07.0
grafana_image_renderer: docker.io/grafana/grafana-image-renderer:3.10.5
pull_policy: IfNotPresent
local_registry:
active: false
@ -287,6 +288,7 @@ endpoints:
grafana:
default: 3000
public: 80
image_rendering: 8081
monitoring:
name: prometheus
namespace: null
@ -503,6 +505,8 @@ conf:
enabled: false
unified_alerting:
enabled: true
image_rendering_sidecar:
enabled: false
analytics:
reporting_enabled: false
check_for_updates: false

View File

@ -24,4 +24,5 @@ grafana:
- 0.1.21 Fix run migrator job deployment condition
- 0.1.22 Make selenium v4 syntax optional
- 0.1.23 Modified selenium test for compatibility
- 0.1.24 Add image rendering sidecar
...