diff --git a/charts/cluster/Chart.yaml b/charts/cluster/Chart.yaml index 6e1aa275b..5bc7a4e20 100644 --- a/charts/cluster/Chart.yaml +++ b/charts/cluster/Chart.yaml @@ -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: diff --git a/charts/cluster/templates/cluster.yaml b/charts/cluster/templates/cluster.yaml index a2cd09853..97984ad3c 100644 --- a/charts/cluster/templates/cluster.yaml +++ b/charts/cluster/templates/cluster.yaml @@ -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: diff --git a/charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster-assert.yaml b/charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster-assert.yaml index e97b431f7..058c9a3e1 100644 --- a/charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster-assert.yaml +++ b/charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster-assert.yaml @@ -83,6 +83,10 @@ spec: priorityClassName: mega-high primaryUpdateStrategy: supervised primaryUpdateMethod: restart + smartShutdownTimeout: 180 + startDelay: 3600 + stopDelay: 1800 + switchoverDelay: 3600 logLevel: warning managed: roles: diff --git a/charts/cluster/values.yaml b/charts/cluster/values.yaml index c62ca83c4..aa6ffd51f 100644 --- a/charts/cluster/values.yaml +++ b/charts/cluster/values.yaml @@ -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