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

ReadWriteOncePod access mode added to PVs #2488

Merged
merged 7 commits into from
Jul 24, 2024

Conversation

aayushsss1
Copy link
Contributor

@aayushsss1 aayushsss1 commented May 14, 2024

Description

With Kubernetes v1.29 a new ReadWriteOncePod access mode is available for PersistentVolumes that restricts access to a single pod on a single node. With this PR, users can define the ReadWriteOncePod access mode in their persistent volume and persistent volume claim resources.

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:

└─(14:06:42 on pv-access-modes)──> make testacc TESTARGS='-run=TestAccKubernetesPersistentVolumeV1_accessMode_ReadWriteOncePod'
==> Checking that code complies with gofmt requirements...
go vet ./...
TF_ACC=1 go test "/Users/mau/Dev/terraform-provider-kubernetes/kubernetes" -v -vet=off -run=TestAccKubernetesPersistentVolumeV1_accessMode_ReadWriteOncePod -parallel 8 -timeout 3h
=== RUN   TestAccKubernetesPersistentVolumeV1_accessMode_ReadWriteOncePod
=== PAUSE TestAccKubernetesPersistentVolumeV1_accessMode_ReadWriteOncePod
=== CONT  TestAccKubernetesPersistentVolumeV1_accessMode_ReadWriteOncePod
--- PASS: TestAccKubernetesPersistentVolumeV1_accessMode_ReadWriteOncePod (9.65s)
PASS
ok      github.com/hashicorp/terraform-provider-kubernetes/kubernetes   10.675s

Release Note

Release note for CHANGELOG:

`resource/kubernetes_persistent_volume_v1`: support `ReadWriteOncePod` access mode for PVs

References

This PR closes #1992

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 14, 2024 18:11
Copy link

hashicorp-cla-app bot commented May 14, 2024

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added size/S and removed size/XS labels Jul 24, 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.

Went ahead and wrapped up this PR by adding TestAccKubernetesPersistentVolumeV1_accessMode_ReadWriteOncePod. Ran locally and it looks to be passing.

Thank you for adding this!

@BBBmau BBBmau merged commit 4f44a9a into hashicorp:main Jul 24, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support ReadWriteOncePod for persistent volumes.
2 participants