Add initial Helm chart for BookStack deployment with configuration files
This commit is contained in:
35
bookstack/templates/service.yaml
Normal file
35
bookstack/templates/service.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "bookstack.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: bookstack-app
|
||||
name: {{ include "bookstack.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.service.port | default 8080 }}
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
{{- if and (eq .Values.service.type "NodePort") .Values.service.nodePort }}
|
||||
nodePort: {{ .Values.service.nodePort | quote }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "bookstack.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: bookstack-app
|
||||
{{- if or (eq .Values.service.type "ClusterIP") (eq .Values.service.type "Headless") }}
|
||||
type: ClusterIP
|
||||
{{- else if eq .Values.service.type "NodePort" }}
|
||||
type: NodePort
|
||||
{{- else if eq .Values.service.type "LoadBalancer" }}
|
||||
type: LoadBalancer
|
||||
{{- with .Values.service.loadBalancerIP }}
|
||||
loadBalancerIP: {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if or (eq .Values.service.type "Headless") }}
|
||||
clusterIP: None
|
||||
{{- else if .Values.service.clusterIP }}
|
||||
clusterIP: {{ .Values.service.clusterIP | quote }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user