37 lines
885 B
YAML
37 lines
885 B
YAML
---
|
|
istio:
|
|
templates:
|
|
- |
|
|
{{ range .Values.istio }}
|
|
---
|
|
apiVersion: networking.istio.io/v1beta1
|
|
kind: VirtualService
|
|
metadata:
|
|
name: {{ .name }}
|
|
spec:
|
|
gateways:
|
|
- "istio-system/{{ .gateway }}"
|
|
hosts:
|
|
- {{ .hostname | quote }}
|
|
{{- if eq .kind "http" }}
|
|
http:
|
|
- match:
|
|
- uri:
|
|
prefix: /
|
|
route:
|
|
- destination:
|
|
host: {{ .service }}
|
|
port:
|
|
number: {{ .port }}
|
|
{{- else if eq .kind "tcp" }}
|
|
tcp:
|
|
- match:
|
|
- port: {{ .port_match }}
|
|
route:
|
|
- destination:
|
|
host: {{ .service }}
|
|
port:
|
|
number: {{ .port }}
|
|
{{ end }}
|
|
{{ end }}
|