From 41d503e90e9aa92616749d3a85c4eaeb5505a58a Mon Sep 17 00:00:00 2001 From: sheetalm Date: Tue, 4 Jun 2019 12:48:23 +0530 Subject: Ingress support for list of FQDNs in SDC WF Ingress support for list of FQDNs in SDC Workflow Change-Id: Ibe9e250887532a43ffb2645f66462ccadeb4b4a7 Issue-ID: SDC-2320 Signed-off-by: sheetalm --- .../sdc/charts/sdc-wfd-fe/templates/ingress.yaml | 34 +++++++++++++++++----- kubernetes/sdc/charts/sdc-wfd-fe/values.yaml | 1 + 2 files changed, 28 insertions(+), 7 deletions(-) (limited to 'kubernetes') diff --git a/kubernetes/sdc/charts/sdc-wfd-fe/templates/ingress.yaml b/kubernetes/sdc/charts/sdc-wfd-fe/templates/ingress.yaml index d051eafead..e10de6df20 100644 --- a/kubernetes/sdc/charts/sdc-wfd-fe/templates/ingress.yaml +++ b/kubernetes/sdc/charts/sdc-wfd-fe/templates/ingress.yaml @@ -12,7 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. +{{- define "rules.wf" -}} +- http: + paths: + - path: /workflows/ + backend: + serviceName: {{.Values.service.name}} + servicePort: {{.Values.service.internalPort}} +{{- end -}} + {{- if .Values.ingress.enabled }} + apiVersion: extensions/v1beta1 kind: Ingress metadata: @@ -29,11 +39,21 @@ metadata: {{- end }} spec: rules: - - http: - paths: - - path: /workflows/ - backend: - serviceName: {{.Values.service.name}} - servicePort: {{.Values.service.internalPort}} +{{- if .Values.ingress.hosts}} +{{- range .Values.ingress.hosts}} +{{- include "rules.wf" $ | nindent 2}} +{{- if .}} + host: {{. | quote}} +{{- end}} +{{- end}} + tls: + - hosts: +{{- range .Values.ingress.hosts}} +{{- if .}} + - {{ . | quote }} +{{- end}} +{{- end }} +{{- else}} +{{- include "rules.wf" . | nindent 2}} +{{- end}} {{ end }} - diff --git a/kubernetes/sdc/charts/sdc-wfd-fe/values.yaml b/kubernetes/sdc/charts/sdc-wfd-fe/values.yaml index d26c9279f0..639c811b08 100644 --- a/kubernetes/sdc/charts/sdc-wfd-fe/values.yaml +++ b/kubernetes/sdc/charts/sdc-wfd-fe/values.yaml @@ -80,6 +80,7 @@ service: ingress: enabled: false + hosts: ~ annotations: ingress.kubernetes.io/secure-backends: "false" nginx.ingress.kubernetes.io/secure-backends: "false" -- cgit 1.2.3-korg