File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -47,27 +47,32 @@ spec:
4747 # - empty: filter when container label does not exist: hdfs
4848 regex : ^(airflow|superset|)$
4949 action : drop
50+ # Add empty label if not existing or pass-through existing value
5051 - sourceLabels :
5152 - __meta_kubernetes_service_annotation_prometheus_io_clusterdomain
52- targetLabel : __cluster_domain__
53+ targetLabel : __tmp_cluster_domain__
54+ replacement : " "
55+ # Use default value if empty
56+ - sourceLabels :
57+ - __tmp_cluster_domain__
58+ targetLabel : __tmp_cluster_domain__
5359 regex : ^$
5460 replacement : " cluster.local"
61+ # Scheme and Port
5562 - sourceLabels :
5663 - __meta_kubernetes_service_annotation_prometheus_io_scheme
57- action : replace
5864 targetLabel : __scheme__
5965 regex : (https?)
6066 - sourceLabels :
6167 - __meta_kubernetes_service_annotation_prometheus_io_path
62- action : replace
6368 targetLabel : __metrics_path__
6469 regex : (.+)
70+ # Build metrics service address
6571 - sourceLabels :
6672 - __meta_kubernetes_service_name
6773 - __meta_kubernetes_namespace
68- - __cluster_domain__
74+ - __tmp_cluster_domain__
6975 - __meta_kubernetes_service_annotation_prometheus_io_port
70- action : replace
7176 targetLabel : __address__
7277 regex : (.+);(.+);(.+);(\d+)
7378 replacement : $1.$2.svc.$3:$4
You can’t perform that action at this time.
0 commit comments