Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make label_role to role #229

Merged
merged 2 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/prometheus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: prometheus
description: OSC Prometheus deployment
type: application
version: 0.18.2
version: 0.18.3
appVersion: "v2.44.0"
maintainers:
- name: treydock
Expand Down
12 changes: 12 additions & 0 deletions charts/prometheus/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ data:
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_match_metrics,__meta_kubernetes_service_port_name]
action: drop
regex: 'true;.*[^metrics].*'
- source_labels: [__meta_kubernetes_service_label_role]
regex: 'paas'
action: drop
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
action: replace
target_label: __metrics_path__
Expand Down Expand Up @@ -187,6 +190,9 @@ data:
kubernetes_sd_configs:
- role: pod
relabel_configs:
- source_labels: [__meta_kubernetes_pod_label_role]
action: drop
regex: 'paas'
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
action: keep
regex: 'true'
Expand Down Expand Up @@ -315,6 +321,12 @@ data:
target_label: receiver
- regex: "label_receiver"
action: labeldrop
- source_labels: [label_role]
regex: '(.+)'
replacement: '$1'
target_label: role
- regex: "label_role"
action: labeldrop
- job_name: kube-state-metrics-telemetry
metrics_path: /metrics
static_configs:
Expand Down
Loading