terraform-provider-kubernetes
terraform-provider-kubernetes copied to clipboard
Expose status.capacity.storage kubernetes_persistent_volume_claim(_v1)
Description
Some CSI implementations provision volume sizes which are different from the requested storage. For example OKE (Oracle Kubernetes Engine) rounds up the requested storage to 50Gi (as documented in https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengcreatingpersistentvolumeclaim_topic-Provisioning_PVCs_on_BV.htm) It would be useful to detect this condition for various purposes cost calculations, volume resizing decisions and so on).
Potential Terraform Configuration
data "kubernetes_persistent_volume_claim_v1" "self" {
metadata {
namespace = "monitoring"
name = "victoria-materics-single-server-0"
}
}
output "vm_volume_size" {
value = data.kubernetes_persistent_volume_claim_v1.self.status_capacity_storage
}
References
None
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