making ingress path configurations more customizable (#5175)

* making ingress path configurations more customizable

Signed-off-by: Ahmadali Shafiee <mail@ahmadalli.net>

* update notes ingress reference

Signed-off-by: Ahmadali Shafiee <mail@ahmadalli.net>
pull/5252/head
ahmadali shafiee 8 years ago committed by Matthew Fisher
parent 147dc225e2
commit d3373f568c

@ -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 }}
@ -245,8 +245,8 @@ spec:
const defaultNotes = `1. Get the application URL by running these commands: const defaultNotes = `1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }} {{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }} {{- range $host := .Values.ingress.hosts }}
{{- range $.Values.ingress.paths }} {{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host }}{{ . }} http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- else if contains "NodePort" .Values.service.type }} {{- else if contains "NodePort" .Values.service.type }}

Loading…
Cancel
Save