Skip to content

feat: support startupProbe in instance pod - #2847

Merged
gbartolini merged 6 commits into
cloudnative-pg:mainfrom
EnterpriseDB:dev/cnp-4150
Sep 22, 2023
Merged

gbartolini merged 6 commits into
cloudnative-pg:mainfrom
EnterpriseDB:dev/cnp-4150

Conversation

@litaocdl

Copy link
Copy Markdown
Collaborator

this patch provide the startupProbe support for postgres pod,
the failureThreshold of startupProbe is calculated by startDelay / PeriodSeconds,
while PeriodSeconds is use default 10 seconds. startDelay by default is 3600

closes: #2843

@github-actions github-actions Bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.19 labels Sep 22, 2023
@github-actions

Copy link
Copy Markdown
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

Comment thread pkg/specs/pods.go Resolved
@litaocdl litaocdl changed the title feat: support startupDelay probe feat: support startupProbe in instance pod Sep 22, 2023
@litaocdl

Copy link
Copy Markdown
Collaborator Author

/test limit=local

@github-actions

Copy link
Copy Markdown
Contributor

litaocdl and others added 4 commits September 22, 2023 15:09
@gbartolini gbartolini added the always push images This PR will continuously push a container image every time a new commit is pushed label Sep 22, 2023
Comment thread api/v1/cluster_types.go Resolved
@gbartolini
gbartolini merged commit 4f4cd96 into cloudnative-pg:main Sep 22, 2023
@gbartolini
gbartolini deleted the dev/cnp-4150 branch September 22, 2023 14:34
gbartolini added a commit that referenced this pull request Sep 22, 2023
IMPORTANT: The default value of `startDelay` has now been
changed to 3600 seconds, equivalent of 1 hour.

Previously, it was set to 30 seconds.

This patch also replaces the livenessProbe's initial delay with a
more proper Kubernetes startup probe to deal with the start of
a Postgres server. Both the startup probe and the higher default
time should improve the self-healing capabilities of larger Postgres
deployments where the default value of 30 seconds was not
sufficient for example to complete a crash recovery operation,
causing infinite restarts.

Closes #2843

Signed-off-by: Tao Li <[email protected]>
Signed-off-by: YanniHu1996 <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Co-authored-by: YanniHu1996 <[email protected]>
Co-authored-by: Armando Ruocco <[email protected]>
Co-authored-by: Gabriele Bartolini <[email protected]>
gbartolini added a commit that referenced this pull request Sep 22, 2023
IMPORTANT: The default value of `startDelay` has now been
changed to 3600 seconds, equivalent of 1 hour.

Previously, it was set to 30 seconds.

This patch also replaces the livenessProbe's initial delay with a
more proper Kubernetes startup probe to deal with the start of
a Postgres server. Both the startup probe and the higher default
time should improve the self-healing capabilities of larger Postgres
deployments where the default value of 30 seconds was not
sufficient for example to complete a crash recovery operation,
causing infinite restarts.

Closes #2843

Signed-off-by: Tao Li <[email protected]>
Signed-off-by: YanniHu1996 <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Co-authored-by: YanniHu1996 <[email protected]>
Co-authored-by: Armando Ruocco <[email protected]>
Co-authored-by: Gabriele Bartolini <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

always push images This PR will continuously push a container image every time a new commit is pushed backport-requested ◀️ This pull request should be backported to all supported releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adapt startDelay to control the startupProbe

4 participants