mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
refactor: Remove initContainers from PostgreSQL StatefulSet and enable default configuration settings
This commit is contained in:
@@ -48,28 +48,6 @@ spec:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
initContainers:
|
||||
- name: setup-config
|
||||
image: busybox:latest
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
# Create the postgresql.conf symlink if it doesn't exist and the bitnami config exists
|
||||
if [ -f "/var/lib/postgresql/data/postgresql/pgdata/postgresql.conf" ] && [ ! -f "/var/lib/postgresql/data/data/postgresql.conf" ]; then
|
||||
ln -sf ../postgresql/pgdata/postgresql.conf /var/lib/postgresql/data/data/postgresql.conf
|
||||
fi
|
||||
# Also link pg_hba.conf if it exists
|
||||
if [ -f "/var/lib/postgresql/data/postgresql/pgdata/pg_hba.conf" ] && [ ! -f "/var/lib/postgresql/data/data/pg_hba.conf" ]; then
|
||||
ln -sf ../postgresql/pgdata/pg_hba.conf /var/lib/postgresql/data/data/pg_hba.conf
|
||||
fi
|
||||
# Also link pg_ident.conf if it exists
|
||||
if [ -f "/var/lib/postgresql/data/postgresql/pgdata/pg_ident.conf" ] && [ ! -f "/var/lib/postgresql/data/data/pg_ident.conf" ]; then
|
||||
ln -sf ../postgresql/pgdata/pg_ident.conf /var/lib/postgresql/data/data/pg_ident.conf
|
||||
fi
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
containers:
|
||||
- name: postgresql
|
||||
image: "{{ .Values.postgresql.image.repository }}:{{ .Values.postgresql.image.tag }}"
|
||||
|
||||
@@ -83,10 +83,9 @@ postgresql:
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
resources: {}
|
||||
# Optional PostgreSQL configuration
|
||||
# configuration: |-
|
||||
# max_connections = 100
|
||||
# shared_buffers = 128MB
|
||||
configuration: |-
|
||||
max_connections = 100
|
||||
shared_buffers = 128MB
|
||||
# effective_cache_size = 4GB
|
||||
# maintenance_work_mem = 64MB
|
||||
# checkpoint_completion_target = 0.9
|
||||
|
||||
Reference in New Issue
Block a user