terraform-provider-kubernetes icon indicating copy to clipboard operation
terraform-provider-kubernetes copied to clipboard

Support Probe-level `terminationGracePeriodSeconds`

Open andrewpage opened this issue 9 months ago • 3 comments

Description

Support Probe-level termination_grace_period_seconds field in liveness_probe and startup_probe.

Acceptance tests

  • [x] Have you added an acceptance test for the functionality being added?
  • [x] Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ make testacc TESTARGS="-run ^TestAccKubernetes\(Pod\|Deployment\)V1_\(.+\)probe"

==> Checking that code complies with gofmt requirements...
go vet ./...
TF_ACC=1 go test "/Users/andrewpage/Developer/hightouch/terraform-provider-kubernetes/kubernetes" -v -vet=off -run ^TestAccKubernetes\(Pod\|Deployment\)V1_\(.+\)probe -parallel 8 -timeout 3h
=== RUN   TestAccKubernetesDeploymentV1_with_container_liveness_probe_using_exec
=== PAUSE TestAccKubernetesDeploymentV1_with_container_liveness_probe_using_exec
=== RUN   TestAccKubernetesDeploymentV1_with_container_liveness_probe_using_http_get
=== PAUSE TestAccKubernetesDeploymentV1_with_container_liveness_probe_using_http_get
=== RUN   TestAccKubernetesDeploymentV1_with_container_liveness_probe_using_tcp
=== PAUSE TestAccKubernetesDeploymentV1_with_container_liveness_probe_using_tcp
=== RUN   TestAccKubernetesDeploymentV1_with_container_liveness_probe_using_termination_grace_period_seconds
=== PAUSE TestAccKubernetesDeploymentV1_with_container_liveness_probe_using_termination_grace_period_seconds
=== RUN   TestAccKubernetesPodV1_with_container_liveness_probe_using_exec
=== PAUSE TestAccKubernetesPodV1_with_container_liveness_probe_using_exec
=== RUN   TestAccKubernetesPodV1_with_container_liveness_probe_using_http_get
=== PAUSE TestAccKubernetesPodV1_with_container_liveness_probe_using_http_get
=== RUN   TestAccKubernetesPodV1_with_container_liveness_probe_using_termination_grace_period_seconds
=== PAUSE TestAccKubernetesPodV1_with_container_liveness_probe_using_termination_grace_period_seconds
=== RUN   TestAccKubernetesPodV1_with_container_liveness_probe_using_tcp
=== PAUSE TestAccKubernetesPodV1_with_container_liveness_probe_using_tcp
=== RUN   TestAccKubernetesPodV1_with_container_liveness_probe_using_grpc
=== PAUSE TestAccKubernetesPodV1_with_container_liveness_probe_using_grpc
=== RUN   TestAccKubernetesPodV1_config_container_startup_probe
=== PAUSE TestAccKubernetesPodV1_config_container_startup_probe
=== RUN   TestAccKubernetesPodV1_config_container_startup_probe_termination_grace_period_seconds
=== PAUSE TestAccKubernetesPodV1_config_container_startup_probe_termination_grace_period_seconds
=== CONT  TestAccKubernetesDeploymentV1_with_container_liveness_probe_using_exec
=== CONT  TestAccKubernetesPodV1_with_container_liveness_probe_using_termination_grace_period_seconds
=== CONT  TestAccKubernetesPodV1_config_container_startup_probe
=== CONT  TestAccKubernetesPodV1_config_container_startup_probe_termination_grace_period_seconds
=== CONT  TestAccKubernetesPodV1_with_container_liveness_probe_using_grpc
=== CONT  TestAccKubernetesPodV1_with_container_liveness_probe_using_tcp
=== CONT  TestAccKubernetesDeploymentV1_with_container_liveness_probe_using_termination_grace_period_seconds
=== CONT  TestAccKubernetesPodV1_with_container_liveness_probe_using_http_get
--- PASS: TestAccKubernetesDeploymentV1_with_container_liveness_probe_using_exec (3.11s)
=== CONT  TestAccKubernetesPodV1_with_container_liveness_probe_using_exec
--- PASS: TestAccKubernetesPodV1_with_container_liveness_probe_using_termination_grace_period_seconds (3.88s)
=== CONT  TestAccKubernetesDeploymentV1_with_container_liveness_probe_using_tcp
--- PASS: TestAccKubernetesPodV1_config_container_startup_probe (4.84s)
=== CONT  TestAccKubernetesDeploymentV1_with_container_liveness_probe_using_http_get
--- PASS: TestAccKubernetesPodV1_with_container_liveness_probe_using_grpc (4.88s)
--- PASS: TestAccKubernetesPodV1_with_container_liveness_probe_using_http_get (4.88s)
--- PASS: TestAccKubernetesPodV1_config_container_startup_probe_termination_grace_period_seconds (4.89s)
--- PASS: TestAccKubernetesDeploymentV1_with_container_liveness_probe_using_termination_grace_period_seconds (4.89s)
--- PASS: TestAccKubernetesPodV1_with_container_liveness_probe_using_tcp (6.16s)
--- PASS: TestAccKubernetesDeploymentV1_with_container_liveness_probe_using_tcp (2.57s)
--- PASS: TestAccKubernetesPodV1_with_container_liveness_probe_using_exec (6.28s)
--- PASS: TestAccKubernetesDeploymentV1_with_container_liveness_probe_using_http_get (4.63s)
PASS
ok  	github.com/hashicorp/terraform-provider-kubernetes/kubernetes	10.041s

Release Note

Release note for CHANGELOG:

Add Probe-level `terminationGracePeriodSeconds` fields to Liveness and Readiness probes.

References

  • https://github.com/hashicorp/terraform-provider-kubernetes/issues/2695
  • https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#probe-level-terminationgraceperiodseconds

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

andrewpage avatar Feb 27 '25 19:02 andrewpage

CLA assistant check
All committers have signed the CLA.

hashicorp-cla-app[bot] avatar Feb 27 '25 19:02 hashicorp-cla-app[bot]

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

hashicorp-cla-app[bot] avatar Feb 27 '25 19:02 hashicorp-cla-app[bot]

I ran go generate locally to generate the docs, but it yielded a lot of changes, many of which were completely unrelated to this change. I'd appreciate guidance on the right way to generate updated docs.

andrewpage avatar Feb 27 '25 20:02 andrewpage