Correct port usage of name instead of number.

This commit is contained in:
Joseph Hanson 2024-01-04 14:10:12 -06:00
parent 754073318c
commit 8be46bccde

View file

@ -7,27 +7,27 @@ metadata:
spec:
selector:
matchLabels:
postgres-operator.crunchydata.com/crunchy-postgres-exporter: "true"
postgres-operator.crunchydata.com/crunchy-postgres-exporter: 'true'
namespaceSelector:
matchNames:
- peertube
podMetricsEndpoints:
- port: "9187"
# relabelings:
# - sourceLabels: [__meta_kubernetes_pod_container_port_number]
# action: keep
# regex: "9187"
# - sourceLabels: [__meta_kubernetes_namespace]
# targetLabel: kubernetes_namespace
# - sourceLabels: [__meta_kubernetes_pod_name]
# targetLabel: pod
# - sourceLabels: [__meta_kubernetes_namespace, __meta_kubernetes_pod_label_postgres_operator_crunchydata_com_cluster]
# separator: ":"
# targetLabel: pg_cluster
# replacement: "$1$2"
# - sourceLabels: [__meta_kubernetes_pod_ip]
# targetLabel: ip
# - sourceLabels: [__meta_kubernetes_pod_label_postgres_operator_crunchydata_com_instance]
# targetLabel: deployment
# - sourceLabels: [__meta_kubernetes_pod_label_postgres_operator_crunchydata_com_role]
# targetLabel: role
- port: "exporter"
relabelings:
- sourceLabels: [__meta_kubernetes_pod_container_port_number]
action: keep
regex: "9187"
- sourceLabels: [__meta_kubernetes_namespace]
targetLabel: kubernetes_namespace
- sourceLabels: [__meta_kubernetes_pod_name]
targetLabel: pod
- sourceLabels: [__meta_kubernetes_namespace, __meta_kubernetes_pod_label_postgres_operator_crunchydata_com_cluster]
separator: ":"
targetLabel: pg_cluster
replacement: "$1$2"
- sourceLabels: [__meta_kubernetes_pod_ip]
targetLabel: ip
- sourceLabels: [__meta_kubernetes_pod_label_postgres_operator_crunchydata_com_instance]
targetLabel: deployment
- sourceLabels: [__meta_kubernetes_pod_label_postgres_operator_crunchydata_com_role]
targetLabel: role