Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add istio gateway template #183

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions incubator/monochart/templates/istio_gateway.yaml
Original file line number Diff line number Diff line change
@@ -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 -}}
26 changes: 26 additions & 0 deletions incubator/monochart/values.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,29 @@ deployment:
## Read more about kube2iam to provide access to s3 https://github.com/jtblin/kube2iam
# iam.amazonaws.com/role: role-arn
labels: {}

istio_gateways:
- name: gateway1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yciabaud I think we should change the pattern now istio_gateways defined

istio_gateways:
  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

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

25 changes: 25 additions & 0 deletions incubator/monochart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,28 @@ ingress:
# - secretName: server-tls
# hosts:
# - domain.com

# Istio gateway
istio_gateways:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add [] since the list is commented out?

Suggested change
istio_gateways:
istio_gateways: []

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@goruha 👆

# - 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