From ab5151cd5e10feb433b6466daa741768c2c8d9b7 Mon Sep 17 00:00:00 2001 From: Alexander Goussas Date: Sun, 31 May 2026 21:38:59 -0500 Subject: [PATCH] feat: add config for prometheus deployment --- k8s/prometheus.yaml | 59 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 k8s/prometheus.yaml diff --git a/k8s/prometheus.yaml b/k8s/prometheus.yaml new file mode 100644 index 0000000..3f5796e --- /dev/null +++ b/k8s/prometheus.yaml @@ -0,0 +1,59 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: prom-config +data: + prom-config: | + global: + scrape_interval: 30s + + scrape_configs: + - job_name: "otel-collector" + static_configs: + - targets: [ "otel-collector.default.svc.cluster.local:8887" ] +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: prometheus +spec: + selector: + matchLabels: + app: prometheus + replicas: 1 + template: + metadata: + labels: + app: prometheus + spec: + volumes: + - name: prom-config-vol + configMap: + name: prom-config + items: + - key: prom-config + path: prometheus.yml + containers: + - name: prometheus + image: prom/prometheus:latest + ports: + - containerPort: 9090 + volumeMounts: + - name: prom-config-vol + mountPath: /etc/prometheus +--- +apiVersion: v1 +kind: Service +metadata: + name: prometheus + labels: + app: prometheus +spec: + selector: + app: prometheus + ports: + - port: 9090 + name: prometheus-http-frontend + protocol: TCP + targetPort: 9090 -- 2.43.0