Skip to content

Commit

Permalink
ceph-grafana: Add proxy env vars to grafana service template
Browse files Browse the repository at this point in the history
When installing grafana plugins, the container will make http requests.
This requires http proxy otherwise installation cannot be performed. Passed
the proxy vars from all.yml as env args.
Fixes: #6484, #6481

Signed-off-by: John Karasev <john.karasev@intel.com>
(cherry picked from commit 79ca442)
  • Loading branch information
karasjoh000 authored and guits committed Feb 9, 2022
1 parent f948b08 commit 2e2d23c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions roles/ceph-grafana/templates/grafana-server.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name=grafana-server \
--memory={{ grafana_container_memory }}GB \
--memory-swap={{ grafana_container_memory * 2 }}GB \
-e GF_INSTALL_PLUGINS={{ grafana_plugins|join(',') }} \
{% if ceph_docker_http_proxy is defined %}
-e http_proxy={{ ceph_docker_http_proxy }} \
{% endif %}
{% if ceph_docker_https_proxy is defined %}
-e https_proxy={{ ceph_docker_https_proxy }} \
{% endif %}
{% if ceph_docker_no_proxy is defined %}
-e no_proxy={{ ceph_docker_no_proxy }} \
{% endif %}
{{ grafana_container_image }}
{% if container_binary == 'podman' %}
ExecStop=-/usr/bin/sh -c "/usr/bin/{{ container_binary }} rm -f `cat /%t/%n-cid`"
Expand Down

0 comments on commit 2e2d23c

Please sign in to comment.