relabel_configs:
# allow targets to be filtered by a specific scheme, by default both http and https are included
# specifying the annotation will limit the targets to that protocol exclusively
# metrics.agent.grafana.com/scheme: http
# prometheus.io/scheme: http
- action: keep
source_labels:
- __meta_kubernetes_ingress_scheme
- __meta_kubernetes_ingress_annotation_metrics_agent_grafana_com_scheme
- __meta_kubernetes_ingress_annotation_prometheus_scheme
separator: ;
regex: ^(https?)(;.*;?(\b\1\b)(;.*)?|;;)$