Make database configurable

This commit is contained in:
paul 2021-01-12 19:08:05 +01:00
parent bfc6a915d7
commit b14cad0db2
2 changed files with 45 additions and 0 deletions

View file

@ -66,6 +66,41 @@ Common environment values
- name: ALLOW_PUBLIC_EDIT - name: ALLOW_PUBLIC_EDIT
value: "true" # FIXME value: "true" # FIXME
- name: WG_SECRET_KEY
value: {{ .Values.wiki.secretKey }}
- name: WG_DB_TYPE
value: {{ .Values.database.type }}
- name: WG_DB_SERVER
value: {{ .Values.database.server }}
- name: WG_DB_PORT
value: {{ .Values.database.port | quote }}
- name: WG_DB_NAME
value: {{ .Values.database.name }}
- name: WG_DB_USER
{{- if .Values.database.secretName }}
valueFrom:
secretKeyRef:
name: {{ .Values.database.secretName }}
key: username
{{- else }}
value: {{ .Values.database.username }}
{{- end }}
- name: WG_DB_PASSWORD
{{- if .Values.database.secretName }}
valueFrom:
secretKeyRef:
name: {{ .Values.database.secretName }}
key: password
{{- else }}
value: {{ .Values.database.password }}
{{- end }}
#WG_SITENAME="Test Wiki" #WG_SITENAME="Test Wiki"
#WG_SCRIPT_PATH="" #WG_SCRIPT_PATH=""
#WG_SERVER="https://wiki.example.com" #WG_SERVER="https://wiki.example.com"

View file

@ -13,6 +13,16 @@ fullnameOverride: ""
wiki: wiki:
server: "https://wiki.example.org" server: "https://wiki.example.org"
secretKey: "1166f2af9b8c1e1401f38a11d95628629bef0b75b90d09b296390041d19c3b2c"
database:
type: postgres
server: postgres.example.org
port: 5432
name: mediawiki
username: mediawiki # unused if secretName is set
password: mediawiki # unused if secretName is set
#secretName: database-secret
persistence: persistence:
enabled: false enabled: false