(feat) Update Apps to use common-postgresql hooks (#1114)
* (feat) bump common to use new common postgresql-hooks * bump postgresql as well * bump yet again * also process gitea * sogo * also add adaptations to gitea * bump postgresql * bump postgresql yet again * revert central defined existing secret * bump common... again * bumps * fix vaultwarden * encode authelia dbpassword secret correctly * remove useless container from nextcloud config * some cleanup * use lookup to grab the secret for authelia * try getting authelia to work * Fix quoting issues for autheliadb
This commit is contained in:
parent
f7c36eb2fc
commit
3cd8efc2b6
|
@ -3,11 +3,11 @@ appVersion: "5.2.0"
|
|||
dependencies:
|
||||
- name: common
|
||||
repository: https://truecharts.org
|
||||
version: 8.2.2
|
||||
version: 8.3.4
|
||||
- condition: postgresql.enabled
|
||||
name: postgresql
|
||||
repository: https://truecharts.org/
|
||||
version: 3.0.8
|
||||
version: 3.0.12
|
||||
- condition: memcached.enabled
|
||||
name: memcached
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
|
@ -27,4 +27,4 @@ name: sogo
|
|||
sources:
|
||||
- https://www.sogo.nu/
|
||||
type: application
|
||||
version: 4.0.12
|
||||
version: 4.0.13
|
||||
|
|
|
@ -36,6 +36,7 @@ initContainers:
|
|||
# Enabled postgres
|
||||
postgresql:
|
||||
enabled: true
|
||||
existingSecret: "dbcreds"
|
||||
postgresqlUsername: sogo
|
||||
postgresqlDatabase: sogo
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ persistence:
|
|||
# -- postgres dependency settings
|
||||
postgresql:
|
||||
enabled: true
|
||||
existingSecret: "dbcreds"
|
||||
postgresqlUsername: sogo
|
||||
postgresqlDatabase: sogo
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@ appVersion: "4.31.0"
|
|||
dependencies:
|
||||
- name: common
|
||||
repository: https://truecharts.org
|
||||
version: 8.2.2
|
||||
version: 8.3.4
|
||||
- condition: postgresql.enabled
|
||||
name: postgresql
|
||||
repository: https://truecharts.org/
|
||||
version: 3.0.8
|
||||
version: 3.0.12
|
||||
- condition: redis.enabled
|
||||
name: redis
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
|
@ -38,4 +38,4 @@ sources:
|
|||
- https://github.com/authelia/chartrepo
|
||||
- https://github.com/authelia/authelia
|
||||
type: application
|
||||
version: 4.0.12
|
||||
version: 4.0.13
|
||||
|
|
|
@ -34,6 +34,7 @@ initContainers:
|
|||
# Enabled postgres
|
||||
postgresql:
|
||||
enabled: true
|
||||
existingSecret: "dbcreds"
|
||||
postgresqlUsername: authelia
|
||||
postgresqlDatabase: authelia
|
||||
persistence:
|
||||
|
|
|
@ -63,7 +63,7 @@ data:
|
|||
DUO_API_KEY: {{ .Values.duo_api.plain_api_key | b64enc }}
|
||||
{{- end }}
|
||||
|
||||
STORAGE_PASSWORD: {{ .Values.postgresql.postgresqlPassword }}
|
||||
STORAGE_PASSWORD: {{ .Values.postgresql.postgresqlPassword | trimAll "\"" | b64enc }}
|
||||
|
||||
{{- if $redisprevious }}
|
||||
REDIS_PASSWORD: {{ ( index $redisprevious.data "redis-password" ) }}
|
||||
|
|
|
@ -34,6 +34,7 @@ persistence:
|
|||
# Enabled postgres
|
||||
postgresql:
|
||||
enabled: true
|
||||
existingSecret: "dbcreds"
|
||||
postgresqlUsername: authelia
|
||||
postgresqlDatabase: authelia
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@ appVersion: "5.5.12"
|
|||
dependencies:
|
||||
- name: common
|
||||
repository: https://truecharts.org
|
||||
version: 8.2.2
|
||||
version: 8.3.4
|
||||
- condition: postgresql.enabled
|
||||
name: postgresql
|
||||
repository: https://truecharts.org/
|
||||
version: 3.0.8
|
||||
version: 3.0.12
|
||||
deprecated: false
|
||||
description: A free and open source personal finance manager
|
||||
home: https://github.com/firefly-iii/firefly-iii/
|
||||
|
@ -27,4 +27,4 @@ name: fireflyiii
|
|||
sources:
|
||||
- https://github.com/firefly-iii/firefly-iii/
|
||||
type: application
|
||||
version: 9.0.11
|
||||
version: 9.0.12
|
||||
|
|
|
@ -38,6 +38,7 @@ envValueFrom:
|
|||
# Enabled postgres
|
||||
postgresql:
|
||||
enabled: true
|
||||
existingSecret: "dbcreds"
|
||||
postgresqlUsername: fireflyiii
|
||||
postgresqlDatabase: fireflyiii
|
||||
persistence:
|
||||
|
|
|
@ -52,5 +52,6 @@ persistence:
|
|||
# Enabled postgres
|
||||
postgresql:
|
||||
enabled: true
|
||||
existingSecret: "dbcreds"
|
||||
postgresqlUsername: firefly
|
||||
postgresqlDatabase: firefly
|
||||
|
|
|
@ -3,11 +3,11 @@ appVersion: "1.15.3"
|
|||
dependencies:
|
||||
- name: common
|
||||
repository: https://truecharts.org
|
||||
version: 8.2.2
|
||||
version: 8.3.4
|
||||
- condition: postgresql.enabled
|
||||
name: postgresql
|
||||
repository: https://truecharts.org/
|
||||
version: 3.0.8
|
||||
version: 3.0.12
|
||||
- condition: memcached.enabled
|
||||
name: memcached
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
|
@ -34,4 +34,4 @@ sources:
|
|||
- https://github.com/go-gitea/gitea
|
||||
- https://hub.docker.com/r/gitea/gitea/
|
||||
type: application
|
||||
version: 1.0.3
|
||||
version: 1.0.4
|
||||
|
|
|
@ -9,29 +9,11 @@ image:
|
|||
tag: 1.15.3-rootless
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
postgresqlImage:
|
||||
repository: bitnami/postgresql
|
||||
pullPolicy: IfNotPresent
|
||||
tag: 13.4.0@sha256:e7526fc32deec708740784d907bcea2ef6c78bc5ab5265026eff96e70082a54a
|
||||
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: gitea-env
|
||||
|
||||
initContainers:
|
||||
0-init-postgresdb:
|
||||
image: "{{ .Values.postgresqlImage.repository}}:{{ .Values.postgresqlImage.tag }}"
|
||||
command:
|
||||
- "sh"
|
||||
- "-c"
|
||||
- "until pg_isready -U gitea -h ${pghost} ; do sleep 2 ; done"
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: pghost
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: dbcreds
|
||||
key: plainhost
|
||||
1-init-directories:
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
command: ["/usr/sbin/init_directory_structure.sh"]
|
||||
|
|
|
@ -1,29 +1,5 @@
|
|||
{{/* Define the secrets */}}
|
||||
{{- define "gitea.secrets" -}}
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "common.labels" . | nindent 4 }}
|
||||
name: dbcreds
|
||||
{{- $dbprevious := lookup "v1" "Secret" .Release.Namespace "dbcreds" }}
|
||||
{{- $dbPass := "" }}
|
||||
data:
|
||||
{{- if $dbprevious }}
|
||||
{{- $dbPass = ( index $dbprevious.data "postgresql-password" ) | b64dec }}
|
||||
postgresql-password: {{ ( index $dbprevious.data "postgresql-password" ) }}
|
||||
postgresql-postgres-password: {{ ( index $dbprevious.data "postgresql-postgres-password" ) }}
|
||||
{{- else }}
|
||||
{{- $dbPass = randAlphaNum 50 }}
|
||||
postgresql-password: {{ $dbPass | b64enc | quote }}
|
||||
postgresql-postgres-password: {{ randAlphaNum 50 | b64enc | quote }}
|
||||
{{- end }}
|
||||
url: {{ ( printf "%v%v:%v@%v-%v:%v/%v" "postgresql://" .Values.postgresql.postgresqlUsername $dbPass .Release.Name "postgresql" "5432" .Values.postgresql.postgresqlDatabase ) | b64enc | quote }}
|
||||
plainhost: {{ ( printf "%v-%v" .Release.Name "postgresql" ) | b64enc | quote }}
|
||||
type: Opaque
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
@ -60,7 +36,7 @@ stringData:
|
|||
DB_TYPE = postgres
|
||||
HOST = {{ printf "%v-%v:%v" .Release.Name "postgresql" "5432" }}
|
||||
NAME = {{ .Values.postgresql.postgresqlDatabase }}
|
||||
PASSWD = {{ $dbPass }}
|
||||
PASSWD = {{ .Values.postgresql.postgresqlPassword }}
|
||||
USER = {{ .Values.postgresql.postgresqlUsername }}
|
||||
{{- range $catindex, $catvalue := .Values.customConfig }}
|
||||
{{- if eq $catvalue.name "database" }}
|
||||
|
|
|
@ -3,11 +3,6 @@ image:
|
|||
tag: 1.15.3-rootless
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
postgresqlImage:
|
||||
repository: bitnami/postgresql
|
||||
pullPolicy: IfNotPresent
|
||||
tag: 13.4.0@sha256:e7526fc32deec708740784d907bcea2ef6c78bc5ab5265026eff96e70082a54a
|
||||
|
||||
service:
|
||||
main:
|
||||
ports:
|
||||
|
@ -24,19 +19,6 @@ envFrom:
|
|||
name: gitea-env
|
||||
|
||||
initContainers:
|
||||
0-init-postgresdb:
|
||||
image: "{{ .Values.postgresqlImage.repository}}:{{ .Values.postgresqlImage.tag }}"
|
||||
command:
|
||||
- "sh"
|
||||
- "-c"
|
||||
- "until pg_isready -U gitea -h ${pghost} ; do sleep 2 ; done"
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: pghost
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: dbcreds
|
||||
key: plainhost
|
||||
1-init-directories:
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
command: ["/usr/sbin/init_directory_structure.sh"]
|
||||
|
@ -143,9 +125,9 @@ customConfig: []
|
|||
# Enabled postgres
|
||||
postgresql:
|
||||
enabled: true
|
||||
existingSecret: "dbcreds"
|
||||
postgresqlUsername: gitea
|
||||
postgresqlDatabase: gitea
|
||||
existingSecret: dbcreds
|
||||
|
||||
# -- memcached dependency settings
|
||||
memcached:
|
||||
|
|
|
@ -3,11 +3,11 @@ appVersion: "22.2.0"
|
|||
dependencies:
|
||||
- name: common
|
||||
repository: https://truecharts.org
|
||||
version: 8.2.2
|
||||
version: 8.3.4
|
||||
- condition: postgresql.enabled
|
||||
name: postgresql
|
||||
repository: https://truecharts.org/
|
||||
version: 3.0.8
|
||||
version: 3.0.12
|
||||
- condition: redis.enabled
|
||||
name: redis
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
|
@ -33,4 +33,4 @@ sources:
|
|||
- https://github.com/nextcloud/docker
|
||||
- https://github.com/nextcloud/helm
|
||||
type: application
|
||||
version: 6.0.13
|
||||
version: 6.0.14
|
||||
|
|
|
@ -9,17 +9,11 @@ image:
|
|||
pullPolicy: IfNotPresent
|
||||
tag: 22.2.0@sha256:50d4d103bf6a229ec0d589785e057ecdaa8cb718f197056739fa14f483e0071b
|
||||
|
||||
postgresqlImage:
|
||||
repository: bitnami/postgresql
|
||||
pullPolicy: IfNotPresent
|
||||
tag: 13.4.0@sha256:e7526fc32deec708740784d907bcea2ef6c78bc5ab5265026eff96e70082a54a
|
||||
|
||||
strategy:
|
||||
type: Recreate
|
||||
|
||||
env: {}
|
||||
|
||||
|
||||
envTpl:
|
||||
POSTGRES_DB: "{{ .Values.postgresql.postgresqlDatabase }}"
|
||||
POSTGRES_USER: "{{ .Values.postgresql.postgresqlUsername }}"
|
||||
|
@ -36,7 +30,7 @@ envValueFrom:
|
|||
POSTGRES_HOST:
|
||||
secretKeyRef:
|
||||
name: dbcreds
|
||||
key: host
|
||||
key: plainporthost
|
||||
REDIS_HOST:
|
||||
secretKeyRef:
|
||||
name: rediscreds
|
||||
|
@ -119,6 +113,7 @@ cronjob:
|
|||
# Enabled postgres
|
||||
postgresql:
|
||||
enabled: true
|
||||
existingSecret: "dbcreds"
|
||||
postgresqlUsername: nextcloud
|
||||
postgresqlDatabase: nextcloud
|
||||
persistence:
|
||||
|
|
|
@ -14,10 +14,6 @@ podSecurityContext:
|
|||
runAsGroup: 0
|
||||
fsGroup: 33
|
||||
|
||||
postgresqlImage:
|
||||
repository: bitnami/postgresql
|
||||
pullPolicy: IfNotPresent
|
||||
tag: 13.4.0@sha256:e7526fc32deec708740784d907bcea2ef6c78bc5ab5265026eff96e70082a54a
|
||||
service:
|
||||
main:
|
||||
ports:
|
||||
|
@ -51,7 +47,7 @@ envValueFrom:
|
|||
POSTGRES_HOST:
|
||||
secretKeyRef:
|
||||
name: dbcreds
|
||||
key: host
|
||||
key: plainporthost
|
||||
REDIS_HOST:
|
||||
secretKeyRef:
|
||||
name: rediscreds
|
||||
|
@ -150,6 +146,7 @@ cronjob:
|
|||
# Enabled postgres
|
||||
postgresql:
|
||||
enabled: true
|
||||
existingSecret: "dbcreds"
|
||||
postgresqlUsername: nextcloud
|
||||
postgresqlDatabase: nextcloud
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ appVersion: "13.4.0"
|
|||
dependencies:
|
||||
- name: common
|
||||
repository: https://truecharts.org
|
||||
version: 8.3.3
|
||||
version: 8.3.4
|
||||
deprecated: false
|
||||
description: PostgresSQL
|
||||
home: https://github.com/truecharts/apps/tree/master/stable/postgres
|
||||
|
@ -25,4 +25,4 @@ name: postgresql
|
|||
sources:
|
||||
- https://www.postgresql.org/
|
||||
type: application
|
||||
version: 3.0.12
|
||||
version: 3.0.13
|
||||
|
|
|
@ -66,7 +66,7 @@ persistence:
|
|||
postgresqlPassword: "testpass"
|
||||
postgresqlUsername: "test"
|
||||
postgresqlDatabase: "test"
|
||||
# existingSecret: ""
|
||||
existingSecret: ""
|
||||
|
||||
envValueFrom:
|
||||
POSTGRES_PASSWORD:
|
||||
|
|
|
@ -3,11 +3,11 @@ appVersion: "1.22.2"
|
|||
dependencies:
|
||||
- name: common
|
||||
repository: https://truecharts.org
|
||||
version: 8.2.2
|
||||
version: 8.3.4
|
||||
- condition: postgresql.enabled
|
||||
name: postgresql
|
||||
repository: https://truecharts.org/
|
||||
version: 3.0.8
|
||||
version: 3.0.12
|
||||
deprecated: false
|
||||
description: Unofficial Bitwarden compatible server written in Rust
|
||||
home: https://github.com/truecharts/apps/tree/master/charts/stable/vaultwarden
|
||||
|
@ -24,11 +24,8 @@ maintainers:
|
|||
- email: info@truecharts.org
|
||||
name: TrueCharts
|
||||
url: truecharts.org
|
||||
- email: kjeld@schouten-lebbing.nl
|
||||
name: Ornias1993
|
||||
url: truecharts.org
|
||||
name: vaultwarden
|
||||
sources:
|
||||
- https://github.com/dani-garcia/vaultwarden
|
||||
type: application
|
||||
version: 9.0.11
|
||||
version: 9.0.12
|
||||
|
|
|
@ -41,6 +41,7 @@ database:
|
|||
# Enabled postgres
|
||||
postgresql:
|
||||
enabled: true
|
||||
existingSecret: "dbcreds"
|
||||
postgresqlUsername: vaultwarden
|
||||
postgresqlDatabase: vaultwarden
|
||||
persistence:
|
||||
|
|
|
@ -35,4 +35,4 @@ service:
|
|||
{{- include "vaultwarden.websocketinjector" . }}
|
||||
|
||||
{{/* Render the templates */}}
|
||||
{{ include "common.all" . }}
|
||||
{{ include "common.postSetup" . }}
|
||||
|
|
|
@ -221,5 +221,6 @@ persistence:
|
|||
# Enabled postgres
|
||||
postgresql:
|
||||
enabled: true
|
||||
existingSecret: "dbcreds"
|
||||
postgresqlUsername: vaultwarden
|
||||
postgresqlDatabase: vaultwarden
|
||||
|
|
Loading…
Reference in New Issue