mirror of https://git.rancher.io/charts
52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
|
{{- if .Values.kiali.enabled }}
|
||
|
apiVersion: monitoring.coreos.com/v1
|
||
|
kind: ServiceMonitor
|
||
|
metadata:
|
||
|
name: envoy-stats-monitor
|
||
|
namespace: {{ template "istio.namespace" . }}
|
||
|
labels:
|
||
|
monitoring: istio-proxies
|
||
|
spec:
|
||
|
selector:
|
||
|
matchExpressions:
|
||
|
- {key: istio-prometheus-ignore, operator: DoesNotExist}
|
||
|
namespaceSelector:
|
||
|
any: true
|
||
|
jobLabel: envoy-stats
|
||
|
endpoints:
|
||
|
- path: /stats/prometheus
|
||
|
targetPort: 15090
|
||
|
interval: 15s
|
||
|
relabelings:
|
||
|
- sourceLabels: [__meta_kubernetes_pod_container_port_name]
|
||
|
action: keep
|
||
|
regex: '.*-envoy-prom'
|
||
|
- action: labeldrop
|
||
|
regex: "__meta_kubernetes_pod_label_(.+)"
|
||
|
- sourceLabels: [__meta_kubernetes_namespace]
|
||
|
action: replace
|
||
|
targetLabel: namespace
|
||
|
- sourceLabels: [__meta_kubernetes_pod_name]
|
||
|
action: replace
|
||
|
targetLabel: pod_name
|
||
|
---
|
||
|
apiVersion: monitoring.coreos.com/v1
|
||
|
kind: ServiceMonitor
|
||
|
metadata:
|
||
|
name: istio-component-monitor
|
||
|
namespace: {{ template "istio.namespace" . }}
|
||
|
labels:
|
||
|
monitoring: istio-components
|
||
|
spec:
|
||
|
jobLabel: istio
|
||
|
targetLabels: [app]
|
||
|
selector:
|
||
|
matchExpressions:
|
||
|
- {key: istio, operator: In, values: [pilot]}
|
||
|
namespaceSelector:
|
||
|
any: true
|
||
|
endpoints:
|
||
|
- port: http-monitoring
|
||
|
interval: 15s
|
||
|
{{- end -}}
|