X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Fdocker%2Fosm_pods%2Fprometheus.yaml;h=f7fd5698825a7d5ebf813f0115438f37a59040ee;hb=1e0297e98ab41e4bdc9537c1adffc2cae8b198cb;hp=b6ab986c91ff65388fa32cc135d88fd1938ec3d1;hpb=47cd3b277310d5d6fef0067f220e849bebff35b4;p=osm%2Fdevops.git diff --git a/installers/docker/osm_pods/prometheus.yaml b/installers/docker/osm_pods/prometheus.yaml index b6ab986c..f7fd5698 100644 --- a/installers/docker/osm_pods/prometheus.yaml +++ b/installers/docker/osm_pods/prometheus.yaml @@ -81,6 +81,14 @@ spec: labels: app: prometheus spec: + initContainers: + - name: prometheus-init-config + image: busybox + command: ["/bin/sh", "-c"] + args: ["printf \"global:\\n scrape_interval: 15s\\n evaluation_interval: 15s\\nscrape_configs:\\n - job_name: 'prometheus'\\n static_configs:\\n - targets: ['mon:8000']\" > /etc/prometheus/prometheus.yml"] + volumeMounts: + - name: prom-config + mountPath: /etc/prometheus containers: - name: prometheus image: prom/prometheus:v2.4.3 @@ -92,13 +100,12 @@ spec: protocol: TCP volumeMounts: - name: prom-config - mountPath: /etc/prometheus/ + mountPath: /etc/prometheus - name: prom-db mountPath: /prometheus volumes: - - configMap: - defaultMode: 420 - name: prom - name: prom-config - emptyDir: {} name: prom-db + - name: prom-config + hostPath: + path: /var/lib/osm/prometheus