From: Alexander Goussas Date: Mon, 1 Jun 2026 02:38:59 +0000 (-0500) Subject: feat: add config for prometheus deployment X-Git-Url: http://git.frustrated-labs.net/?a=commitdiff_plain;h=ab5151cd5e10feb433b6466daa741768c2c8d9b7;p=dotfiles.git feat: add config for prometheus deployment --- 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