Files
charts/bitnami/tomcat/templates/ingress.yaml
Miguel A. Cabrera Minagorri da5502b22a Add ingress controller to Tomcat
Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>
2019-07-25 14:09:10 +00:00

34 lines
899 B
YAML

{{- if .Values.ingress.enabled }}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "tomcat.fullname" . }}
labels:
app: "{{ template "tomcat.fullname" . }}"
chart: "{{ template "tomcat.chart" . }}"
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
annotations:
{{- if .Values.ingress.certManager }}
kubernetes.io/tls-acme: "true"
{{- end }}
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .name }}
http:
paths:
- path: {{ default "/" .path }}
backend:
serviceName: "{{ template "tomcat.fullname" $ }}"
servicePort: http
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end }}
{{- end }}