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

min_ready_seconds parameter support for statefulset #2493

Merged
merged 10 commits into from
Aug 12, 2024

Conversation

aayushsss1
Copy link
Contributor

@aayushsss1 aayushsss1 commented May 16, 2024

Description

Minimum ready seconds

.spec.minReadySeconds is an optional field that specifies the minimum number of seconds for which a newly created Pod should be running and ready without any of its containers crashing, for it to be considered available. This is used to check progression of a rollout when using a Rolling Update strategy. This field defaults to 0 (the Pod will be considered available as soon as it is ready). To learn more about when a Pod is considered ready, see Container Probes.

Acceptance tests

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

Output from acceptance testing:

~ make testacc TESTARGS='-run=TestAccKubernetesStatefulSetV1_basic' 
==> Checking that code complies with gofmt requirements...
go vet ./...
TF_ACC=1 go test "/Users/aayushsubramaniam/Documents/terraform-provider-kubernetes/kubernetes" -v -vet=off -run=TestAccKubernetesStatefulSetV1_basic -parallel 8 -timeout 3h
# github.com/hashicorp/terraform-provider-kubernetes/kubernetes.test
ld: warning: -bind_at_load is deprecated on macOS
=== RUN   TestAccKubernetesStatefulSetV1_basic
=== PAUSE TestAccKubernetesStatefulSetV1_basic
=== RUN   TestAccKubernetesStatefulSetV1_basic_idempotency
=== PAUSE TestAccKubernetesStatefulSetV1_basic_idempotency
=== CONT  TestAccKubernetesStatefulSetV1_basic
=== CONT  TestAccKubernetesStatefulSetV1_basic_idempotency
--- PASS: TestAccKubernetesStatefulSetV1_basic (55.39s)
--- PASS: TestAccKubernetesStatefulSetV1_basic_idempotency (56.71s)
PASS
ok  	github.com/hashicorp/terraform-provider-kubernetes/kubernetes	59.305s
make testacc TESTARGS='-run=TestAccKubernetesStatefulSetV1_Update'
==> Checking that code complies with gofmt requirements...
go vet ./...
TF_ACC=1 go test "/Users/aayushsubramaniam/Documents/terraform-provider-kubernetes/kubernetes" -v -vet=off -run=TestAccKubernetesStatefulSetV1_Update -parallel 8 -timeout 3h
# github.com/hashicorp/terraform-provider-kubernetes/kubernetes.test
ld: warning: -bind_at_load is deprecated on macOS
=== RUN   TestAccKubernetesStatefulSetV1_Update
=== PAUSE TestAccKubernetesStatefulSetV1_Update
=== CONT  TestAccKubernetesStatefulSetV1_Update
--- PASS: TestAccKubernetesStatefulSetV1_Update (185.05s)
PASS
ok  	github.com/hashicorp/terraform-provider-kubernetes/kubernetes	185.926s

Release Note

Release note for CHANGELOG:

resource/resource_kubernetes_stateful_set_v1: Add support for `min_ready_seconds`

References

Parameter stable since v1.25 - https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#minimum-ready-seconds

This issue closes #2469

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

@aayushsss1 aayushsss1 requested a review from a team as a code owner May 16, 2024 19:50
@github-actions github-actions bot added size/M and removed size/L labels May 26, 2024
@BBBmau BBBmau self-assigned this Aug 9, 2024
@BBBmau BBBmau added the no-documentation This issue or pull request does not have documentation changes. label Aug 9, 2024
Copy link
Contributor

@BBBmau BBBmau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only changes needed were on the docs and description so that they match what's seen in the official kubernetes docs

@aayushsss1 Really great work on this! Interested in picking up other issues?

@BBBmau BBBmau merged commit 9f4cabc into hashicorp:main Aug 12, 2024
19 checks passed
@aayushsss1
Copy link
Contributor Author

Hey @BBBmau I'd love to! Do let me know if any issues require immediate attention :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-documentation This issue or pull request does not have documentation changes. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kubernetes_stateful_set_v1 min_ready_seconds
2 participants