Skip to content

Commit 6d0a606

Browse files
dougszumskipriteau
authored andcommitted
Add Prometheus Jiralert container
This uses the binary release from GitHub. Change-Id: Id7df96e7d5b646d4b42e06945bafdbce828b902b Co-Authored-By: Pierre Riteau <[email protected]> (cherry picked from commit 034419e) (cherry picked from commit 49dd6d3) (cherry picked from commit 4ffed74)
1 parent f0cf958 commit 6d0a606

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
FROM {{ namespace }}/{{ infra_image_prefix }}prometheus-base:{{ tag }}
2+
{% block labels %}
3+
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
4+
{% endblock %}
5+
6+
{% import "macros.j2" as macros with context %}
7+
8+
{% block prometheus_jiralert_header %}{% endblock %}
9+
10+
{% if base_package_type == 'rpm' %}
11+
{% set prometheus_jiralert_packages = [
12+
'go',
13+
] %}
14+
{% elif base_package_type == 'deb' %}
15+
{% set prometheus_jiralert_packages = [
16+
'golang-go',
17+
] %}
18+
{% endif %}
19+
20+
{{ macros.install_packages(prometheus_jiralert_packages | customizable("packages")) }}
21+
22+
{% block prometheus_jiralert_version %}
23+
ARG prometheus_jiralert_version=1.0
24+
ARG prometheus_jiralert_url=https://github.com/prometheus-community/jiralert/releases/download/${prometheus_jiralert_version}/jiralert-${prometheus_jiralert_version}.linux-{{debian_arch}}.tar.gz
25+
{% endblock %}
26+
27+
{% block prometheus_jiralert_install %}
28+
ENV GOPATH=/tmp
29+
RUN curl -o /tmp/jiralert.tar.gz ${prometheus_jiralert_url} \
30+
&& mkdir /opt/jiralert \
31+
&& tar --strip 1 -xvf /tmp/jiralert.tar.gz -C /opt/jiralert \
32+
&& rm -f /tmp/jiralert.tar.gz \
33+
&& mkdir -p /etc/jiralert
34+
{% endblock %}
35+
36+
{% block prometheus_jiralert_footer %}{% endblock %}
37+
{% block footer %}{% endblock %}
38+
39+
USER prometheus

0 commit comments

Comments
 (0)