From 7fb6e94d2910906630abcb4eae6a23ae0ba157c0 Mon Sep 17 00:00:00 2001
From: Zohar Galor <zgalor@redhat.com>
Date: Wed, 18 Oct 2017 11:48:24 +0300
Subject: Split prometheus image defaults to prefix and version

To allow easier testing and deployment from different repos, image defaults were split to prefix and version that can be set externally.

bz: https://bugzilla.redhat.com/show_bug.cgi?id=1493431
---
 roles/openshift_prometheus/templates/prometheus.j2 | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'roles/openshift_prometheus/templates')

diff --git a/roles/openshift_prometheus/templates/prometheus.j2 b/roles/openshift_prometheus/templates/prometheus.j2
index 81f043491..916c57aa2 100644
--- a/roles/openshift_prometheus/templates/prometheus.j2
+++ b/roles/openshift_prometheus/templates/prometheus.j2
@@ -29,7 +29,7 @@ spec:
       containers:
       # Deploy Prometheus behind an oauth proxy
       - name: prom-proxy
-        image: "{{ openshift_prometheus_image_proxy }}"
+        image: "{{openshift_prometheus_proxy_image_prefix}}oauth-proxy:{{openshift_prometheus_proxy_image_version}}"
         imagePullPolicy: IfNotPresent
         resources:
           requests:
@@ -79,7 +79,7 @@ spec:
         - --storage.tsdb.min-block-duration=2m
         - --config.file=/etc/prometheus/prometheus.yml
         - --web.listen-address=localhost:9090
-        image: "{{ openshift_prometheus_image_prometheus }}"
+        image: "{{openshift_prometheus_image_prefix}}prometheus:{{openshift_prometheus_image_version}}"
         imagePullPolicy: IfNotPresent
         resources:
           requests:
@@ -105,7 +105,7 @@ spec:
 
       # Deploy alertmanager behind prometheus-alert-buffer behind an oauth proxy
       - name: alerts-proxy
-        image: "{{ openshift_prometheus_image_proxy }}"
+        image: "{{openshift_prometheus_proxy_image_prefix}}oauth-proxy:{{openshift_prometheus_proxy_image_version}}"
         imagePullPolicy: IfNotPresent
         resources:
           requests:
@@ -149,7 +149,7 @@ spec:
       - name: alert-buffer
         args:
         - --storage-path=/alert-buffer/messages.db
-        image: "{{ openshift_prometheus_image_alertbuffer }}"
+        image: "{{openshift_prometheus_alertbuffer_image_prefix}}prometheus-alert-buffer:{{openshift_prometheus_alertbuffer_image_version}}"
         imagePullPolicy: IfNotPresent
         resources:
           requests:
@@ -176,7 +176,7 @@ spec:
       - name: alertmanager
         args:
         - -config.file=/etc/alertmanager/alertmanager.yml
-        image: "{{ openshift_prometheus_image_alertmanager }}"
+        image: "{{openshift_prometheus_alertmanager_image_prefix}}prometheus-alertmanager:{{openshift_prometheus_alertmanager_image_version}}"
         imagePullPolicy: IfNotPresent
         resources:
           requests:
-- 
cgit v1.2.3