Skip to content

Commit

Permalink
Switch to VMPodScrape
Browse files Browse the repository at this point in the history
  • Loading branch information
Brutus5000 committed Jan 17, 2025
1 parent b4dac35 commit c80670f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 120 deletions.
5 changes: 2 additions & 3 deletions apps/faf-icebreaker/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ spec:
labels:
app: faf-icebreaker
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '8081'
prometheus.io/path: '/actuator/prometheus'
# Does not provide metrics at the moment
prometheus.io/scrape: 'false'
spec:
initContainers:
- name: geolite-db-dl
Expand Down
2 changes: 2 additions & 0 deletions apps/faf-replay-server/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ spec:
ports:
- name: replay-stream
containerPort: 15000
- name: prometheus
containerPort: 8011
volumeMounts:
- name: config
mountPath: /config/config.yaml
Expand Down
47 changes: 0 additions & 47 deletions ops/monitoring/templates/ServiceScrape.yaml

This file was deleted.

23 changes: 10 additions & 13 deletions ops/monitoring/templates/annotations-discovery.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
# Our modified
# Our modified

apiVersion: operator.victoriametrics.com/v1beta1
kind: VMServiceScrape
kind: VMPodScrape
metadata:
name: annotations-discovery
spec:
discoveryRole: service
endpoints:
- port: http-metrics
relabelConfigs:
namespaceSelector:
any: true
podMetricsEndpoints:
- relabelConfigs:
# Check if scrape is enabled
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
action: keep
regex: "true"
# Match container port with port from annotation
- action: keep_if_equal
source_labels: [__meta_kubernetes_service_annotation_prometheus_io_port, __meta_kubernetes_service_container_port_number]
source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_port, __meta_kubernetes_pod_container_port_number]
# Set scrape path
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
action: replace
target_label: __metrics_path__
regex: (.+)
# Set port to address
- source_labels:
[__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
[__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
action: replace
regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:$2
Expand All @@ -32,6 +32,3 @@ spec:
- source_labels: [__meta_kubernetes_namespace]
target_label: namespace

namespaceSelector:
any: true
selector: {}
57 changes: 0 additions & 57 deletions ops/monitoring/templates/stock-annotations-discovery.yaml

This file was deleted.

0 comments on commit c80670f

Please sign in to comment.