Code Review
/
ric-plt
/
ric-dep.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Update Kong ingress controller to version 1.4. It fixes the occasional 404 error.
[ric-plt/ric-dep.git]
/
helm
/
infrastructure
/
subcharts
/
kong
/
templates
/
ingress-proxy.yaml
diff --git
a/helm/infrastructure/subcharts/kong/templates/ingress-proxy.yaml
b/helm/infrastructure/subcharts/kong/templates/ingress-proxy.yaml
index
002f0cd
..
9976df9
100755
(executable)
--- a/
helm/infrastructure/subcharts/kong/templates/ingress-proxy.yaml
+++ b/
helm/infrastructure/subcharts/kong/templates/ingress-proxy.yaml
@@
-2,23
+2,29
@@
{{- $serviceName := include "kong.fullname" . -}}
{{- $servicePort := include "kong.ingress.servicePort" .Values.proxy -}}
{{- $path := .Values.proxy.ingress.path -}}
{{- $serviceName := include "kong.fullname" . -}}
{{- $servicePort := include "kong.ingress.servicePort" .Values.proxy -}}
{{- $path := .Values.proxy.ingress.path -}}
-apiVersion: networking.k8s.io/v1beta1
+{{- $hosts_count := len .Values.proxy.ingress.hosts -}}
+apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "kong.fullname" . }}-proxy
labels:
kind: Ingress
metadata:
name: {{ template "kong.fullname" . }}-proxy
labels:
- app: {{ template "kong.name" . }}
- chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
- release: "{{ .Release.Name }}"
- heritage: "{{ .Release.Service }}"
+ {{- include "kong.metaLabels" . | nindent 4 }}
annotations:
{{- range $key, $value := .Values.proxy.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
rules:
annotations:
{{- range $key, $value := .Values.proxy.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
rules:
+ {{- if eq $hosts_count 0 }}
+ - http:
+ paths:
+ - path: {{ $path }}
+ backend:
+ serviceName: {{ $serviceName }}-proxy
+ servicePort: {{ $servicePort }}
+ {{ else -}}
{{- range $host := .Values.proxy.ingress.hosts }}
{{- range $host := .Values.proxy.ingress.hosts }}
- - host: {{ $host }}
+ - host: {{ $host
| quote
}}
http:
paths:
- path: {{ $path }}
http:
paths:
- path: {{ $path }}
@@
-26,6
+32,7
@@
spec:
serviceName: {{ $serviceName }}-proxy
servicePort: {{ $servicePort }}
{{- end -}}
serviceName: {{ $serviceName }}-proxy
servicePort: {{ $servicePort }}
{{- end -}}
+ {{- end -}}
{{- if .Values.proxy.ingress.tls }}
tls:
{{ toYaml .Values.proxy.ingress.tls | indent 4 }}
{{- if .Values.proxy.ingress.tls }}
tls:
{{ toYaml .Values.proxy.ingress.tls | indent 4 }}