feat(bookstack): Add autogenerated app_key (#2194)
This commit is contained in:
@@ -27,7 +27,7 @@ name: bookstack
|
|||||||
sources:
|
sources:
|
||||||
- https://www.bookstackapp.com/
|
- https://www.bookstackapp.com/
|
||||||
- https://hub.docker.com/r/linuxserver/bookstack
|
- https://hub.docker.com/r/linuxserver/bookstack
|
||||||
version: 1.0.3
|
version: 1.1.0
|
||||||
annotations:
|
annotations:
|
||||||
truecharts.org/catagories: |
|
truecharts.org/catagories: |
|
||||||
- media
|
- media
|
||||||
|
|||||||
@@ -75,7 +75,19 @@ questions:
|
|||||||
- value: "OnDelete"
|
- value: "OnDelete"
|
||||||
description: "(Legacy) OnDelete: ignore .spec.template changes"
|
description: "(Legacy) OnDelete: ignore .spec.template changes"
|
||||||
# Include{controllerExpert}
|
# Include{controllerExpert}
|
||||||
|
- variable: env
|
||||||
|
group: "Container Configuration"
|
||||||
|
label: "Image Environment"
|
||||||
|
schema:
|
||||||
|
additional_attrs: true
|
||||||
|
type: dict
|
||||||
|
attrs:
|
||||||
|
- variable: APP_URL
|
||||||
|
label: "APP_URL"
|
||||||
|
description: "Application URL eg. https://bookstack.mydomain.com"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
# Include{containerConfig}
|
# Include{containerConfig}
|
||||||
|
|
||||||
- variable: service
|
- variable: service
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{{/* Define the secrets */}}
|
||||||
|
{{- define "bookstack.secrets" -}}
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
type: Opaque
|
||||||
|
metadata:
|
||||||
|
name: bookstack-secrets
|
||||||
|
{{- $bookstackprevious := lookup "v1" "Secret" .Release.Namespace "bookstack-secrets" }}
|
||||||
|
{{- $app_key := "" }}
|
||||||
|
data:
|
||||||
|
{{- if $bookstackprevious}}
|
||||||
|
APP_KEY: {{ index $bookstackprevious.data "APP_KEY" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $app_key := randAlphaNum 32 }}
|
||||||
|
APP_KEY: {{ $app_key | b64enc }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- end -}}
|
||||||
@@ -1 +1,8 @@
|
|||||||
{{ include "common.all" . }}
|
{{/* Make sure all variables are set properly */}}
|
||||||
|
{{- include "common.setup" . }}
|
||||||
|
|
||||||
|
{{/* Render secrets for bookstack */}}
|
||||||
|
{{- include "bookstack.secrets" . }}
|
||||||
|
|
||||||
|
{{/* Render the templates */}}
|
||||||
|
{{ include "common.postSetup" . }}
|
||||||
|
|||||||
@@ -3,11 +3,9 @@ image:
|
|||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
tag: v22.02.20220226@sha256:835888c1a466075efd5326a1c52d182c0c37558f60e34fa2a8dd54def8d22e45
|
tag: v22.02.20220226@sha256:835888c1a466075efd5326a1c52d182c0c37558f60e34fa2a8dd54def8d22e45
|
||||||
|
|
||||||
# -- environment variables. See more environment variables in the [bookstack documentation](https://hub.docker.com/r/linuxserver/bookstack)
|
|
||||||
# @default -- See below
|
|
||||||
env:
|
env:
|
||||||
DB_USER: bookstack
|
DB_USER: "{{ .Values.mariadb.mariadbUsername }}"
|
||||||
DB_DATABASE: bookstack
|
DB_DATABASE: "{{ .Values.mariadb.mariadbDatabase }}"
|
||||||
|
|
||||||
securityContext:
|
securityContext:
|
||||||
readOnlyRootFilesystem: false
|
readOnlyRootFilesystem: false
|
||||||
@@ -17,8 +15,6 @@ podSecurityContext:
|
|||||||
runAsUser: 0
|
runAsUser: 0
|
||||||
runAsGroup: 0
|
runAsGroup: 0
|
||||||
|
|
||||||
# -- Configures service settings for the chart.
|
|
||||||
# @default -- See values.yaml
|
|
||||||
service:
|
service:
|
||||||
main:
|
main:
|
||||||
ports:
|
ports:
|
||||||
@@ -26,8 +22,6 @@ service:
|
|||||||
port: 10112
|
port: 10112
|
||||||
targetPort: 80
|
targetPort: 80
|
||||||
|
|
||||||
# -- Configure persistence settings for the chart under this key.
|
|
||||||
# @default -- See values.yaml
|
|
||||||
persistence:
|
persistence:
|
||||||
varrun:
|
varrun:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -44,6 +38,10 @@ envValueFrom:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: mariadbcreds
|
name: mariadbcreds
|
||||||
key: mariadb-password
|
key: mariadb-password
|
||||||
|
APP_KEY:
|
||||||
|
secretKeyRef:
|
||||||
|
name: bookstack-secrets
|
||||||
|
key: APP_KEY
|
||||||
|
|
||||||
mariadb:
|
mariadb:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
Reference in New Issue
Block a user