Skip to content

Allow setting timeout/delay values #525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion charts/cluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ name: cluster
description: Deploys and manages a CloudNativePG cluster and its associated resources.
icon: https://raw.githubusercontent.com/cloudnative-pg/artwork/main/cloudnativepg-logo.svg
type: application
version: 0.2.1
version: 0.2.2
sources:
- https://github.com/cloudnative-pg/charts
keywords:
Expand Down
6 changes: 6 additions & 0 deletions charts/cluster/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ spec:

primaryUpdateMethod: {{ .Values.cluster.primaryUpdateMethod }}
primaryUpdateStrategy: {{ .Values.cluster.primaryUpdateStrategy }}

smartShutdownTimeout: {{ .Values.cluster.smartShutdownTimeout }}
startDelay: {{ .Values.cluster.startDelay }}
stopDelay: {{ .Values.cluster.stopDelay }}
switchoverDelay: {{ .Values.cluster.switchoverDelay }}

logLevel: {{ .Values.cluster.logLevel }}
{{- with .Values.cluster.certificates }}
certificates:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ spec:
priorityClassName: mega-high
primaryUpdateStrategy: supervised
primaryUpdateMethod: restart
smartShutdownTimeout: 180
startDelay: 3600
stopDelay: 1800
switchoverDelay: 3600
logLevel: warning
managed:
roles:
Expand Down
12 changes: 12 additions & 0 deletions charts/cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,18 @@ cluster:
enableSuperuserAccess: true
superuserSecret: ""

# -- The time in seconds that controls the window of time reserved for the smart shutdown of Postgres to complete. Make sure you reserve enough time for the operator to request a fast shutdown of Postgres (that is: stopDelay - smartShutdownTimeout).
smartShutdownTimeout: 180

# -- The time in seconds that is allowed for a PostgreSQL instance to successfully start up (default 3600). The startup probe failure threshold is derived from this value using the formula: ceiling(startDelay / 10).
startDelay: 3600

# The time in seconds that is allowed for a PostgreSQL instance to gracefully shutdown (default 1800)
stopDelay: 1800

# The time in seconds that is allowed for a primary PostgreSQL instance to gracefully shutdown during a switchover. Default value is 3600 seconds (1 hour).
switchoverDelay: 3600

# -- Allow to disable PDB, mainly useful for upgrade of single-instance clusters or development purposes
# See: https://cloudnative-pg.io/documentation/current/kubernetes_upgrade/#pod-disruption-budgets
enablePDB: true
Expand Down