-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yaml
36 lines (36 loc) · 865 Bytes
/
template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
apiVersion: configuration.konghq.com/v1
kind: KongIngress
metadata:
name: {{.Name}}
namespace: {{.NameSpace}}
proxy:
path: {{.BasePath}}
connect_timeout: {{.ConnectTimeout}}
retries: {{.Retries}}
read_timeout: {{.ReadTimeout}}
write_timeout: {{.WriteTimeout}}
route:
protocols:{{range .RouteProtocols}}
- {{.}} {{end}}
methods: {{range .RouteMethods}}
- {{.}} {{end}}
strip_path: false
preserve_host: true
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{.Name}}-ingress
namespace: {{.NameSpace}}
annotations:
kubernetes.io/ingress.class: "{{if .IsolationEnabled}}{{.NameSpace}}{{else}}kong{{end}}"
spec:
rules:
- host: {{.Host}}
http:
paths: {{range .Paths}}
- path: {{.URI}}
backend:
serviceName: {{.ServiceName}}
servicePort: {{.ServicePort}}
{{end}}