github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/manifests/prometheus-operator/auth_proxy_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 apiVersion: monitoring.coreos.com/v1 4 kind: ServiceMonitor 5 metadata: 6 name: authproxy 7 namespace: {{ .monitoringNamespace }} 8 labels: 9 release: prometheus-operator 10 spec: 11 namespaceSelector: 12 matchNames: 13 - {{ .systemNamespace }} 14 selector: {} 15 endpoints: 16 - path: /metrics 17 {{ if .isIstioEnabled }} 18 scheme: https 19 tlsConfig: 20 caFile: /etc/istio-certs/root-cert.pem 21 certFile: /etc/istio-certs/cert-chain.pem 22 keyFile: /etc/istio-certs/key.pem 23 insecureSkipVerify: true 24 {{ else }} 25 scheme: http 26 {{ end }} 27 enableHttp2: false 28 relabelings: 29 - action: replace 30 replacement: local 31 targetLabel: verrazzano_cluster 32 - action: keep 33 regex: true;verrazzano-authproxy;verrazzano-authproxy-metrics 34 sourceLabels: 35 - __meta_kubernetes_pod_annotation_verrazzano_io_metricsEnabled 36 - __meta_kubernetes_service_name 37 - __meta_kubernetes_pod_container_name 38 - action: replace 39 regex: (.*) 40 replacement: $1 41 sourceLabels: 42 - __meta_kubernetes_namespace 43 targetLabel: namespace 44 - action: labelmap 45 regex: __meta_kubernetes_pod_label_(.+) 46 - action: replace 47 sourceLabels: 48 - __meta_kubernetes_pod_name 49 targetLabel: pod_name 50 - action: labeldrop 51 regex: (controller_revision_hash) 52 - action: replace 53 regex: .*/(.*)$ 54 replacement: $1 55 sourceLabels: 56 - name 57 targetLabel: app