terraform-provider-kubernetes
terraform-provider-kubernetes copied to clipboard
Support `ReadWriteOncePod` for persistent volumes.
Description
Support ReadWriteOncePod
for persistent volumes.
Potential Terraform Configuration
Part of a stateful set for running Zookeeper (based on https://kubernetes.io/docs/tutorials/stateful-application/zookeeper/)
volume_claim_template {
metadata {
name = "zookeeper-data-dir"
}
spec {
access_modes = ["ReadWriteOnce"]
resources {
requests = {
storage = "20Gi"
}
}
}
}
References
https://kubernetes.io/blog/2021/09/13/read-write-once-pod-access-mode-alpha/
(I'm not sure if this feature has hit production yet, but it's been available in at least alpha for a year and a half.)
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
This looks like a one-liner to me (add to the validation function in resource_kubernetes_persistent_volume.go:90
), but I don't have an environment I can test it in.
Hello! Thank you for opening this issue @joey-squid, based on the current state of ReadOnceWritePod
on the feature gate list, we will not be adding it just yet due to it still being in alpha.
This is also mentioned in our FAQ, in order to prevent any breaking changes we refrain from using features that are not in the beta stage
Makes sense and thanks. I didn't know about that list, and thought it was already past alpha for some reason. Would you like me to close out this issue or leave it open for when it does hit beta?
We'll leave this issue open for now until it hits beta. Thank you again!
Looks like it hit beta in April
@pbecotte I just checked the feature gates and you're right. They've moved it into beta with the release of 1.27 back in april!
@joey-squid With you being the original author of this issue, you are more than welcome to open a PR to help contribute with this! We can help along the way if guidance is needed. You can refer to the contribution guidelines for more help.
Hi all and happy new year!
My company isn't using Terraform for k8s anymore, so I don't see myself making this PR. As I mentioned earlier, it's probably a very simple change, but I'll leave it to people who would actually use (and therefore test) it.
On Thu, Dec 28, 2023 at 4:08 PM Mauricio Alvarez Leon < @.***> wrote:
@pbecotte https://github.com/pbecotte I just checked the feature gates and you're right. They've moved it into beta with the release of 1.27 back in april!
@joey-squid https://github.com/joey-squid With you being the original author of this issue, you are more than welcome to open a PR to help contribute with this! We can help along the way if guidance is needed. You can refer to the contribution guidelines https://github.com/hashicorp/terraform-provider-kubernetes/blob/main/_about/CONTRIBUTING.md for more help.
— Reply to this email directly, view it on GitHub https://github.com/hashicorp/terraform-provider-kubernetes/issues/1992#issuecomment-1871636146, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3ZVAVOLBU52V7TD5ZFJZ73YLYCYNAVCNFSM6AAAAAAUV5N3MCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZRGYZTMMJUGY . You are receiving this because you were mentioned.Message ID: @.*** com>
k8s 1.29 (released December 13, 2023) has ReadWriteOncePod as GA.
It's at the top of their graduations to stable list.
I just tried to use it and was surprised it wasn't recognized. Google brought me here.
Just bumping this, would be good to see this implemented. Is it on the radar/roadmap?
Hey I can take this issue up