No Description

virtual-service.yaml 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. {{- if .Values.istio.enabled }}
  2. apiVersion: "{{ .Values.istio.apiVersion }}"
  3. kind: VirtualService
  4. metadata:
  5. name: {{ template "common.names.fullname" . }}
  6. namespace: {{ include "common.names.namespace" . | quote }}
  7. labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
  8. {{- if or .Values.istio.gateway.annotations .Values.commonAnnotations }}
  9. {{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.istio.virtualService.annotations .Values.commonAnnotations) "context" .) }}
  10. annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
  11. {{- end }}
  12. spec:
  13. hosts: {{ .Values.istio.hosts }}
  14. gateways:
  15. - {{ include "common.names.fullname" . }}
  16. http:
  17. - name: backend
  18. match:
  19. - uri:
  20. prefix: /api
  21. route:
  22. - destination:
  23. host: {{ include "shuffle.backend.name" . }}
  24. port:
  25. number: {{ .Values.backend.containerPorts.http }}
  26. {{- with .Values.istio.virtualService.backendHeaders }}
  27. headers: {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }}
  28. {{- end }}
  29. - name: frontend
  30. route:
  31. - destination:
  32. host: {{ include "shuffle.frontend.name" . }}
  33. port:
  34. number: {{ .Values.frontend.containerPorts.http }}
  35. {{- with .Values.istio.virtualService.frontendHeaders }}
  36. headers: {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }}
  37. {{- end }}
  38. {{- end }}