diff --git a/charts/kubezero-metrics/templates/istio-service.yaml b/charts/kubezero-metrics/templates/istio-service.yaml new file mode 100644 index 00000000..2a3490b9 --- /dev/null +++ b/charts/kubezero-metrics/templates/istio-service.yaml @@ -0,0 +1,16 @@ +{{- if .Values.grafana.istio.enabled }} +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + name: grafana + namespace: monitoring +spec: + hosts: + - {{ .Values.grafana.istio.url }} + gateways: + - {{ .Values.grafana.istio.gateway }} + http: + - route: + - destination: + host: grafana +{{- end }} diff --git a/charts/kubezero-metrics/values.yaml b/charts/kubezero-metrics/values.yaml index 9b76446b..1e9de2df 100644 --- a/charts/kubezero-metrics/values.yaml +++ b/charts/kubezero-metrics/values.yaml @@ -1,3 +1,9 @@ +grafana: + istio: + enabled: false + url: "" + gateway: ingressgateway.istio-system.svc.cluster.local + prometheus-operator: alertmanager: enabled: false diff --git a/deploy/templates/values.yaml b/deploy/templates/values.yaml index 673a1d6f..2a358244 100644 --- a/deploy/templates/values.yaml +++ b/deploy/templates/values.yaml @@ -94,6 +94,12 @@ kubezero: metrics: enabled: {{ .Values.metrics.enabled }} + {{- if and .Values.metrics.istio.enabled .Values.istio.enabled }} + istio: + {{- with .Values.metrics.istio }} + {{- toYaml . | nindent 6 }} + {{- end }} + {{- end }} argo-cd: {{- with index .Values "argo-cd" "server" }} @@ -104,7 +110,7 @@ argo-cd: configs: {{- toYaml . | nindent 4 }} {{- end }} - {{- if and ( not .Values.bootstrap ) ( index .Values "argo-cd" "istio" "enabled" ) .Values.istio.enabled }} + {{- if and ( index .Values "argo-cd" "istio" "enabled" ) .Values.istio.enabled }} istio: {{- with index .Values "argo-cd" "istio" }} {{- toYaml . | nindent 4 }} diff --git a/deploy/values.yaml b/deploy/values.yaml index 4572d315..2bbbfe77 100644 --- a/deploy/values.yaml +++ b/deploy/values.yaml @@ -27,6 +27,8 @@ istio: metrics: enabled: false + istio: + enabled: false # Deprecated once metrics goes live prometheus: