X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Fdocker%2Fosm_pods%2Fprometheus.yaml;h=adf3c11e65fc829830bcebd7cbbb141ca8ebcb98;hb=66554567908ade44b837b0960ffcb0ae843a232f;hp=f7fd5698825a7d5ebf813f0115438f37a59040ee;hpb=6ba0591ce123f669d7c8d22a0d7df72ca5a0c0c3;p=osm%2Fdevops.git diff --git a/installers/docker/osm_pods/prometheus.yaml b/installers/docker/osm_pods/prometheus.yaml index f7fd5698..adf3c11e 100644 --- a/installers/docker/osm_pods/prometheus.yaml +++ b/installers/docker/osm_pods/prometheus.yaml @@ -85,13 +85,15 @@ spec: - 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"] + args: ['if [ ! -f "/etc/prometheus/prometheus.yml" ]; then cp /etc/prometheus_init/prometheus.yml /etc/prometheus; chown -R 1000:1000 /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 + image: prom/prometheus:v2.28.1 args: - --config.file=/etc/prometheus/prometheus.yml - --web.enable-lifecycle @@ -109,3 +111,6 @@ spec: - name: prom-config hostPath: path: /var/lib/osm/prometheus + - name: init-prom-config + configMap: + name: prom