Skip to content

Commit

Permalink
Merge pull request #45 from curie-data-factory/bookstack
Browse files Browse the repository at this point in the history
update ingress
  • Loading branch information
armandleopold authored Mar 24, 2022
2 parents 3dc833f + 9b17268 commit 0082d77
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 90 deletions.
2 changes: 1 addition & 1 deletion charts/bookstack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: bookstack
description: bookstack documentation platform
appVersion: "21.12.4"
version: "0.1.2"
version: "0.1.3"
home: https://www.bookstackapp.com/
icon: https://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/BookStack_logo.svg/225px-BookStack_logo.svg.png
maintainers:
Expand Down
22 changes: 10 additions & 12 deletions charts/bookstack/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
{{- if .Values.bookstack.ingress.enabled -}}
{{- $serviceName := print .Release.Name "-" .Values.bookstack.image.name }}
{{- $servicePort := print .Values.bookstack.service.targetPort .Values.bookstack.service.protocol | lower -}}
{{- if .Values.ingress.enabled -}}
{{- $serviceName := print .Release.Name "-" .Values.image.name }}
{{- $servicePort := print .Values.service.targetPort .Values.service.protocol | lower -}}

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Values.bookstack.image.name }}
name: {{ .Values.image.name }}
labels:
app: {{ .Values.bookstack.image.name }}
app: {{ .Values.image.name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
{{- if .Values.bookstack.ingress.annotations }}
{{- if .Values.ingress.annotations }}
annotations:
{{ toYaml .Values.bookstack.ingress.annotations | indent 4 }}
{{ toYaml .Values.ingress.annotations | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
- hosts:
{{- range .Values.bookstack.ingress.hostnames }}
- "{{ . }}"
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end }}
secretName: "{{ .Release.Name }}-cert-tls"
rules:
{{- range .Values.bookstack.ingress.hostnames }}
{{- range .Values.ingress.hostnames }}
- host: "{{ . }}"
http:
paths:
Expand Down
14 changes: 7 additions & 7 deletions charts/bookstack/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: "{{ .Release.Name }}-{{ .Values.bookstack.image.name }}"
name: "{{ .Release.Name }}-{{ .Values.image.name }}"
spec:
type: {{ .Values.bookstack.service.type }}
type: {{ .Values.service.type }}
ports:
- name: {{ .Values.bookstack.service.targetPort }}{{ .Values.bookstack.service.protocol | lower }}
port: {{ .Values.bookstack.service.targetPort }}
protocol: {{ .Values.bookstack.service.protocol }}
targetPort: {{ .Values.bookstack.service.targetPort }}
- name: {{ .Values.service.targetPort }}{{ .Values.service.protocol | lower }}
port: {{ .Values.service.targetPort }}
protocol: {{ .Values.service.protocol }}
targetPort: {{ .Values.service.targetPort }}
selector:
app: "{{ .Release.Name }}-{{ .Values.bookstack.image.name }}"
app: "{{ .Release.Name }}-{{ .Values.image.name }}"
release: {{ .Release.Name }}
24 changes: 12 additions & 12 deletions charts/bookstack/templates/statefullset.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: "{{ .Release.Name }}-{{ .Values.bookstack.image.name }}"
name: "{{ .Release.Name }}-{{ .Values.image.name }}"
labels:
app: "{{ .Release.Name }}-{{ .Values.bookstack.image.name }}"
app: "{{ .Release.Name }}-{{ .Values.image.name }}"
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
{{ include "bookstack.labels" . | indent 4 }}
spec:
serviceName: "{{ .Release.Name }}"
replicas: {{ .Values.bookstack.image.replicaCount }}
replicas: {{ .Values.image.replicaCount }}
selector:
matchLabels:
app: "{{ .Release.Name }}-{{ .Values.bookstack.image.name }}"
app: "{{ .Release.Name }}-{{ .Values.image.name }}"
release: {{ .Release.Name }}
template:
metadata:
labels:
app: "{{ .Release.Name }}-{{ .Values.bookstack.image.name }}"
app: "{{ .Release.Name }}-{{ .Values.image.name }}"
release: {{ .Release.Name }}
annotations:
rollme: {{ randAlphaNum 5 | quote }}
spec:
containers:
- name: {{ .Values.bookstack.image.name }}
image: "{{ .Values.bookstack.image.repository }}:{{ .Values.bookstack.image.tag }}"
{{- with .Values.bookstack.env }}
- name: {{ .Values.image.name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
{{- with .Values.env }}
env:
{{ toYaml . | indent 8 }}
{{- end }}
- name: DB_HOST
value: "{{ .Release.Name }}-mysql"
imagePullPolicy: {{ .Values.bookstack.image.pullPolicy }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: {{ .Values.bookstack.service.targetPort }}
name: {{ .Values.bookstack.service.targetPort }}{{ .Values.bookstack.service.protocol | lower }}
protocol: {{ .Values.bookstack.service.protocol }}
- containerPort: {{ .Values.service.targetPort }}
name: {{ .Values.service.targetPort }}{{ .Values.service.protocol | lower }}
protocol: {{ .Values.service.protocol }}
volumeMounts:
- mountPath: {{ .Values.persistence.mountPath }}
name: "{{ .Release.Name }}-data"
Expand Down
93 changes: 45 additions & 48 deletions charts/bookstack/values.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
tls:
cert: |-
""
key: |-
""
mysql:
image:
tag: 8.0.18-r70
Expand All @@ -19,52 +13,55 @@ mysql:
enabled: true
size: 20Gi

bookstack:
image:
replicaCount: 1
repository: lscr.io/linuxserver/bookstack
tag: "21.12.4"
pullPolicy: IfNotPresent
name: bookstack
deployRegistry: true
image:
replicaCount: 1
repository: lscr.io/linuxserver/bookstack
tag: "21.12.4"
pullPolicy: IfNotPresent
name: bookstack
deployRegistry: true

env:
- name: PUID
value: "1000"
- name: PGID
value: "1000"
- name: APP_URL
value: "https://bookstack.compagny.com"
- name: DB_USER
value: "bookstack"
- name: DB_PASS
value: "password"
- name: DB_DATABASE
value: "bookstackapp"
- name: "TZ"
value: "Europe/Paris"
- name: FILE_UPLOAD_SIZE_LIMIT
value: "50"
env:
- name: PUID
value: "1000"
- name: PGID
value: "1000"
- name: APP_URL
value: "https://bookstack.compagny.com"
- name: DB_USER
value: "bookstack"
- name: DB_PASS
value: "password"
- name: DB_DATABASE
value: "bookstackapp"
- name: "TZ"
value: "Europe/Paris"
- name: FILE_UPLOAD_SIZE_LIMIT
value: "50"

service:
type: ClusterIP
targetPort: 80
protocol: TCP
service:
type: ClusterIP
targetPort: 80
protocol: TCP

ingress:
enabled: true
hostnames:
- bookstack.compagny.com
ingress:
enabled: true
hostnames:
- bookstack.compagny.com
tls:
- hosts:
- bookstack.company.com
secretName: bookstack

annotations:
nginx.ingress.kubernetes.io/client_max_body_size: "5000m"
nginx.ingress.kubernetes.io/proxy-body-size: "5000m"
nginx.ingress.kubernetes.io/client-body-timeout: "3600"
nginx.ingress.kubernetes.io/client-header-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/affinity: "cookie"
nginx.ingress.kubernetes.io/session-cookie-expires: "86400"
nginx.ingress.kubernetes.io/session-cookie-max-age: "86400"
annotations:
nginx.ingress.kubernetes.io/client_max_body_size: "5000m"
nginx.ingress.kubernetes.io/proxy-body-size: "5000m"
nginx.ingress.kubernetes.io/client-body-timeout: "3600"
nginx.ingress.kubernetes.io/client-header-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/affinity: "cookie"
nginx.ingress.kubernetes.io/session-cookie-expires: "86400"
nginx.ingress.kubernetes.io/session-cookie-max-age: "86400"

## Persist data to a persistent volume
persistence:
Expand Down
2 changes: 1 addition & 1 deletion charts/jupyterlab/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: jupyterlab
appVersion: "jupyter/datascience-notebook:python-3.9.6"
version: "0.1.1"
version: "0.1.2"
description: jupyterlab data science notebook
home: https://github.com/curie-data-factory/helm-charts/tree/master/charts/jupyterlab
icon: https://jupyter.org/assets/homepage/main-logo.svg
Expand Down
8 changes: 4 additions & 4 deletions charts/jupyterlab/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ metadata:
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end }}
rules:
- host: "{{ .Values.ingress.url }}"
http:
Expand All @@ -26,8 +30,4 @@ spec:
name: "{{ .Release.Name }}-service"
port:
name: {{ .Values.service.targetPort }}{{ .Values.service.protocol | lower }}
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/nexus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: nexus
description: Sonatype Nexus is an open source repository manager
type: application
appVersion: "3.38.0"
version: "1.2.2"
version: "1.2.3"
home: https://github.com/curie-data-factory/helm-charts/tree/master/charts/nexus
icon: https://help.sonatype.com/docs/files/331022/34537964/3/1564671303641/NexusRepo_Icon.png
sources:
Expand Down
8 changes: 4 additions & 4 deletions charts/nexus/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ metadata:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end }}
rules:
- host: "{{ .Values.ingress.url }}"
http:
Expand All @@ -84,8 +88,4 @@ spec:
name: "{{ .Release.Name }}-{{ .Values.image.name }}"
port:
number: 8081
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end -}}
{{- end -}}

0 comments on commit 0082d77

Please sign in to comment.