Skip to content
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

feat: support startupProbe in instance pod #2847

Merged
merged 6 commits into from
Sep 22, 2023

Conversation

litaocdl
Copy link
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 release-1.20 labels Sep 22, 2023
@github-actions
Copy link
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

pkg/specs/pods.go Outdated Show resolved Hide resolved
@litaocdl litaocdl changed the title feat: support startupDelay probe feat: support startupProbe in instance pod Sep 22, 2023
@litaocdl
Copy link
Collaborator Author

/test limit=local

@github-actions
Copy link
Contributor

@litaocdl, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/6273031091

litaocdl and others added 4 commits September 22, 2023 15:09
Signed-off-by: Tao Li <tao.li@enterprisedb.com>
Signed-off-by: Tao Li <tao.li@enterprisedb.com>
Signed-off-by: YanniHu1996 <yantian.hu@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
@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
api/v1/cluster_types.go Outdated Show resolved Hide resolved
config/crd/bases/postgresql.cnpg.io_clusters.yaml Outdated Show resolved Hide resolved
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
@gbartolini gbartolini merged commit 4f4cd96 into cloudnative-pg:main Sep 22, 2023
11 of 13 checks passed
@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 <tao.li@enterprisedb.com>
Signed-off-by: YanniHu1996 <yantian.hu@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: YanniHu1996 <yantian.hu@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
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 <tao.li@enterprisedb.com>
Signed-off-by: YanniHu1996 <yantian.hu@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: YanniHu1996 <yantian.hu@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
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 release-1.19 release-1.20
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adapt startDelay to control the startupProbe
4 participants