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 spec.persistentVolumeClaimRetentionPolicy in kubernetes_stateful_set #2333

Merged
merged 6 commits into from
Dec 5, 2023

Conversation

adinhodovic
Copy link
Contributor

Description

Support spec.persistentVolumeClaimRetentionPolicy in kubernetes_stateful_set. Requires enabling the feature flag StatefulSetAutoDeletePVC.

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:

TF_ACC=1 KUBE_CTX_CLUSTER=minikube KUBE_CONFIG_PATH=~/.kube/config KUBE_CTX_AUTH_INFO=minikube make testacc TESTARGS="-run=TestAccKubernetesStatefulSetV1"

TF_ACC=1 go test "/home/adin/oss/terraform-provider-kubernetes/kubernetes" -v -vet=off -run=TestAccKubernetesStatefulSetV1 -parallel 8 -timeout 3h
=== RUN   TestAccKubernetesStatefulSetV1_minimal
=== PAUSE TestAccKubernetesStatefulSetV1_minimal
=== RUN   TestAccKubernetesStatefulSetV1_basic
=== PAUSE TestAccKubernetesStatefulSetV1_basic
=== RUN   TestAccKubernetesStatefulSetV1_basic_idempotency
=== PAUSE TestAccKubernetesStatefulSetV1_basic_idempotency
=== RUN   TestAccKubernetesStatefulSetV1_Update
=== PAUSE TestAccKubernetesStatefulSetV1_Update
=== RUN   TestAccKubernetesStatefulSetV1_waitForRollout
=== PAUSE TestAccKubernetesStatefulSetV1_waitForRollout
=== CONT  TestAccKubernetesStatefulSetV1_minimal
=== CONT  TestAccKubernetesStatefulSetV1_Update
=== CONT  TestAccKubernetesStatefulSetV1_waitForRollout
=== CONT  TestAccKubernetesStatefulSetV1_basic_idempotency
=== CONT  TestAccKubernetesStatefulSetV1_basic
--- PASS: TestAccKubernetesStatefulSetV1_minimal (6.47s)
--- PASS: TestAccKubernetesStatefulSetV1_basic (24.96s)
--- PASS: TestAccKubernetesStatefulSetV1_basic_idempotency (28.57s)
--- PASS: TestAccKubernetesStatefulSetV1_waitForRollout (37.02s)
--- PASS: TestAccKubernetesStatefulSetV1_Update (90.94s)
PASS
ok      github.com/hashicorp/terraform-provider-kubernetes/kubernetes   90.969s

Release Note

Release note for CHANGELOG:

feat: Support spec.persistentVolumeClaimRetentionPolicy in kubernetes_stateful_set

References

Fixes #2282

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

@adinhodovic adinhodovic requested a review from a team as a code owner October 30, 2023 14:02
@hashicorp-cla
Copy link

hashicorp-cla commented Oct 30, 2023

CLA assistant check
All committers have signed the CLA.

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.

Looks to be good, just missing documentation of the attribute being added as well as a changelog-entry. It can be added in website/docs/r/stateful_set_v1.html.markdown and website/docs/r/stateful_set.html.markdown

@adinhodovic
Copy link
Contributor Author

Looks to be good, just missing documentation of the attribute being added as well as a changelog-entry. It can be added in website/docs/r/stateful_set_v1.html.markdown and website/docs/r/stateful_set.html.markdown

Fixed!

@BBBmau
Copy link
Contributor

BBBmau commented Dec 5, 2023

Thank you for your patience! Wanted to double check this since it had been while since this PR was open. All looks good, thank you for contributing!

@BBBmau BBBmau merged commit 256472a into hashicorp:main Dec 5, 2023
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support spec.persistentVolumeClaimRetentionPolicy in kubernetes_stateful_set
3 participants