github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/manifests/prometheus-operator/nginx_ingress_monitor.yaml (about) 1 # Copyright (c) 2022, Oracle and/or its affiliates. 2 # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 4 apiVersion: monitoring.coreos.com/v1 5 kind: PodMonitor 6 metadata: 7 name: nginx-ingress-controller 8 namespace: {{ .monitoringNamespace }} 9 labels: 10 release: prometheus-operator 11 spec: 12 namespaceSelector: 13 matchNames: 14 - {{ .nginxNamespace }} 15 selector: {} 16 podMetricsEndpoints: 17 - port: http-metrics 18 enableHttp2: false 19 relabelings: 20 - sourceLabels: 21 - __meta_kubernetes_pod_name 22 action: replace 23 targetLabel: kubernetes_pod_name 24 - action: labelmap 25 regex: __meta_kubernetes_pod_label_(.+) 26 - sourceLabels: 27 - __meta_kubernetes_namespace 28 action: replace 29 targetLabel: kubernetes_namespace 30 - sourceLabels: 31 - __meta_kubernetes_pod_annotation_system_io_scrape 32 action: keep 33 regex: "true" 34 - sourceLabels: 35 - __address__ 36 - __meta_kubernetes_pod_annotation_prometheus_io_port 37 action: replace 38 regex: ([^:]+)(?::\d+)?;(\d+) 39 replacement: $1:10254 40 targetLabel: __address__ 41 - action: replace 42 targetLabel: verrazzano_cluster 43 replacement: local