Add initial Helm chart for BookStack deployment with configuration files
This commit is contained in:
21
bookstack/templates/secret-db.yaml
Normal file
21
bookstack/templates/secret-db.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
{{- /*
|
||||
Einmaliges Secret: wird nur angelegt, wenn es noch nicht existiert (lookup).
|
||||
*/}}
|
||||
{{- $secretName := include "bookstack.db.secretName" . }}
|
||||
{{- if and (not (lookup "v1" "Secret" .Release.Namespace $secretName)) .Values.db.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
type: Opaque
|
||||
metadata:
|
||||
name: {{ $secretName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
helm.sh/resource-policy: keep
|
||||
labels:
|
||||
{{- include "bookstack.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: database
|
||||
data:
|
||||
mariadb-root-password: {{ default (randAlphaNum 32) .Values.db.auth.rootPassword | b64enc | quote }}
|
||||
mariadb-password: {{ default (randAlphaNum 32) .Values.db.auth.password | b64enc | quote }}
|
||||
mariadb-replication-password: {{ default (randAlphaNum 32) .Values.db.auth.replicationPassword | b64enc | quote }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user