feat: integrating metrics support for Istio with KubeZero metrics
This commit is contained in:
parent
1133902b5d
commit
a78ad7a7f9
@ -2,7 +2,7 @@ apiVersion: v2
|
|||||||
name: kubezero-istio-ingress
|
name: kubezero-istio-ingress
|
||||||
description: KubeZero Umbrella Chart for Istio based Ingress
|
description: KubeZero Umbrella Chart for Istio based Ingress
|
||||||
type: application
|
type: application
|
||||||
version: 0.5.4
|
version: 0.5.5
|
||||||
appVersion: 1.9.3
|
appVersion: 1.9.3
|
||||||
home: https://kubezero.com
|
home: https://kubezero.com
|
||||||
icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png
|
icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png
|
||||||
|
36
charts/kubezero-istio-ingress/templates/podmonitor.yaml
Normal file
36
charts/kubezero-istio-ingress/templates/podmonitor.yaml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{{- if or ( index .Values "istio-ingress" "telemetry" "enabled" ) ( index .Values "istio-private-ingress" "telemetry" "enabled" )}}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: PodMonitor
|
||||||
|
metadata:
|
||||||
|
name: envoy-stats-monitor
|
||||||
|
namespace: istio-ingress
|
||||||
|
labels:
|
||||||
|
release: metrics
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchExpressions:
|
||||||
|
- {key: istio-prometheus-ignore, operator: DoesNotExist}
|
||||||
|
jobLabel: envoy-stats
|
||||||
|
podMetricsEndpoints:
|
||||||
|
- path: /stats/prometheus
|
||||||
|
interval: 30s
|
||||||
|
relabelings:
|
||||||
|
- action: keep
|
||||||
|
sourceLabels: [__meta_kubernetes_pod_container_name]
|
||||||
|
regex: "istio-proxy"
|
||||||
|
- action: keep
|
||||||
|
sourceLabels: [__meta_kubernetes_pod_annotationpresent_prometheus_io_scrape]
|
||||||
|
- sourceLabels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
|
||||||
|
action: replace
|
||||||
|
regex: ([^:]+)(?::\d+)?;(\d+)
|
||||||
|
replacement: $1:$2
|
||||||
|
targetLabel: __address__
|
||||||
|
- 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
|
||||||
|
{{- end }}
|
@ -17,6 +17,9 @@ global:
|
|||||||
istio-ingress:
|
istio-ingress:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
|
telemetry:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
gateways:
|
gateways:
|
||||||
istio-ingressgateway:
|
istio-ingressgateway:
|
||||||
autoscaleEnabled: false
|
autoscaleEnabled: false
|
||||||
@ -90,6 +93,9 @@ istio-ingress:
|
|||||||
istio-private-ingress:
|
istio-private-ingress:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
|
telemetry:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
gateways:
|
gateways:
|
||||||
istio-ingressgateway:
|
istio-ingressgateway:
|
||||||
# name and labels make the ingress private
|
# name and labels make the ingress private
|
||||||
|
@ -2,7 +2,7 @@ apiVersion: v2
|
|||||||
name: kubezero-istio
|
name: kubezero-istio
|
||||||
description: KubeZero Umbrella Chart for Istio
|
description: KubeZero Umbrella Chart for Istio
|
||||||
type: application
|
type: application
|
||||||
version: 0.5.4
|
version: 0.5.5
|
||||||
appVersion: 1.9.3
|
appVersion: 1.9.3
|
||||||
home: https://kubezero.com
|
home: https://kubezero.com
|
||||||
icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png
|
icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png
|
||||||
|
@ -22,3 +22,9 @@ Installs the Istio control plane
|
|||||||
- https://istio.io/latest/docs/reference/config/istio.operator.v1alpha1/#IstioOperatorSpec
|
- https://istio.io/latest/docs/reference/config/istio.operator.v1alpha1/#IstioOperatorSpec
|
||||||
- https://github.com/istio/istio/blob/master/manifests/profiles/default.yaml
|
- https://github.com/istio/istio/blob/master/manifests/profiles/default.yaml
|
||||||
- https://istio.io/latest/docs/setup/install/standalone-operator/
|
- https://istio.io/latest/docs/setup/install/standalone-operator/
|
||||||
|
|
||||||
|
### Grafana
|
||||||
|
- https://grafana.com/grafana/dashboards/7645
|
||||||
|
- https://grafana.com/grafana/dashboards/7639
|
||||||
|
- https://grafana.com/grafana/dashboards/7636
|
||||||
|
- https://grafana.com/grafana/dashboards/7630
|
||||||
|
18
charts/kubezero-istio/templates/servicemonitor.yaml
Normal file
18
charts/kubezero-istio/templates/servicemonitor.yaml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{{- if index .Values "istio-discovery" "telemetry" "enabled" }}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
name: istio-component-monitor
|
||||||
|
namespace: istio-system
|
||||||
|
labels:
|
||||||
|
release: metrics
|
||||||
|
spec:
|
||||||
|
jobLabel: istio
|
||||||
|
targetLabels: [app]
|
||||||
|
selector:
|
||||||
|
matchExpressions:
|
||||||
|
- {key: istio, operator: In, values: [pilot]}
|
||||||
|
endpoints:
|
||||||
|
- port: http-monitoring
|
||||||
|
interval: 30s
|
||||||
|
{{- end }}
|
@ -65,6 +65,8 @@ kube-prometheus-stack:
|
|||||||
releaseNamespace: true
|
releaseNamespace: true
|
||||||
additional:
|
additional:
|
||||||
- kube-system
|
- kube-system
|
||||||
|
- istio-system
|
||||||
|
- istio-ingress
|
||||||
- logging
|
- logging
|
||||||
|
|
||||||
admissionWebhooks:
|
admissionWebhooks:
|
||||||
|
@ -8,6 +8,8 @@ global:
|
|||||||
{{- if index .Values "istio-ingress" "public" }}
|
{{- if index .Values "istio-ingress" "public" }}
|
||||||
istio-ingress:
|
istio-ingress:
|
||||||
enabled: {{ index .Values "istio-ingress" "public" "enabled" }}
|
enabled: {{ index .Values "istio-ingress" "public" "enabled" }}
|
||||||
|
telemetry:
|
||||||
|
enabled: {{ .Values.metrics.enabled }}
|
||||||
{{- with index .Values "istio-ingress" "public" "gateway" }}
|
{{- with index .Values "istio-ingress" "public" "gateway" }}
|
||||||
gateways:
|
gateways:
|
||||||
istio-ingressgateway:
|
istio-ingressgateway:
|
||||||
@ -22,6 +24,8 @@ istio-ingress:
|
|||||||
{{- if index .Values "istio-ingress" "private" }}
|
{{- if index .Values "istio-ingress" "private" }}
|
||||||
istio-private-ingress:
|
istio-private-ingress:
|
||||||
enabled: {{ index .Values "istio-ingress" "private" "enabled" }}
|
enabled: {{ index .Values "istio-ingress" "private" "enabled" }}
|
||||||
|
telemetry:
|
||||||
|
enabled: {{ .Values.metrics.enabled }}
|
||||||
{{- with index .Values "istio-ingress" "private" "gateway" }}
|
{{- with index .Values "istio-ingress" "private" "gateway" }}
|
||||||
gateways:
|
gateways:
|
||||||
istio-ingressgateway:
|
istio-ingressgateway:
|
||||||
|
@ -8,6 +8,9 @@ global:
|
|||||||
istio-discovery:
|
istio-discovery:
|
||||||
pilot:
|
pilot:
|
||||||
replicaCount: 2
|
replicaCount: 2
|
||||||
|
|
||||||
|
telemetry:
|
||||||
|
enabled: {{ .Values.metrics.enabled }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user