Terraform-provider-kubernetes: PVC storage_class_name empty sets default storage class

Created on 26 Jul 2019  ·  7Comments  ·  Source: hashicorp/terraform-provider-kubernetes

Hello,

There is a critical bug for the kubernetes terraform provider that has been reported since 2017 but is still open.

See:
https://github.com/terraform-providers/terraform-provider-kubernetes/issues/102
https://github.com/terraform-providers/terraform-provider-kubernetes/issues/339

What happens is that terraform is not passing the empty storage class string instead somehow the pvc's are created with the default storage class. The work around mentioned by using label selectors is not working anymore on terraform 0.12.

Best regards,
David

acknowledged sdk-update-needed

Most helpful comment

I was able to work around this by creating a dummy storage class that I applied to the PV and the PVC - not ideal, but it did work.

All 7 comments

I was able to work around this by creating a dummy storage class that I applied to the PV and the PVC - not ideal, but it did work.

@ajchiarello good solution

I opened #590 to fix this.

Any updates on merging this? Bug is really annoying.

+1, this is a blocker for using PVCs in our scenario, and we have to do volume mounts directly on the pod template spec, which does not allow us to override mount options, which breaks our scenario.

Hi, we have a few issues relating to this that are being consolidated here: https://github.com/terraform-providers/terraform-provider-kubernetes/issues/872 See the new issue for a work-around. Thanks!

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

Was this page helpful?
0 / 5 - 0 ratings