{{- if and .Values.istio.enabled .Values.istio.virtualService.enabled -}} apiVersion: networking.istio.io/v1beta1 kind: VirtualService metadata: name: {{ template "minio.fullname" . }} namespace: {{ .Release.Namespace }} labels: app: {{ template "minio.fullname" . }} {{- include "minio.labels" . | nindent 4 }} {{- if .Values.istio.virtualService.labels }} {{ toYaml .Values.istio.virtualservice.labels | indent 4 }} {{- end }} {{- if .Values.istio.virtualService.annotations }} annotations: {{ toYaml .Values.istio.virtualService.annotations | indent 2 }} {{- end }} spec: gateways: {{- range .Values.istio.virtualService.gateways }} - {{ . }} {{- end }} hosts: {{- range .Values.istio.virtualService.hosts }} - {{ tpl . $}} {{- end }} http: - match: - uri: prefix: /minio/v2/metrics/cluster route: - destination: host: {{ include "minio.fullname" . | trim }}-console port: number: {{ include "minio.servicePort" . | trim }} fault: abort: percentage: value: 100 httpStatus: 403 - match: - uri: prefix: / route: - destination: # Note: the minio operator creates the service for the tenant with a fixed name host: {{ include "minio.fullname" . | trim }}-console port: number: {{ include "minio.servicePort" . | trim }} {{ end }}