diff options
Diffstat (limited to 'kubernetes/sdc/charts/sdc-wfd-fe/templates')
-rw-r--r-- | kubernetes/sdc/charts/sdc-wfd-fe/templates/ingress.yaml | 34 |
1 files changed, 27 insertions, 7 deletions
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 }} - |