Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
fix ingress def
Browse files Browse the repository at this point in the history
  • Loading branch information
alexnuttinck committed Oct 12, 2020
1 parent 4f2ac1f commit 6fb42d1
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "apache-nifi.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
{{- if .Values.properties.clusterSecure -}}
{{- $ingressPort := .Values.service.httpsPort -}}
{{- else }}
{{- $ingressPort := .Values.service.httpPort -}}
{{- end }}
{{- $ingressHttpsPort := .Values.service.httpsPort -}}
{{- $ingressHttpPort := .Values.service.httpPort -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
Expand All @@ -32,6 +29,7 @@ spec:
secretName: {{ .secretName }}
{{- end }}
{{- end }}
{{- if .Values.properties.clusterSecure}}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . }}
Expand All @@ -40,6 +38,18 @@ spec:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: {{ $ingressPort }}
servicePort: {{ $ingressHttpsPort }}
{{- end }}
{{- else}}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: {{ $ingressHttpPort }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit 6fb42d1

Please sign in to comment.