{{- if (index .Values "kiali-server" "istio" "enabled") }}
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
  name: {{ .Release.Name }}-kiali
  namespace: {{ .Release.Namespace }}
  labels:
{{ include "kubezero-lib.labels" . | indent 4 }}
spec:
  hosts:
  - {{ index .Values "kiali-server" "istio" "url" }}
  gateways:
  - {{ index .Values "kiali-server" "istio" "gateway" }}
  http:
  - route:
    - destination:
        host: kiali
{{- end }}
