Prepare installer, pods and Jenkins for Rel THIRTEEN
[osm/devops.git] / installers / docker / osm_pods / prometheus.yaml
index 431b9b3..a914ea5 100644 (file)
@@ -74,14 +74,13 @@ data:
     # A scrape configuration containing exactly one endpoint to scrape:
     # Here it's Prometheus itself.
     scrape_configs:
-      # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
       - job_name: 'mon_exporter'
-
-        # metrics_path defaults to '/metrics'
-        # scheme defaults to 'http'.
-
         static_configs:
         - targets: ['mon:8000']
+      # Add here other external targets, e.g. a pushgateway
+      # - job_name: 'pushgateway'
+      #   static_configs:
+      #   - targets: ['prometheus-pushgateway:9091']
 kind: ConfigMap
 metadata:
   name: prom
@@ -107,15 +106,15 @@ spec:
       - 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']
+        args: ['if [ ! -f "/etc/prometheus/prometheus.yml" ]; then cp /config/prometheus.yml /etc/prometheus; fi']
         volumeMounts:
           - name: prom-config
             mountPath: /etc/prometheus
-          - name: init-prom-config
-            mountPath: /etc/prometheus_init
+          - name: prom-config-base
+            mountPath: /config
       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
@@ -128,12 +127,14 @@ spec:
         - name: prom-db
           mountPath: /prometheus
       - name: prometheus-config-sidecar
-        image: opensourcemano/prometheus:11
+        image: opensourcemano/prometheus:13
         env:
         - name: MONGODB_URL
           value: mongodb://mongodb-k8s:27017/?replicaSet=rs0
         - name: PROMETHEUS_CONFIG_FILE
           value: /etc/prometheus/prometheus.yml
+        - name: PROMETHEUS_BASE_CONFIG_FILE
+          value: /etc/prometheus_base/prometheus.yml
         - name: TARGET_DATABASE
           value: osm
         - name: PROMETHEUS_URL
@@ -141,11 +142,13 @@ spec:
         volumeMounts:
         - name: prom-config
           mountPath: /etc/prometheus
+        - name: prom-config-base
+          mountPath: /etc/prometheus_base
       volumes:
-      - emptyDir: {}
-        name: prom-db
+      - name: prom-db
+        emptyDir: {}
       - name: prom-config
         emptyDir: {}
-      - name: init-prom-config
+      - name: prom-config-base
         configMap:
           name: prom