Skip to content

For single-node instances disable PDB#512

Open
afgane wants to merge 1 commit into
devfrom
disable-pdb
Open

For single-node instances disable PDB#512
afgane wants to merge 1 commit into
devfrom
disable-pdb

Conversation

@afgane

@afgane afgane commented Mar 10, 2025

Copy link
Copy Markdown
Contributor

CNPG docs recommend disabling the pod disruption budgets when number of instances is set to 1: https://cloudnative-pg.io/documentation/current/kubernetes_upgrade/#postgresql-clusters-used-for-development-or-testing

@ksuderman ksuderman changed the base branch from master to dev May 11, 2026 19:43
namespace: {{ .Release.Namespace }}
spec:
instances: {{ default "1" .Values.postgresql.instances }}
{{- if or (not .Values.postgresql.instances) (eq (toString .Values.postgresql.instances) "1") }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we specify .Values.postgresql.instances in the values file, could this then be simplified as follows?

Suggested change
{{- if or (not .Values.postgresql.instances) (eq (toString .Values.postgresql.instances) "1") }}
{{- if eq .Values.postgresql.instances 1 }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants