99 lines
2.7 KiB
YAML
99 lines
2.7 KiB
YAML
image:
|
|
repository: bitnami/postgresql
|
|
pullPolicy: IfNotPresent
|
|
tag: 14.1.0@sha256:ed5305053c28f397ade50f5fa48e7f73dd1402bc20dcccf1978b3a5ff243f9dd
|
|
|
|
controller:
|
|
# -- Set the controller type.
|
|
# Valid options are deployment, daemonset or statefulset
|
|
type: statefulset
|
|
# -- Number of desired pods
|
|
replicas: 1
|
|
# -- Set the controller upgrade strategy
|
|
# For Deployments, valid values are Recreate (default) and RollingUpdate.
|
|
# For StatefulSets, valid values are OnDelete and RollingUpdate (default).
|
|
# DaemonSets ignore this.
|
|
strategy: RollingUpdate
|
|
rollingUpdate:
|
|
# -- Set deployment RollingUpdate max unavailable
|
|
unavailable: 1
|
|
# -- Set deployment RollingUpdate max surge
|
|
surge:
|
|
# -- Set statefulset RollingUpdate partition
|
|
partition:
|
|
# -- ReplicaSet revision history limit
|
|
revisionHistoryLimit: 3
|
|
|
|
initContainers:
|
|
migrate-db:
|
|
image: "{{ .Values.alpineImage.repository}}:{{ .Values.alpineImage.tag }}"
|
|
securityContext:
|
|
runAsUser: 0
|
|
privileged: true
|
|
runAsNonRoot: false
|
|
command:
|
|
- /bin/sh
|
|
- -cx
|
|
- |
|
|
echo 'trying to migrate old db to new location...'
|
|
mkdir -p /bitnami/postgresql/data
|
|
mv -f /bitnami/postgresql/old/* /bitnami/postgresql/ || true
|
|
chown -R {{ .Values.podSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }} /bitnami/postgresql/
|
|
chmod 775 /bitnami/postgresql/
|
|
imagePullPolicy: IfNotPresent
|
|
volumeMounts:
|
|
- name: db
|
|
mountPath: /bitnami/postgresql/old
|
|
- name: data
|
|
mountPath: /bitnami/postgresql
|
|
|
|
securityContext:
|
|
readOnlyRootFilesystem: false
|
|
|
|
service:
|
|
main:
|
|
enabled: true
|
|
ports:
|
|
main:
|
|
port: 5432
|
|
targetPort: 5432
|
|
|
|
## TODO: Fix the backup-on-upgrade system
|
|
enableUpgradeBackup: false
|
|
|
|
podSecurityContext:
|
|
runAsGroup: 0
|
|
|
|
persistence:
|
|
db:
|
|
enabled: true
|
|
mountPath: "/bitnami/postgresql/old"
|
|
|
|
volumeClaimTemplates:
|
|
data:
|
|
enabled: true
|
|
mountPath: "/bitnami/postgresql"
|
|
|
|
|
|
postgresqlPassword: "testpass"
|
|
postgresqlUsername: "test"
|
|
postgresqlDatabase: "test"
|
|
postgrespassword: "testroot"
|
|
existingSecret: ""
|
|
|
|
envValueFrom:
|
|
POSTGRES_PASSWORD:
|
|
secretKeyRef:
|
|
name: '{{ ( tpl .Values.existingSecret $ ) | default ( include "common.names.fullname" . ) }}'
|
|
key: "postgresql-password"
|
|
POSTGRESQL_POSTGRES_PASSWORD:
|
|
secretKeyRef:
|
|
name: '{{ ( tpl .Values.existingSecret $ ) | default ( include "common.names.fullname" . ) }}'
|
|
key: "postgresql-postgres-password"
|
|
|
|
envTpl:
|
|
POSTGRES_USER: "{{ .Values.postgresqlUsername }}"
|
|
POSTGRES_DB: "{{ .Values.postgresqlDatabase }}"
|
|
# POSTGRESQL_POSTGRES_PASSWORD: "{{ .Values.postgrespassword }}"
|
|
# POSTGRESQL_PASSWORD: "{{ .Values.password }}"
|