diff --git a/incubator/monochart/templates/istio_gateway.yaml b/incubator/monochart/templates/istio_gateway.yaml new file mode 100644 index 00000000..f222f9cc --- /dev/null +++ b/incubator/monochart/templates/istio_gateway.yaml @@ -0,0 +1,36 @@ +{{- range .Values.istio_gateways }} +apiVersion: networking.istio.io/v1alpha3 +kind: Gateway +metadata: + name: {{ .name }} +{{- with .annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} + labels: +{{ include "common.labels.standard" $ | indent 4 }} +{{- with .labels }} +{{ toYaml .| indent 4 }} +{{- end }} +spec: + selector: +{{- with .selector }} +{{ toYaml .| indent 4 }} +{{- end }} + servers: +{{- range $server := .servers }} + - hosts: +{{- range $host := $server.hosts }} + - {{ $host }} +{{- end -}} +{{- with $server.port }} + port: +{{ toYaml . | indent 6 }} +{{- end -}} +{{- with $server.tls }} + tls: +{{ toYaml . | indent 6 }} +{{- end -}} +{{- end }} +--- +{{- end -}} diff --git a/incubator/monochart/values.example.yaml b/incubator/monochart/values.example.yaml index 87bce00f..9d16130d 100644 --- a/incubator/monochart/values.example.yaml +++ b/incubator/monochart/values.example.yaml @@ -65,3 +65,29 @@ deployment: ## https://github.com/jtblin/kube2iam # iam.amazonaws.com/role: role-arn labels: {} + +istio_gateways: + - name: gateway1 + enabled: true + selector: + istio: istio-gateway + servers: + - hosts: + - '*.domain.com' + port: + name: http + number: 80 + protocol: HTTP + tls: + httpsRedirect: true + - hosts: + - '*.domain.com' + port: + name: http-tls + number: 443 + protocol: HTTP + tls: + mode: SIMPLE + privateKey: /etc/istio/ingressgateway-certs/tls.key + serverCertificate: /etc/istio/ingressgateway-certs/tls.crt + \ No newline at end of file diff --git a/incubator/monochart/values.yaml b/incubator/monochart/values.yaml index d413be74..48964634 100644 --- a/incubator/monochart/values.yaml +++ b/incubator/monochart/values.yaml @@ -341,3 +341,28 @@ ingress: # - secretName: server-tls # hosts: # - domain.com + +# Istio gateway +istio_gateways: +# - name: gateway1 +# selector: +# istio: istio-gateway +# servers: +# - hosts: +# - '*.domain.com' +# port: +# name: http +# number: 80 +# protocol: HTTP +# tls: +# httpsRedirect: true +# - hosts: +# - '*.domain.com' +# port: +# name: http-tls +# number: 443 +# protocol: HTTP +# tls: +# mode: SIMPLE +# privateKey: /etc/istio/ingressgateway-certs/tls.key +# serverCertificate: /etc/istio/ingressgateway-certs/tls.crt \ No newline at end of file