(feat) move postgresql init and password-generator to common (#1113)
* Move Postgresql initcontainer to common * bump common * Handle postgres password generation in common and inject into values.yaml for use in Apps * (refactor) adapt apps using postgresql to common init and password generator * no message
This commit is contained in:
@@ -8,11 +8,6 @@ image:
|
|||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
tag: v5.2.0@sha256:8fc7bb87b77d76d929bcd36403d4f27878fa3e99f5448fb05ed64829078665a4
|
tag: v5.2.0@sha256:8fc7bb87b77d76d929bcd36403d4f27878fa3e99f5448fb05ed64829078665a4
|
||||||
|
|
||||||
postgresqlImage:
|
|
||||||
repository: bitnami/postgresql
|
|
||||||
pullPolicy: IfNotPresent
|
|
||||||
tag: 13.4.0@sha256:e7526fc32deec708740784d907bcea2ef6c78bc5ab5265026eff96e70082a54a
|
|
||||||
|
|
||||||
initContainers:
|
initContainers:
|
||||||
migrate-db:
|
migrate-db:
|
||||||
image: "{{ .Values.alpineImage.repository}}:{{ .Values.alpineImage.tag }}"
|
image: "{{ .Values.alpineImage.repository}}:{{ .Values.alpineImage.tag }}"
|
||||||
@@ -43,7 +38,6 @@ postgresql:
|
|||||||
enabled: true
|
enabled: true
|
||||||
postgresqlUsername: sogo
|
postgresqlUsername: sogo
|
||||||
postgresqlDatabase: sogo
|
postgresqlDatabase: sogo
|
||||||
existingSecret: dbcreds
|
|
||||||
|
|
||||||
# -- memcached dependency settings
|
# -- memcached dependency settings
|
||||||
memcached:
|
memcached:
|
||||||
|
|||||||
@@ -1,29 +1,5 @@
|
|||||||
{{/* Define the configmap */}}
|
{{/* Define the configmap */}}
|
||||||
{{- define "sogo.config" -}}
|
{{- define "sogo.config" -}}
|
||||||
---
|
|
||||||
|
|
||||||
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 }}
|
|
||||||
url: {{ $url | b64enc | quote }}
|
|
||||||
plainhost: {{ ( printf "%v-%v" .Release.Name "postgresql" ) | b64enc | quote }}
|
|
||||||
type: Opaque
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -51,9 +27,9 @@ data:
|
|||||||
* **************************************************************************/
|
* **************************************************************************/
|
||||||
|
|
||||||
/* Database configuration (mysql:// or postgresql://) */
|
/* Database configuration (mysql:// or postgresql://) */
|
||||||
SOGoProfileURL = "{{ $url }}/sogo_user_profile";
|
SOGoProfileURL = "{{ .Values.postgresql.url.complete }}/sogo_user_profile";
|
||||||
OCSFolderInfoURL = "{{ $url }}/sogo_folder_info";
|
OCSFolderInfoURL = "{{ .Values.postgresql.url.complete }}/sogo_folder_info";
|
||||||
OCSSessionsFolderURL = "{{ $url }}/sogo_sessions_folder";
|
OCSSessionsFolderURL = "{{ .Values.postgresql.url.complete }}/sogo_sessions_folder";
|
||||||
|
|
||||||
/* Mail */
|
/* Mail */
|
||||||
SOGoDraftsFolderName = {{ .Values.sogo.mail.SOGoDraftsFolderName | default "Drafts" }};
|
SOGoDraftsFolderName = {{ .Values.sogo.mail.SOGoDraftsFolderName | default "Drafts" }};
|
||||||
|
|||||||
@@ -12,11 +12,6 @@ podSecurityContext:
|
|||||||
runAsUser: 0
|
runAsUser: 0
|
||||||
runAsGroup: 0
|
runAsGroup: 0
|
||||||
|
|
||||||
postgresqlImage:
|
|
||||||
repository: bitnami/postgresql
|
|
||||||
pullPolicy: IfNotPresent
|
|
||||||
tag: 13.4.0@sha256:e7526fc32deec708740784d907bcea2ef6c78bc5ab5265026eff96e70082a54a
|
|
||||||
|
|
||||||
# -- services
|
# -- services
|
||||||
service:
|
service:
|
||||||
main:
|
main:
|
||||||
@@ -24,23 +19,6 @@ service:
|
|||||||
main:
|
main:
|
||||||
port: 80
|
port: 80
|
||||||
|
|
||||||
# -- initcontainers
|
|
||||||
initContainers:
|
|
||||||
# -- wait for database before starting sogo
|
|
||||||
init-postgresdb:
|
|
||||||
image: "{{ .Values.postgresqlImage.repository }}:{{ .Values.postgresqlImage.tag }}"
|
|
||||||
command:
|
|
||||||
- "sh"
|
|
||||||
- "-c"
|
|
||||||
- "until pg_isready -U sogo -h ${pghost} ; do sleep 2 ; done"
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
env:
|
|
||||||
- name: pghost
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: dbcreds
|
|
||||||
key: plainhost
|
|
||||||
|
|
||||||
# -- persistence settings
|
# -- persistence settings
|
||||||
persistence:
|
persistence:
|
||||||
data:
|
data:
|
||||||
@@ -66,7 +44,6 @@ postgresql:
|
|||||||
enabled: true
|
enabled: true
|
||||||
postgresqlUsername: sogo
|
postgresqlUsername: sogo
|
||||||
postgresqlDatabase: sogo
|
postgresqlDatabase: sogo
|
||||||
existingSecret: dbcreds
|
|
||||||
|
|
||||||
# -- memcached dependency settings
|
# -- memcached dependency settings
|
||||||
memcached:
|
memcached:
|
||||||
|
|||||||
@@ -15,4 +15,4 @@ maintainers:
|
|||||||
name: common
|
name: common
|
||||||
sources: null
|
sources: null
|
||||||
type: library
|
type: library
|
||||||
version: 8.2.2
|
version: 8.3.0
|
||||||
|
|||||||
@@ -28,6 +28,9 @@ Main entrypoint for the common library chart. It will render all underlying temp
|
|||||||
{{- /* Build the templates */ -}}
|
{{- /* Build the templates */ -}}
|
||||||
{{- include "common.pvc" . }}
|
{{- include "common.pvc" . }}
|
||||||
|
|
||||||
|
{{- /* Autogenerate postgresql passwords if needed */ -}}
|
||||||
|
{{- include "common.dependencies.postgresql.injector" . }}
|
||||||
|
|
||||||
{{- if .Values.serviceAccount.create -}}
|
{{- if .Values.serviceAccount.create -}}
|
||||||
{{- include "common.serviceAccount" . }}
|
{{- include "common.serviceAccount" . }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ terminationGracePeriodSeconds: {{ . }}
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
initContainers:
|
initContainers:
|
||||||
{{- include "common.controller.autopermissions" . | nindent 2 }}
|
{{- include "common.controller.autopermissions" . | nindent 2 }}
|
||||||
|
{{- include "common.dependencies.postgresql.init" . | nindent 2 }}
|
||||||
{{- if .Values.initContainers }}
|
{{- if .Values.initContainers }}
|
||||||
{{- $initContainers := list }}
|
{{- $initContainers := list }}
|
||||||
{{- range $index, $key := (keys .Values.initContainers | uniq | sortAlpha) }}
|
{{- range $index, $key := (keys .Values.initContainers | uniq | sortAlpha) }}
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{{/*
|
||||||
|
This template ensures pods with postgresql dependency have a delayed start
|
||||||
|
*/}}
|
||||||
|
{{- define "common.dependencies.postgresql.init" -}}
|
||||||
|
{{- $pghost := printf "%v-%v" .Release.Name "postgresql" }}
|
||||||
|
{{- if .Values.postgresql.enabled }}
|
||||||
|
- name: postgresql-init
|
||||||
|
image: "{{ .Values.postgresqlImage.repository}}:{{ .Values.postgresqlImage.tag }}"
|
||||||
|
command:
|
||||||
|
- "sh"
|
||||||
|
- "-c"
|
||||||
|
- "until pg_isready -U {{ .Values.postgresql.postgresqlUsername }} -h {{ $pghost }}; do sleep 2 ; done"
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
{{/*
|
||||||
|
This template generates a random password and ensures it persists across updates/edits to the chart
|
||||||
|
*/}}
|
||||||
|
{{- define "common.dependencies.postgresql.injector" -}}
|
||||||
|
{{- $pghost := printf "%v-%v" .Release.Name "postgresql" }}
|
||||||
|
{{- if .Values.postgresql.enabled }}
|
||||||
|
---
|
||||||
|
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
|
||||||
|
{{- $_ := set .Values.postgresql "postgresqlPassword" ( $dbPass | quote ) }}
|
||||||
|
{{- $_ := set .Values.postgresql.url "plain" ( ( printf "%v-%v" .Release.Name "postgresql" ) | quote ) }}
|
||||||
|
{{- $_ := set .Values.postgresql.url "complete" ( ( printf "%v%v:%v@%v-%v:%v/%v" "postgresql://" .Values.postgresql.postgresqlUsername $dbPass .Release.Name "postgresql" "5432" .Values.postgresql.postgresqlDatabase ) | quote ) }}
|
||||||
|
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
@@ -18,6 +18,8 @@ wireguardImage:
|
|||||||
# -- Specify the WireGuard image pull policy
|
# -- Specify the WireGuard image pull policy
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
# -- promtail specific configuration
|
||||||
|
# @default -- See below
|
||||||
promtailImage:
|
promtailImage:
|
||||||
# -- Specify the promtail image
|
# -- Specify the promtail image
|
||||||
repository: ghcr.io/truecharts/promtail
|
repository: ghcr.io/truecharts/promtail
|
||||||
@@ -26,6 +28,8 @@ promtailImage:
|
|||||||
# -- Specify the promtail image pull policy
|
# -- Specify the promtail image pull policy
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
# -- netshoot specific configuration
|
||||||
|
# @default -- See below
|
||||||
netshootImage:
|
netshootImage:
|
||||||
# -- Specify the netshoot image
|
# -- Specify the netshoot image
|
||||||
repository: nicolaka/netshoot
|
repository: nicolaka/netshoot
|
||||||
@@ -34,6 +38,8 @@ netshootImage:
|
|||||||
# -- Specify the netshoot image pull policy
|
# -- Specify the netshoot image pull policy
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
|
|
||||||
|
# -- codeserver specific configuration
|
||||||
|
# @default -- See below
|
||||||
codeserverImage:
|
codeserverImage:
|
||||||
# -- Specify the code-server image
|
# -- Specify the code-server image
|
||||||
repository: ghcr.io/truecharts/code-server
|
repository: ghcr.io/truecharts/code-server
|
||||||
@@ -42,14 +48,27 @@ codeserverImage:
|
|||||||
# -- Specify the code-server image pull policy
|
# -- Specify the code-server image pull policy
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
# -- alpine specific configuration
|
||||||
|
# @default -- See below
|
||||||
alpineImage:
|
alpineImage:
|
||||||
# -- Specify the code-server image
|
# -- Specify the Alpine image
|
||||||
repository: ghcr.io/truecharts/alpine
|
repository: ghcr.io/truecharts/alpine
|
||||||
# -- Specify the code-server image tag
|
# -- Specify the Alpine image tag
|
||||||
tag: v3.14.2@sha256:cfc1d8be3d2d397ec18af71caab3e96581fc4d43417400ef744d87201642ddad
|
tag: v3.14.2@sha256:cfc1d8be3d2d397ec18af71caab3e96581fc4d43417400ef744d87201642ddad
|
||||||
# -- Specify the code-server image pull policy
|
# -- Specify the Alpine image pull policy
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
# -- postgresql specific configuration
|
||||||
|
# @default -- See below
|
||||||
|
postgresqlImage:
|
||||||
|
# -- Specify the postgresql image
|
||||||
|
repository: bitnami/postgresql
|
||||||
|
# -- Specify the postgresql image tag
|
||||||
|
tag: 13.4.0@sha256:e7526fc32deec708740784d907bcea2ef6c78bc5ab5265026eff96e70082a54a
|
||||||
|
# -- Specify the postgresql image pull policy
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
|
||||||
global:
|
global:
|
||||||
# -- Set an override for the prefix of the fullname
|
# -- Set an override for the prefix of the fullname
|
||||||
nameOverride:
|
nameOverride:
|
||||||
@@ -874,3 +893,14 @@ addons:
|
|||||||
envList: []
|
envList: []
|
||||||
#- name: someenv
|
#- name: someenv
|
||||||
# value: somevalue
|
# value: somevalue
|
||||||
|
|
||||||
|
##
|
||||||
|
# This section contains some-preconfig for frequently used dependencies
|
||||||
|
##
|
||||||
|
|
||||||
|
# -- Postgresql dependency configuration
|
||||||
|
# @default -- See below
|
||||||
|
postgresql:
|
||||||
|
enabled: false
|
||||||
|
# -- can be used to make an easy accessable note which URLS to use to access the DB.
|
||||||
|
url: {}
|
||||||
|
|||||||
@@ -9,11 +9,6 @@ image:
|
|||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
tag: 4.31.0@sha256:6036f2b1fa3214fdcf189a8f28f40a856372413984b08f15ba4fb5891d77bc0a
|
tag: 4.31.0@sha256:6036f2b1fa3214fdcf189a8f28f40a856372413984b08f15ba4fb5891d77bc0a
|
||||||
|
|
||||||
postgresqlImage:
|
|
||||||
repository: bitnami/postgresql
|
|
||||||
pullPolicy: IfNotPresent
|
|
||||||
tag: 13.4.0@sha256:e7526fc32deec708740784d907bcea2ef6c78bc5ab5265026eff96e70082a54a
|
|
||||||
|
|
||||||
|
|
||||||
enableServiceLinks: false
|
enableServiceLinks: false
|
||||||
|
|
||||||
@@ -41,7 +36,6 @@ postgresql:
|
|||||||
enabled: true
|
enabled: true
|
||||||
postgresqlUsername: authelia
|
postgresqlUsername: authelia
|
||||||
postgresqlDatabase: authelia
|
postgresqlDatabase: authelia
|
||||||
existingSecret: dbcreds
|
|
||||||
persistence:
|
persistence:
|
||||||
db:
|
db:
|
||||||
storageClass: "SCALE-ZFS"
|
storageClass: "SCALE-ZFS"
|
||||||
|
|||||||
@@ -2,31 +2,6 @@
|
|||||||
{{- define "authelia.secrets" -}}
|
{{- define "authelia.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
|
|
||||||
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
@@ -88,11 +63,7 @@ data:
|
|||||||
DUO_API_KEY: {{ .Values.duo_api.plain_api_key | b64enc }}
|
DUO_API_KEY: {{ .Values.duo_api.plain_api_key | b64enc }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if $dbprevious }}
|
STORAGE_PASSWORD: {{ .Values.postgresql.postgresqlPassword }}
|
||||||
STORAGE_PASSWORD: {{ ( index $dbprevious.data "postgresql-password" ) }}
|
|
||||||
{{- else }}
|
|
||||||
STORAGE_PASSWORD: {{ $dbPass | b64enc | quote }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- if $redisprevious }}
|
{{- if $redisprevious }}
|
||||||
REDIS_PASSWORD: {{ ( index $redisprevious.data "redis-password" ) }}
|
REDIS_PASSWORD: {{ ( index $redisprevious.data "redis-password" ) }}
|
||||||
|
|||||||
@@ -5,11 +5,6 @@ image:
|
|||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
tag: 4.31.0@sha256:6036f2b1fa3214fdcf189a8f28f40a856372413984b08f15ba4fb5891d77bc0a
|
tag: 4.31.0@sha256:6036f2b1fa3214fdcf189a8f28f40a856372413984b08f15ba4fb5891d77bc0a
|
||||||
|
|
||||||
postgresqlImage:
|
|
||||||
repository: bitnami/postgresql
|
|
||||||
pullPolicy: IfNotPresent
|
|
||||||
tag: 13.4.0@sha256:e7526fc32deec708740784d907bcea2ef6c78bc5ab5265026eff96e70082a54a
|
|
||||||
|
|
||||||
command: ["authelia"]
|
command: ["authelia"]
|
||||||
args: ["--config=/configuration.yaml"]
|
args: ["--config=/configuration.yaml"]
|
||||||
|
|
||||||
@@ -21,21 +16,6 @@ service:
|
|||||||
main:
|
main:
|
||||||
port: 9091
|
port: 9091
|
||||||
|
|
||||||
initContainers:
|
|
||||||
init-postgresdb:
|
|
||||||
image: "{{ .Values.postgresqlImage.repository}}:{{ .Values.postgresqlImage.tag }}"
|
|
||||||
command:
|
|
||||||
- "sh"
|
|
||||||
- "-c"
|
|
||||||
- "until pg_isready -U authelia -h ${pghost} ; do sleep 2 ; done"
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
env:
|
|
||||||
- name: pghost
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: dbcreds
|
|
||||||
key: plainhost
|
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
config:
|
config:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -56,7 +36,6 @@ postgresql:
|
|||||||
enabled: true
|
enabled: true
|
||||||
postgresqlUsername: authelia
|
postgresqlUsername: authelia
|
||||||
postgresqlDatabase: authelia
|
postgresqlDatabase: authelia
|
||||||
existingSecret: dbcreds
|
|
||||||
|
|
||||||
# Enabled redis
|
# Enabled redis
|
||||||
# ... for more options see https://github.com/bitnami/charts/tree/master/bitnami/redis
|
# ... for more options see https://github.com/bitnami/charts/tree/master/bitnami/redis
|
||||||
|
|||||||
@@ -9,27 +9,6 @@ image:
|
|||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
tag: version-5.5.12@sha256:9a1f87a8ad38694675390756be9686fe9d8ba941fe1f145641626135c7eb5e4b
|
tag: version-5.5.12@sha256:9a1f87a8ad38694675390756be9686fe9d8ba941fe1f145641626135c7eb5e4b
|
||||||
|
|
||||||
|
|
||||||
postgresqlImage:
|
|
||||||
repository: bitnami/postgresql
|
|
||||||
pullPolicy: IfNotPresent
|
|
||||||
tag: 13.4.0@sha256:e7526fc32deec708740784d907bcea2ef6c78bc5ab5265026eff96e70082a54a
|
|
||||||
|
|
||||||
initContainers:
|
|
||||||
init-postgresdb:
|
|
||||||
image: "{{ .Values.postgresqlImage.repository}}:{{ .Values.postgresqlImage.tag }}"
|
|
||||||
command:
|
|
||||||
- "sh"
|
|
||||||
- "-c"
|
|
||||||
- "until pg_isready -U authelia -h ${pghost} ; do sleep 2 ; done"
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
env:
|
|
||||||
- name: pghost
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: dbcreds
|
|
||||||
key: plainhost
|
|
||||||
|
|
||||||
probes:
|
probes:
|
||||||
liveness:
|
liveness:
|
||||||
path: "/login"
|
path: "/login"
|
||||||
@@ -50,7 +29,7 @@ envValueFrom:
|
|||||||
DB_HOST:
|
DB_HOST:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: dbcreds
|
name: dbcreds
|
||||||
key: postgresql_host
|
key: plainhost
|
||||||
DB_PASSWORD:
|
DB_PASSWORD:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: dbcreds
|
name: dbcreds
|
||||||
@@ -61,7 +40,6 @@ postgresql:
|
|||||||
enabled: true
|
enabled: true
|
||||||
postgresqlUsername: fireflyiii
|
postgresqlUsername: fireflyiii
|
||||||
postgresqlDatabase: fireflyiii
|
postgresqlDatabase: fireflyiii
|
||||||
existingSecret: dbcreds
|
|
||||||
persistence:
|
persistence:
|
||||||
db:
|
db:
|
||||||
storageClass: "SCALE-ZFS"
|
storageClass: "SCALE-ZFS"
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: dbcreds
|
|
||||||
{{- $previous := lookup "v1" "Secret" .Release.Namespace "dbcreds" }}
|
|
||||||
{{- $dbPass := "" }}
|
|
||||||
data:
|
|
||||||
{{- if $previous }}
|
|
||||||
{{- $dbPass = ( index $previous.data "postgresql-password" ) | b64dec }}
|
|
||||||
postgresql-password: {{ ( index $previous.data "postgresql-password" ) }}
|
|
||||||
postgresql-postgres-password: {{ ( index $previous.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 }}
|
|
||||||
postgresql_host: {{ ( printf "%v-%v" .Release.Name "postgresql" ) | b64enc | quote }}
|
|
||||||
plainhost: {{ ( printf "%v-%v" .Release.Name "postgresql" ) | b64enc | quote }}
|
|
||||||
type: Opaque
|
|
||||||
@@ -8,32 +8,12 @@ image:
|
|||||||
securityContext:
|
securityContext:
|
||||||
readOnlyRootFilesystem: false
|
readOnlyRootFilesystem: false
|
||||||
|
|
||||||
postgresqlImage:
|
|
||||||
repository: bitnami/postgresql
|
|
||||||
pullPolicy: IfNotPresent
|
|
||||||
tag: 13.4.0@sha256:e7526fc32deec708740784d907bcea2ef6c78bc5ab5265026eff96e70082a54a
|
|
||||||
|
|
||||||
service:
|
service:
|
||||||
main:
|
main:
|
||||||
ports:
|
ports:
|
||||||
main:
|
main:
|
||||||
port: 8080
|
port: 8080
|
||||||
|
|
||||||
initContainers:
|
|
||||||
init-postgresdb:
|
|
||||||
image: "{{ .Values.postgresqlImage.repository}}:{{ .Values.postgresqlImage.tag }}"
|
|
||||||
command:
|
|
||||||
- "sh"
|
|
||||||
- "-c"
|
|
||||||
- "until pg_isready -U firefly -h ${pghost} ; do sleep 2 ; done"
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
env:
|
|
||||||
- name: pghost
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: dbcreds
|
|
||||||
key: plainhost
|
|
||||||
|
|
||||||
probes:
|
probes:
|
||||||
liveness:
|
liveness:
|
||||||
path: "/login"
|
path: "/login"
|
||||||
@@ -55,7 +35,7 @@ envValueFrom:
|
|||||||
DB_HOST:
|
DB_HOST:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: dbcreds
|
name: dbcreds
|
||||||
key: postgresql_host
|
key: plainhost
|
||||||
DB_PASSWORD:
|
DB_PASSWORD:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: dbcreds
|
name: dbcreds
|
||||||
@@ -74,4 +54,3 @@ postgresql:
|
|||||||
enabled: true
|
enabled: true
|
||||||
postgresqlUsername: firefly
|
postgresqlUsername: firefly
|
||||||
postgresqlDatabase: firefly
|
postgresqlDatabase: firefly
|
||||||
existingSecret: dbcreds
|
|
||||||
|
|||||||
@@ -46,21 +46,6 @@ envValueFrom:
|
|||||||
name: rediscreds
|
name: rediscreds
|
||||||
key: redis-password
|
key: redis-password
|
||||||
|
|
||||||
initContainers:
|
|
||||||
init-postgresdb:
|
|
||||||
image: "{{ .Values.postgresqlImage.repository}}:{{ .Values.postgresqlImage.tag }}"
|
|
||||||
command:
|
|
||||||
- "sh"
|
|
||||||
- "-c"
|
|
||||||
- "until pg_isready -U nextcloud -h ${pghost} ; do sleep 2 ; done"
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
env:
|
|
||||||
- name: pghost
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: dbcreds
|
|
||||||
key: plainhost
|
|
||||||
|
|
||||||
# -- Probe configuration
|
# -- Probe configuration
|
||||||
# -- [[ref]](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
|
# -- [[ref]](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
|
||||||
# @default -- See below
|
# @default -- See below
|
||||||
@@ -136,7 +121,6 @@ postgresql:
|
|||||||
enabled: true
|
enabled: true
|
||||||
postgresqlUsername: nextcloud
|
postgresqlUsername: nextcloud
|
||||||
postgresqlDatabase: nextcloud
|
postgresqlDatabase: nextcloud
|
||||||
existingSecret: dbcreds
|
|
||||||
persistence:
|
persistence:
|
||||||
db:
|
db:
|
||||||
storageClass: "SCALE-ZFS"
|
storageClass: "SCALE-ZFS"
|
||||||
|
|||||||
@@ -3,31 +3,6 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
{{- include "common.labels" . | nindent 4 }}
|
|
||||||
name: dbcreds
|
|
||||||
{{- $previous := lookup "v1" "Secret" .Release.Namespace "dbcreds" }}
|
|
||||||
{{- $dbPass := "" }}
|
|
||||||
data:
|
|
||||||
{{- if $previous }}
|
|
||||||
{{- $dbPass = ( index $previous.data "postgresql-password" ) | b64dec }}
|
|
||||||
postgresql-password: {{ ( index $previous.data "postgresql-password" ) }}
|
|
||||||
postgresql-postgres-password: {{ ( index $previous.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 }}
|
|
||||||
host: {{ ( printf "%v-%v:5432" .Release.Name "postgresql" ) | b64enc | quote }}
|
|
||||||
plainhost: {{ ( printf "%v-%v" .Release.Name "postgresql" ) | b64enc | quote }}
|
|
||||||
type: Opaque
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@@ -77,21 +77,6 @@ persistence:
|
|||||||
accessMode: ReadWriteOnce
|
accessMode: ReadWriteOnce
|
||||||
size: "100Gi"
|
size: "100Gi"
|
||||||
|
|
||||||
initContainers:
|
|
||||||
init-postgresdb:
|
|
||||||
image: "{{ .Values.postgresqlImage.repository}}:{{ .Values.postgresqlImage.tag }}"
|
|
||||||
command:
|
|
||||||
- "sh"
|
|
||||||
- "-c"
|
|
||||||
- "until pg_isready -U nextcloud -h ${pghost} ; do sleep 2 ; done"
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
env:
|
|
||||||
- name: pghost
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: dbcreds
|
|
||||||
key: plainhost
|
|
||||||
|
|
||||||
# -- Probe configuration
|
# -- Probe configuration
|
||||||
# -- [[ref]](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
|
# -- [[ref]](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
|
||||||
# @default -- See below
|
# @default -- See below
|
||||||
@@ -167,7 +152,6 @@ postgresql:
|
|||||||
enabled: true
|
enabled: true
|
||||||
postgresqlUsername: nextcloud
|
postgresqlUsername: nextcloud
|
||||||
postgresqlDatabase: nextcloud
|
postgresqlDatabase: nextcloud
|
||||||
existingSecret: dbcreds
|
|
||||||
|
|
||||||
# Enabled redis
|
# Enabled redis
|
||||||
# ... for more options see https://github.com/bitnami/charts/tree/master/bitnami/redis
|
# ... for more options see https://github.com/bitnami/charts/tree/master/bitnami/redis
|
||||||
|
|||||||
@@ -9,11 +9,6 @@ image:
|
|||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
tag: v1.22.2@sha256:8693c057298731f507128a395395172d60093be9b299f6bf9e5c35512a74d457
|
tag: v1.22.2@sha256:8693c057298731f507128a395395172d60093be9b299f6bf9e5c35512a74d457
|
||||||
|
|
||||||
postgresqlImage:
|
|
||||||
repository: bitnami/postgresql
|
|
||||||
pullPolicy: IfNotPresent
|
|
||||||
tag: 13.4.0@sha256:e7526fc32deec708740784d907bcea2ef6c78bc5ab5265026eff96e70082a54a
|
|
||||||
|
|
||||||
|
|
||||||
envTpl:
|
envTpl:
|
||||||
DOMAIN: "https://{{ if .Values.ingress }}{{ if .Values.ingress.main.enabled }}{{ ( index .Values.ingress.main.hosts 0 ).host }}{{ else }}placeholder.com{{ end }}{{ else }}placeholder.com{{ end }}"
|
DOMAIN: "https://{{ if .Values.ingress }}{{ if .Values.ingress.main.enabled }}{{ ( index .Values.ingress.main.hosts 0 ).host }}{{ else }}placeholder.com{{ end }}{{ else }}placeholder.com{{ end }}"
|
||||||
@@ -24,21 +19,6 @@ envFrom:
|
|||||||
- secretRef:
|
- secretRef:
|
||||||
name: vaultwardensecret
|
name: vaultwardensecret
|
||||||
|
|
||||||
initContainers:
|
|
||||||
init-postgresdb:
|
|
||||||
image: "{{ .Values.postgresqlImage.repository }}:{{ .Values.postgresqlImage.tag }}"
|
|
||||||
command:
|
|
||||||
- "sh"
|
|
||||||
- "-c"
|
|
||||||
- "until pg_isready -U authelia -h ${pghost} ; do sleep 2 ; done"
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
env:
|
|
||||||
- name: pghost
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: dbcreds
|
|
||||||
key: plainhost
|
|
||||||
|
|
||||||
|
|
||||||
envValueFrom:
|
envValueFrom:
|
||||||
DATABASE_URL:
|
DATABASE_URL:
|
||||||
@@ -63,7 +43,6 @@ postgresql:
|
|||||||
enabled: true
|
enabled: true
|
||||||
postgresqlUsername: vaultwarden
|
postgresqlUsername: vaultwarden
|
||||||
postgresqlDatabase: vaultwarden
|
postgresqlDatabase: vaultwarden
|
||||||
existingSecret: dbcreds
|
|
||||||
persistence:
|
persistence:
|
||||||
db:
|
db:
|
||||||
storageClass: "SCALE-ZFS"
|
storageClass: "SCALE-ZFS"
|
||||||
|
|||||||
@@ -33,28 +33,4 @@ data:
|
|||||||
YUBICO_CLIENT_ID: {{ $yubicoClientId }}
|
YUBICO_CLIENT_ID: {{ $yubicoClientId }}
|
||||||
YUBICO_SECRET_KEY: {{ required "Yubico Secret Key required" .Values.vaultwarden.yubico.secretKey | b64enc | quote }}
|
YUBICO_SECRET_KEY: {{ required "Yubico Secret Key required" .Values.vaultwarden.yubico.secretKey | b64enc | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
{{- include "common.labels" . | nindent 4 }}
|
|
||||||
name: dbcreds
|
|
||||||
{{- $previous := lookup "v1" "Secret" .Release.Namespace "dbcreds" }}
|
|
||||||
{{- $dbPass := "" }}
|
|
||||||
data:
|
|
||||||
{{- if $previous }}
|
|
||||||
{{- $dbPass = ( index $previous.data "postgresql-password" ) | b64dec }}
|
|
||||||
postgresql-password: {{ ( index $previous.data "postgresql-password" ) }}
|
|
||||||
postgresql-postgres-password: {{ ( index $previous.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
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
@@ -5,11 +5,6 @@ image:
|
|||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
tag: v1.22.2@sha256:8693c057298731f507128a395395172d60093be9b299f6bf9e5c35512a74d457
|
tag: v1.22.2@sha256:8693c057298731f507128a395395172d60093be9b299f6bf9e5c35512a74d457
|
||||||
|
|
||||||
postgresqlImage:
|
|
||||||
repository: bitnami/postgresql
|
|
||||||
pullPolicy: IfNotPresent
|
|
||||||
tag: 13.4.0@sha256:e7526fc32deec708740784d907bcea2ef6c78bc5ab5265026eff96e70082a54a
|
|
||||||
|
|
||||||
service:
|
service:
|
||||||
main:
|
main:
|
||||||
ports:
|
ports:
|
||||||
@@ -91,21 +86,6 @@ ingress:
|
|||||||
# hosts:
|
# hosts:
|
||||||
# - chart-example.local
|
# - chart-example.local
|
||||||
|
|
||||||
initContainers:
|
|
||||||
init-postgresdb:
|
|
||||||
image: "{{ .Values.postgresqlImage.repository }}:{{ .Values.postgresqlImage.tag }}"
|
|
||||||
command:
|
|
||||||
- "sh"
|
|
||||||
- "-c"
|
|
||||||
- "until pg_isready -U authelia -h ${pghost} ; do sleep 2 ; done"
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
env:
|
|
||||||
- name: pghost
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: dbcreds
|
|
||||||
key: plainhost
|
|
||||||
|
|
||||||
envTpl:
|
envTpl:
|
||||||
DOMAIN: "https://{{ if .Values.ingress }}{{ if .Values.ingress.main.enabled }}{{ ( index .Values.ingress.main.hosts 0 ).host }}{{ else }}placeholder.com{{ end }}{{ else }}placeholder.com{{ end }}"
|
DOMAIN: "https://{{ if .Values.ingress }}{{ if .Values.ingress.main.enabled }}{{ ( index .Values.ingress.main.hosts 0 ).host }}{{ else }}placeholder.com{{ end }}{{ else }}placeholder.com{{ end }}"
|
||||||
|
|
||||||
@@ -243,4 +223,3 @@ postgresql:
|
|||||||
enabled: true
|
enabled: true
|
||||||
postgresqlUsername: vaultwarden
|
postgresqlUsername: vaultwarden
|
||||||
postgresqlDatabase: vaultwarden
|
postgresqlDatabase: vaultwarden
|
||||||
existingSecret: dbcreds
|
|
||||||
|
|||||||
Reference in New Issue
Block a user