making ingress path configurations more customizable

Signed-off-by: Ahmadali Shafiee <mail@ahmadalli.net>
pull/5175/head
ahmadali shafiee 7 years ago
parent 5603fe8d3e
commit 1d1422dbe6

@ -75,9 +75,10 @@ ingress:
annotations: {} annotations: {}
# kubernetes.io/ingress.class: nginx # kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true" # kubernetes.io/tls-acme: "true"
paths: []
hosts: hosts:
- chart-example.local - host: chart-example.local
paths: []
tls: [] tls: []
# - secretName: chart-example-tls # - secretName: chart-example-tls
# hosts: # hosts:
@ -128,7 +129,6 @@ const defaultIgnore = `# Patterns to ignore when building packages.
const defaultIngress = `{{- if .Values.ingress.enabled -}} const defaultIngress = `{{- if .Values.ingress.enabled -}}
{{- $fullName := include "<CHARTNAME>.fullname" . -}} {{- $fullName := include "<CHARTNAME>.fullname" . -}}
{{- $ingressPaths := .Values.ingress.paths -}}
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Ingress kind: Ingress
metadata: metadata:
@ -155,10 +155,10 @@ spec:
{{- end }} {{- end }}
rules: rules:
{{- range .Values.ingress.hosts }} {{- range .Values.ingress.hosts }}
- host: {{ . | quote }} - host: {{ .host | quote }}
http: http:
paths: paths:
{{- range $ingressPaths }} {{- range .paths }}
- path: {{ . }} - path: {{ . }}
backend: backend:
serviceName: {{ $fullName }} serviceName: {{ $fullName }}

Loading…
Cancel
Save