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