[400207] Fix shipyard FQDN

- Update the shipyard chart to leverage the HTK routine
  for producing the Ingress manifests to be compatible
  with Ingress public endpoints.

Change-Id: I864d0e787cd4cd1c3099894b27d22835b2177b7a
This commit is contained in:
Scott Hussey 2018-04-09 11:48:44 -05:00
parent 017faba69f
commit 130eb26ab4
2 changed files with 7 additions and 28 deletions

View File

@ -18,32 +18,7 @@ limitations under the License.
{{- if .Values.manifests.ingress_shipyard_api }}
{{- $envAll := . }}
{{- if .Values.network.shipyard.ingress.public }}
{{- $backendServiceType := "shipyard" }}
{{- $backendPort := "http" }}
{{- $ingressName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
{{- $backendName := tuple $backendServiceType "internal" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
{{- $hostName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
{{- $hostNameNamespaced := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}
{{- $hostNameFull := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }}
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $ingressName }}
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/proxy-read-timeout: {{ .Values.network.shipyard.ingress.proxy_read_timeout | quote }}
spec:
rules:
{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced $hostNameFull }}
- host: {{ $vHost }}
http:
paths:
- path: /
backend:
serviceName: {{ $backendName }}
servicePort: {{ $backendPort }}
{{- end }}
{{- $ingressOpts := dict "envAll" . "backendService" "shipyard" "backendServiceType" "shipyard" "backendPort" "http" -}}
{{- $ingressOpts | include "helm-toolkit.manifests.ingress" -}}
{{- end }}
{{- end }}

View File

@ -44,7 +44,11 @@ network:
shipyard:
ingress:
public: true
proxy_read_timeout: 600
classes:
namespace: "nginx"
cluster: "nginx-cluster"
annotations:
nginx.ingress.kubernetes.io/proxy_read_timeout: 600
port: 9000
node_port: 31901
enable_node_port: false