50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
apiVersion: networking.istio.io/v1beta1
|
|
kind: Gateway
|
|
metadata:
|
|
name: {{ include "app.fullname" . }}
|
|
labels:
|
|
{{- include "app.labels" . | nindent 4 }}
|
|
spec:
|
|
selector:
|
|
istio: ingressgateway
|
|
servers:
|
|
- port:
|
|
number: 80
|
|
name: http
|
|
protocol: HTTP
|
|
hosts:
|
|
- {{ .Values.service.host }}
|
|
{{- if .Values.service.ssl.enabled }}
|
|
- port:
|
|
number: 443
|
|
name: https
|
|
protocol: HTTPS
|
|
hosts:
|
|
- {{ .Values.service.host }}
|
|
tls:
|
|
mode: SIMPLE
|
|
credentialName: {{ include "app.fullname" . }}
|
|
{{- end }}
|
|
---
|
|
apiVersion: networking.istio.io/v1beta1
|
|
kind: VirtualService
|
|
metadata:
|
|
name: {{ include "app.fullname" . }}
|
|
labels:
|
|
{{- include "app.labels" . | nindent 4 }}
|
|
spec:
|
|
hosts:
|
|
- {{ .Values.service.host }}
|
|
gateways:
|
|
- {{ include "app.fullname" . }}
|
|
http:
|
|
- name: primary
|
|
headers:
|
|
response:
|
|
set:
|
|
Cache-Control: public, max-age=31536000, immutable
|
|
route:
|
|
- destination:
|
|
host: {{ include "app.fullname" . }}
|
|
port:
|
|
number: {{ .Values.service.app_port }}
|