43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
{{- if .Values.ingress.enabled }}
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
{{- with .Values.ingress.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "bookstack.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: bookstack-app
|
|
name: {{ include "bookstack.fullname" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
spec:
|
|
{{- with .Values.ingress.class }}
|
|
ingressClassName: {{ . | quote }}
|
|
{{- end }}
|
|
{{- with .Values.ingress.tls }}
|
|
tls:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
rules:
|
|
- host: {{ required "Please provide a hostname for the ingress" .Values.ingress.hostname }}
|
|
http:
|
|
paths:
|
|
- backend:
|
|
service:
|
|
name: {{ include "bookstack.fullname" . }}
|
|
port:
|
|
number: {{ .Values.service.port | default 8080}}
|
|
path: {{ .Values.ingress.path | default "/" }}
|
|
pathType: {{ .Values.ingress.pathType | default "Prefix" }}
|
|
{{- if and (eq .Values.bookstack.mail.driver "smtp") (not .Values.bookstack.mail.host) }}
|
|
- backend:
|
|
service:
|
|
name: {{ include "bookstack.mailpit.name" . }}
|
|
port:
|
|
number: 8025
|
|
path: /mailpit
|
|
pathType: Prefix
|
|
{{- end }}
|
|
{{- end }}
|