Skip to content

Adapt startDelay to control the startupProbe #2843

Closed

Description

@gbartolini

As emerged in discussion #2835, the default value of startDelay is not helping deployment of Postgres in a common scenario, as it is too low (30 seconds).

Given that now startup probes are in every available Kubernetes distribution, it makes sense to explore the possibility to divert the current setup (which sets initialDelaySeconds of the liveness probe) make use of startup probes.

This is the current implementation:

    livenessProbe:
      failureThreshold: 3
      httpGet:
        path: /healthz
        port: 8000
        scheme: HTTP
      initialDelaySeconds: <startDelay>
      periodSeconds: 10
      successThreshold: 1
      timeoutSeconds: 5

    readinessProbe:
      failureThreshold: 3
      httpGet:
        path: /readyz
        port: 8000
        scheme: HTTP
      periodSeconds: 10
      successThreshold: 1
      timeoutSeconds: 5

This patch is about making this change:

    startupProbe:
      failureThreshold: <FAILURE_THRESHOLD>
      httpGet:
        path: /healthz
        port: 8000
        scheme: HTTP
      periodSeconds: 10
      successThreshold: 1
      timeoutSeconds: 5

    livenessProbe:
      failureThreshold: 3
      httpGet:
        path: /healthz
        port: 8000
        scheme: HTTP
      periodSeconds: 10
      successThreshold: 1
      timeoutSeconds: 5

    readinessProbe:
      failureThreshold: 3
      httpGet:
        path: /readyz
        port: 8000
        scheme: HTTP
      periodSeconds: 10
      successThreshold: 1
      timeoutSeconds: 5

where FAILURE_THRESHOLD = ceiling(startDelay / periodSeconds) and periodSeconds is by default set to 10 seconds and FAILURE_THRESHOLD minimum value is 1.

At the same time, change the default startDelay to 3600 seconds.

Activity

  1. self-assigned this
    on Sep 22, 2023
  2. added 3 commits that reference this issue on Sep 22, 2023
    4f4cd96
    ae42240
    953d048
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions