Skip to content

Commit

Permalink
making ingress path configurations more customizable (helm#5175)
Browse files Browse the repository at this point in the history
* making ingress path configurations more customizable

Signed-off-by: Ahmadali Shafiee <[email protected]>

* update notes ingress reference

Signed-off-by: Ahmadali Shafiee <[email protected]>
  • Loading branch information
ahmadalli authored and Matthew Fisher committed Feb 1, 2019
1 parent 147dc22 commit d3373f5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pkg/chartutil/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ ingress:
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
paths: []
hosts:
- chart-example.local
- host: chart-example.local
paths: []
tls: []
# - secretName: chart-example-tls
# hosts:
Expand Down Expand Up @@ -128,7 +129,6 @@ const defaultIgnore = `# Patterns to ignore when building packages.

const defaultIngress = `{{- if .Values.ingress.enabled -}}
{{- $fullName := include "<CHARTNAME>.fullname" . -}}
{{- $ingressPaths := .Values.ingress.paths -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
Expand All @@ -155,10 +155,10 @@ spec:
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . | quote }}
- host: {{ .host | quote }}
http:
paths:
{{- range $ingressPaths }}
{{- range .paths }}
- path: {{ . }}
backend:
serviceName: {{ $fullName }}
Expand Down Expand Up @@ -245,8 +245,8 @@ spec:
const defaultNotes = `1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range $.Values.ingress.paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host }}{{ . }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
Expand Down

0 comments on commit d3373f5

Please sign in to comment.