X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Fdocker%2Fosm_pods%2Fprometheus.yaml;h=93cd20aea451226bcabacecb6d205fd3eb989579;hb=b3daa3a5aa897ea1f0708c520e325bfd682d2a12;hp=b6ab986c91ff65388fa32cc135d88fd1938ec3d1;hpb=b9fb8a347949a0012ba298333418e7965184c30e;p=osm%2Fdevops.git diff --git a/installers/docker/osm_pods/prometheus.yaml b/installers/docker/osm_pods/prometheus.yaml index b6ab986c..93cd20ae 100644 --- a/installers/docker/osm_pods/prometheus.yaml +++ b/installers/docker/osm_pods/prometheus.yaml @@ -81,6 +81,16 @@ spec: labels: app: prometheus spec: + initContainers: + - name: prometheus-init-config + image: busybox + command: ["/bin/sh", "-c"] + args: ['if [ ! -f "/etc/prometheus/prometheus.yml" ]; then cp /etc/prometheus_init/prometheus.yml /etc/prometheus; fi'] + volumeMounts: + - name: prom-config + mountPath: /etc/prometheus + - name: init-prom-config + mountPath: /etc/prometheus_init containers: - name: prometheus image: prom/prometheus:v2.4.3 @@ -92,13 +102,15 @@ 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 + - name: init-prom-config + configMap: + name: prom