Add initial Helm chart for BookStack deployment with configuration files
This commit is contained in:
42
bookstack/templates/ingress.yaml
Normal file
42
bookstack/templates/ingress.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
{{- 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 }}
|
||||
Reference in New Issue
Block a user