Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions chart/templates/postgres-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ spec:
initdb:
database: {{ .Values.postgres.database }}
owner: {{ .Values.postgres.owner }}
{{- with .Values.postgres.locale }}
# initdb-only: collation and ctype are fixed when the database is created.
# Changing them on a running cluster means a new cluster and a restore.
encoding: {{ .encoding | default "UTF8" }}
{{- with .collate }}
localeCollate: {{ . }}
{{- end }}
{{- with .ctype }}
localeCType: {{ . }}
{{- end }}
{{- end }}
{{- if .Values.postgres.allowCreateDatabase }}
# Development only. pytest-django creates and drops its own test database on
# every run, which the bootstrap owner role cannot do by default. CNPG
Expand Down
6 changes: 6 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ postgres:
image: ghcr.io/cloudnative-pg/postgresql:17
database: typelearn
owner: typelearn
# Collation/ctype for the initial database, e.g. en_US.UTF-8. Empty keeps
# CNPG's default (C). Only read at bootstrap; it cannot be changed in place.
locale: {}
# encoding: UTF8
# collate: en_US.UTF-8
# ctype: en_US.UTF-8
storage:
size: 1Gi
# Empty uses the cluster's default StorageClass.
Expand Down
Loading