diff --git a/charts/kubezero-istio-ingress/Chart.yaml b/charts/kubezero-istio-ingress/Chart.yaml index a478d3a..dd1d7de 100644 --- a/charts/kubezero-istio-ingress/Chart.yaml +++ b/charts/kubezero-istio-ingress/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: kubezero-istio-ingress description: KubeZero Umbrella Chart for Istio based Ingress type: application -version: 0.5.4 +version: 0.5.5 appVersion: 1.9.3 home: https://kubezero.com icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png diff --git a/charts/kubezero-istio-ingress/templates/podmonitor.yaml b/charts/kubezero-istio-ingress/templates/podmonitor.yaml new file mode 100644 index 0000000..cfe5d51 --- /dev/null +++ b/charts/kubezero-istio-ingress/templates/podmonitor.yaml @@ -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 }} diff --git a/charts/kubezero-istio-ingress/values.yaml b/charts/kubezero-istio-ingress/values.yaml index 0cf503a..5583418 100644 --- a/charts/kubezero-istio-ingress/values.yaml +++ b/charts/kubezero-istio-ingress/values.yaml @@ -17,6 +17,9 @@ global: istio-ingress: enabled: false + telemetry: + enabled: false + gateways: istio-ingressgateway: autoscaleEnabled: false @@ -90,6 +93,9 @@ istio-ingress: istio-private-ingress: enabled: false + telemetry: + enabled: false + gateways: istio-ingressgateway: # name and labels make the ingress private diff --git a/charts/kubezero-istio/Chart.yaml b/charts/kubezero-istio/Chart.yaml index 6710665..fcc2d7a 100644 --- a/charts/kubezero-istio/Chart.yaml +++ b/charts/kubezero-istio/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: kubezero-istio description: KubeZero Umbrella Chart for Istio type: application -version: 0.5.4 +version: 0.5.5 appVersion: 1.9.3 home: https://kubezero.com icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png diff --git a/charts/kubezero-istio/README.md.gotmpl b/charts/kubezero-istio/README.md.gotmpl index 1b4d30f..3b91ba2 100644 --- a/charts/kubezero-istio/README.md.gotmpl +++ b/charts/kubezero-istio/README.md.gotmpl @@ -22,3 +22,9 @@ Installs the Istio control plane - https://istio.io/latest/docs/reference/config/istio.operator.v1alpha1/#IstioOperatorSpec - https://github.com/istio/istio/blob/master/manifests/profiles/default.yaml - 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 diff --git a/charts/kubezero-istio/templates/servicemonitor.yaml b/charts/kubezero-istio/templates/servicemonitor.yaml new file mode 100644 index 0000000..b645186 --- /dev/null +++ b/charts/kubezero-istio/templates/servicemonitor.yaml @@ -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 }} diff --git a/charts/kubezero-metrics/values.yaml b/charts/kubezero-metrics/values.yaml index 5a533d4..2e4f52a 100644 --- a/charts/kubezero-metrics/values.yaml +++ b/charts/kubezero-metrics/values.yaml @@ -65,6 +65,8 @@ kube-prometheus-stack: releaseNamespace: true additional: - kube-system + - istio-system + - istio-ingress - logging admissionWebhooks: diff --git a/charts/kubezero/templates/istio-ingress.yaml b/charts/kubezero/templates/istio-ingress.yaml index 4e8d5c8..0520737 100644 --- a/charts/kubezero/templates/istio-ingress.yaml +++ b/charts/kubezero/templates/istio-ingress.yaml @@ -8,6 +8,8 @@ global: {{- if index .Values "istio-ingress" "public" }} istio-ingress: enabled: {{ index .Values "istio-ingress" "public" "enabled" }} + telemetry: + enabled: {{ .Values.metrics.enabled }} {{- with index .Values "istio-ingress" "public" "gateway" }} gateways: istio-ingressgateway: @@ -22,6 +24,8 @@ istio-ingress: {{- if index .Values "istio-ingress" "private" }} istio-private-ingress: enabled: {{ index .Values "istio-ingress" "private" "enabled" }} + telemetry: + enabled: {{ .Values.metrics.enabled }} {{- with index .Values "istio-ingress" "private" "gateway" }} gateways: istio-ingressgateway: diff --git a/charts/kubezero/templates/istio.yaml b/charts/kubezero/templates/istio.yaml index ac750b8..ecaba88 100644 --- a/charts/kubezero/templates/istio.yaml +++ b/charts/kubezero/templates/istio.yaml @@ -8,6 +8,9 @@ global: istio-discovery: pilot: replicaCount: 2 + + telemetry: + enabled: {{ .Values.metrics.enabled }} {{- end }} {{- end }}