summaryrefslogtreecommitdiffstats
path: root/deploy/example-webhook/templates/ingress.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/example-webhook/templates/ingress.yaml')
-rw-r--r--deploy/example-webhook/templates/ingress.yaml38
1 files changed, 38 insertions, 0 deletions
diff --git a/deploy/example-webhook/templates/ingress.yaml b/deploy/example-webhook/templates/ingress.yaml
new file mode 100644
index 0000000..37d8b61
--- /dev/null
+++ b/deploy/example-webhook/templates/ingress.yaml
@@ -0,0 +1,38 @@
+{{- if .Values.ingress.enabled -}}
+{{- $fullName := include "example-webhook.fullname" . -}}
+{{- $ingressPath := .Values.ingress.path -}}
+apiVersion: extensions/v1beta1
+kind: Ingress
+metadata:
+ name: {{ $fullName }}
+ labels:
+ app: {{ include "example-webhook.name" . }}
+ chart: {{ include "example-webhook.chart" . }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+{{- with .Values.ingress.annotations }}
+ annotations:
+{{ toYaml . | indent 4 }}
+{{- end }}
+spec:
+{{- if .Values.ingress.tls }}
+ tls:
+ {{- range .Values.ingress.tls }}
+ - hosts:
+ {{- range .hosts }}
+ - {{ . | quote }}
+ {{- end }}
+ secretName: {{ .secretName }}
+ {{- end }}
+{{- end }}
+ rules:
+ {{- range .Values.ingress.hosts }}
+ - host: {{ . | quote }}
+ http:
+ paths:
+ - path: {{ $ingressPath }}
+ backend:
+ serviceName: {{ $fullName }}
+ servicePort: http
+ {{- end }}
+{{- end }}