From 130eb26ab446293f5f05d06f92dd3c6f6f98ff64 Mon Sep 17 00:00:00 2001 From: Scott Hussey Date: Mon, 9 Apr 2018 11:48:44 -0500 Subject: [PATCH] [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 --- .../templates/ingress-shipyard-api.yaml | 29 ++----------------- charts/shipyard/values.yaml | 6 +++- 2 files changed, 7 insertions(+), 28 deletions(-) diff --git a/charts/shipyard/templates/ingress-shipyard-api.yaml b/charts/shipyard/templates/ingress-shipyard-api.yaml index 36ae3fa8..bab27ff9 100644 --- a/charts/shipyard/templates/ingress-shipyard-api.yaml +++ b/charts/shipyard/templates/ingress-shipyard-api.yaml @@ -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 }} diff --git a/charts/shipyard/values.yaml b/charts/shipyard/values.yaml index 93f70bb9..87e20ef7 100644 --- a/charts/shipyard/values.yaml +++ b/charts/shipyard/values.yaml @@ -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