~xdavidwu/flux

2090be85a3871cb59673e95dd9c793493362b7c1 — Pinghao Wu 19 days ago 4d9e516
prometheus: scrape itself from sd
2 files changed, 8 insertions(+), 3 deletions(-)

M monitoring/prometheus/configmap.yaml
M monitoring/prometheus/deployment.yaml
M monitoring/prometheus/configmap.yaml => monitoring/prometheus/configmap.yaml +0 -3
@@ 54,9 54,6 @@ data:
            target_label: node
          - action: labelmap
            regex: __meta_kubernetes_pod_annotation_prometheus_xdavidwu_link_(.+)
      - job_name: 'prometheus'
        static_configs:
          - targets: ['localhost:9090']
      - job_name: 'ceph'
        static_configs:
          - targets: ['10.0.3.1:9283']

M monitoring/prometheus/deployment.yaml => monitoring/prometheus/deployment.yaml +8 -0
@@ 7,6 7,11 @@ spec:
    type: Recreate
  replicas: 1
  template:
    metadata:
      annotations:
        prometheus.xdavidwu.link/instance: main
      labels:
        metrics: metrics
    spec:
      containers:
        - name: prometheus


@@ 18,6 23,9 @@ spec:
            # leave compaction to thanos
            - --storage.tsdb.min-block-duration=2h
            - --storage.tsdb.max-block-duration=2h
          ports:
            - name: metrics
              containerPort: 9090
          volumeMounts:
            - name: configs
              mountPath: /etc/prometheus