53a7d2f2c4
Signed-off-by: Pascal Sthamer <10992664+P4sca1@users.noreply.github.com>
39 lines
1.6 KiB
YAML
39 lines
1.6 KiB
YAML
{{- if .Values.istio.enabled }}
|
|
apiVersion: "{{ .Values.istio.apiVersion }}"
|
|
kind: VirtualService
|
|
metadata:
|
|
name: {{ template "common.names.fullname" . }}
|
|
namespace: {{ include "common.names.namespace" . | quote }}
|
|
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
{{- if or .Values.istio.gateway.annotations .Values.commonAnnotations }}
|
|
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.istio.virtualService.annotations .Values.commonAnnotations) "context" .) }}
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
hosts: {{ .Values.istio.hosts }}
|
|
gateways:
|
|
- {{ include "common.names.fullname" . }}
|
|
http:
|
|
- name: backend
|
|
match:
|
|
- uri:
|
|
prefix: /api
|
|
route:
|
|
- destination:
|
|
host: {{ include "shuffle.backend.name" . }}
|
|
port:
|
|
number: {{ .Values.backend.containerPorts.http }}
|
|
{{- with .Values.istio.virtualService.backendHeaders }}
|
|
headers: {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }}
|
|
{{- end }}
|
|
- name: frontend
|
|
route:
|
|
- destination:
|
|
host: {{ include "shuffle.frontend.name" . }}
|
|
port:
|
|
number: {{ .Values.frontend.containerPorts.http }}
|
|
{{- with .Values.istio.virtualService.frontendHeaders }}
|
|
headers: {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|