Add istio for prometheus

This commit is contained in:
Stefan Reimer 2020-08-03 17:44:58 +01:00
parent 03506a40c9
commit e8b0428e41
4 changed files with 39 additions and 4 deletions

View File

@ -14,3 +14,20 @@ spec:
- destination:
host: metrics-grafana
{{- end }}
---
{{- if .Values.prometheus.istio.enabled }}
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: prometheus
namespace: monitoring
spec:
hosts:
- {{ .Values.prometheus.istio.url }}
gateways:
- {{ .Values.prometheus.istio.gateway }}
http:
- route:
- destination:
host: metrics-prometheus-operato-prometheus
{{- end }}

View File

@ -4,6 +4,12 @@ grafana:
url: ""
gateway: ingressgateway.istio-system.svc.cluster.local
prometheus:
istio:
enabled: false
url: ""
gateway: ingressgateway.istio-system.svc.cluster.local
prometheus-operator:
defaultRules:
create: true
@ -64,7 +70,9 @@ prometheus-operator:
enabled: true
prometheusSpec:
retention: 10d
retention: 8d
portName: http-prometheus
resources:
requests:
memory: 512Mi

View File

@ -95,10 +95,17 @@ kubezero:
metrics:
enabled: {{ .Values.metrics.enabled }}
values:
{{- if and .Values.metrics.istio.enabled .Values.istio.enabled }}
{{- if and .Values.metrics.istio.grafana.enabled .Values.istio.enabled }}
grafana:
istio:
{{- with .Values.metrics.istio }}
{{- with .Values.metrics.istio.grafana }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}
{{- if and .Values.metrics.istio.prometheus.enabled .Values.istio.enabled }}
prometheus:
istio:
{{- with .Values.metrics.istio.prometheus }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}

View File

@ -28,7 +28,10 @@ istio:
metrics:
enabled: false
istio:
enabled: false
grafana:
enabled: false
prometheus:
enabled: false
# Deprecated once metrics goes live
prometheus: