Skip to content

Support Probe-level terminationGracePeriodSeconds #2695

Open
@andrewpage

Description

@andrewpage

Description

Kubernetes >v1.25 supports a terminationGracePeriodSeconds field on livenessProbe and startupProbe. This field overrides the Pod-level terminationGracePeriod field when a SIGTERM is triggered by a probe failure.

Probe-level terminationGracePeriodSeconds cannot be set for readiness probes.

https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#probe-level-terminationgraceperiodseconds

Potential Terraform Configuration

resource "kubernetes_deployment" "example" {
  metadata {
    # ...
  }

  spec {
    # ...

    template {
      # ...

      spec {
        container {
          # ...

          liveness_probe {
            # ...

            termination_grace_period_seconds = 3
          }
        }
      }
    }
  }
}

References

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions