[stable/gocd] add host in template ingress.yaml instead of using default backend (#10983)

* if there is no host in template ingress.yaml, use default backend

Signed-off-by: cola <colachg@gmail.com>

* Update CHANGELOG

Signed-off-by: cola <colachg@gmail.com>
This commit is contained in:
Cola Chen
2019-01-31 08:27:54 -08:00
committed by Kubernetes Prow Robot
parent 95f3e724fc
commit f672cf7c44
4 changed files with 23 additions and 8 deletions
+6
View File
@@ -1,3 +1,9 @@
### 1.6.6
* [84bd7fe](https://github.com/kubernetes/charts/commit/f44d408):
- If there is no host in template ingress.yaml, use default backend.
### 1.6.5
* [f44d408](https://github.com/kubernetes/charts/commit/f44d408):
+1 -1
View File
@@ -1,6 +1,6 @@
name: gocd
home: https://www.gocd.org/
version: 1.6.5
version: 1.6.6
appVersion: 19.1.0
description: GoCD is an open-source continuous delivery server to model and visualize complex workflows with ease.
icon: https://gocd.github.io/assets/images/go-icon-black-192x192.png
+14 -5
View File
@@ -15,16 +15,25 @@ metadata:
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
backend:
serviceName: {{ template "gocd.fullname" . }}-server
servicePort: {{ .Values.server.service.httpPort }}
{{- if .Values.server.ingress.hosts }}
{{ $dot := .}}
rules:
{{- range $host := .Values.server.ingress.hosts }}
- host: {{ $host }}
{{- end -}}
http:
paths:
- backend:
serviceName: {{ template "gocd.fullname" $dot }}-server
servicePort: {{ $dot.Values.server.service.httpPort }}
{{- end }}
{{- else }}
backend:
serviceName: {{ template "gocd.fullname" . }}-server
servicePort: {{ .Values.server.service.httpPort }}
{{- end -}}
{{- if .Values.server.ingress.tls }}
tls:
{{ toYaml .Values.server.ingress.tls | indent 4 }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
+2 -2
View File
@@ -115,8 +115,8 @@ server:
# server.ingress.enabled is the toggle to enable/disable GoCD Server Ingress
enabled: true
# server.ingress.hosts is used to create an Ingress record.
# hosts:
# - ci.example.com
# hosts:
# - ci.example.com
annotations:
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"