simplify postgresql folder setup
This commit is contained in:
parent
19877edf3b
commit
175b33aeb2
|
@ -1,7 +1,7 @@
|
|||
apiVersion: v2
|
||||
kubeVersion: ">=1.16.0-0"
|
||||
name: postgresql
|
||||
version: 1.0.0
|
||||
version: 1.0.1
|
||||
appVersion: "auto"
|
||||
description: PostgresSQL
|
||||
type: application
|
||||
|
|
|
@ -9,7 +9,6 @@ image:
|
|||
pullPolicy: IfNotPresent
|
||||
tag: "13.3"
|
||||
|
||||
pgdatapath: "/data"
|
||||
|
||||
envValueFrom:
|
||||
POSTGRES_PASSWORD:
|
||||
|
@ -18,7 +17,6 @@ envValueFrom:
|
|||
key: "postgresql-password"
|
||||
|
||||
envTpl:
|
||||
PGDATA: "{{ .Values.pgdatapath }}"
|
||||
POSTGRES_USER: "{{ .Values.postgresqlUsername }}"
|
||||
POSTGRES_DB: "{{ .Values.postgresqlDatabase }}"
|
||||
# POSTGRESQL_POSTGRES_PASSWORD: "{{ .Values.postgrespassword }}"
|
||||
|
@ -27,4 +25,4 @@ envTpl:
|
|||
##
|
||||
# Most other defaults are set in questions.yaml
|
||||
# For other options please refer to the wiki, default_values.yaml or the common library chart
|
||||
##
|
||||
##
|
||||
|
|
|
@ -76,7 +76,7 @@ questions:
|
|||
description: "RollingUpdate: Create new pods and then kill old ones"
|
||||
- value: "OnDelete"
|
||||
description: "(Legacy) OnDelete: ignore .spec.template changes"
|
||||
|
||||
|
||||
- variable: env
|
||||
group: "Container Configuration"
|
||||
label: "Image Environment"
|
||||
|
@ -253,8 +253,8 @@ questions:
|
|||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: data
|
||||
label: "App data Storage"
|
||||
- variable: db
|
||||
label: "App db Storage"
|
||||
description: "Stores the Application Database."
|
||||
schema:
|
||||
type: dict
|
||||
|
@ -330,7 +330,7 @@ questions:
|
|||
description: "Path inside the container the storage is mounted"
|
||||
schema:
|
||||
type: string
|
||||
default: "/data"
|
||||
default: "/var/lib/postgresql/data"
|
||||
hidden: true
|
||||
- variable: medium
|
||||
label: "EmptyDir Medium"
|
||||
|
@ -364,7 +364,7 @@ questions:
|
|||
type: string
|
||||
default: "100Gi"
|
||||
|
||||
- variable: backups
|
||||
- variable: dbbackups
|
||||
label: "App backup Storage"
|
||||
description: "Stores the Application backups."
|
||||
schema:
|
||||
|
@ -441,7 +441,7 @@ questions:
|
|||
description: "Path inside the container the storage is mounted"
|
||||
schema:
|
||||
type: string
|
||||
default: "/backups"
|
||||
default: "/dbbackups"
|
||||
hidden: true
|
||||
- variable: medium
|
||||
label: "EmptyDir Medium"
|
||||
|
|
|
@ -12,4 +12,4 @@ data:
|
|||
until pg_isready; do
|
||||
sleep 5;
|
||||
done;
|
||||
pg_dump -U $POSTGRES_USER -d {{ .Values.postgresqlDatabase }} > /backups/$BACKUP_NAME;
|
||||
pg_dump -U $POSTGRES_USER -d {{ .Values.postgresqlDatabase }} > /dbbackups/$BACKUP_NAME;
|
||||
|
|
|
@ -25,8 +25,6 @@ spec:
|
|||
env:
|
||||
- name: BACKUP_NAME
|
||||
value: {{- printf "postgres-backup-from-%s-to-%s-revision-%d" $upgradeDict.oldChartVersion $upgradeDict.newChartVersion (int64 $upgradeDict.preUpgradeRevision) -}}
|
||||
- name: PGDATA
|
||||
value: {{ .Values.pgdatapath | quote }}
|
||||
- name: POSTGRES_USER
|
||||
value: {{ .Values.postgresqlUsername | quote }}
|
||||
- name: POSTGRES_DB
|
||||
|
@ -55,4 +53,4 @@ spec:
|
|||
{{- nindent 2 . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -15,15 +15,15 @@ service:
|
|||
port: 5432
|
||||
|
||||
persistence:
|
||||
data:
|
||||
db:
|
||||
enabled: true
|
||||
type: emptyDir
|
||||
backups:
|
||||
mountPath: "/var/lib/postgresql/data"
|
||||
dbbackups:
|
||||
enabled: true
|
||||
type: emptyDir
|
||||
|
||||
|
||||
pgdatapath: "/data"
|
||||
postgresqlPassword: "testpass"
|
||||
postgresqlUsername: "test"
|
||||
postgresqlDatabase: "test"
|
||||
|
@ -37,7 +37,6 @@ envValueFrom:
|
|||
key: "postgresql-password"
|
||||
|
||||
envTpl:
|
||||
PGDATA: "{{ .Values.pgdatapath }}"
|
||||
POSTGRES_USER: "{{ .Values.postgresqlUsername }}"
|
||||
POSTGRES_DB: "{{ .Values.postgresqlDatabase }}"
|
||||
# POSTGRESQL_POSTGRES_PASSWORD: "{{ .Values.postgrespassword }}"
|
||||
|
|
Loading…
Reference in New Issue