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

Expose status.capacity.storage kubernetes_persistent_volume_claim(_v1) #2680

Open
mindw opened this issue Feb 1, 2025 · 0 comments
Open
Assignees

Comments

@mindw
Copy link

mindw commented Feb 1, 2025

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants