-
a) @praveenkumar Dude! You rule. Tried out the new dynamic provisioning, and it totally rocks. Thank you very, very much, sir. Love it. And sorry for bothering you with the rest of my questions below, but I would appreciate any insight you could provide. b) I provision and remove Jenkins installs like mad during some of my development and testing (my CICD OSS project uses Jenkins heavily), which is what made the broken PV's so aggravating when working for me. As part of the Helm install I use, I also include a PVC for the Jenkins agents to share that caches build dependencies, and this has proven to speed up build times by a few orders of magnitude. After testing the your new dynamic provisioning, I stumbled into the unfortunate side-effect that PVC's are only bound to a dynamic PV after being mounted in a pod. This problem with this is that in my case, I just need the PVC in place for when a Jenkins pipeline runs, so it's the build dependencies are persistent between pipeline runs and isn't destroyed (Jenkins dynamic volumes are removed when the agent pod is removed). The install breaks Helm's --atomic install, because a pending PVC is considered an incomplete install and the Jenkins Helm install times out and fails. I got around this by mounting the volume into Jenkins directly, even though the server doesn't actually use it. Question(s): is this expected and normal behavior for dynamic provisioning? Is there another setting to get around this behavior, and get the PV to be created even when the PVC isn't being used yet? Setting the StorageClass in my case isn't good practice, because who knows what that will be from install to install, and CRC is merely a demo platform for my project as it's meant to be. There is no easy oc/kubectl call that will find the default StorageClass since it's only marked by annotation, right? Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
From what I can tell after investigating this question, it is expected behavior that a PVC using a dynamically provisioned volume provided from a CSI driver remain in Pending state until attached to a Pod. Closing this out as answered. Note that this means if you are deploying a PVC via Helm meant to hang around until another Pod defined outside the chart is deployed, you cannot use the |
Beta Was this translation helpful? Give feedback.
From what I can tell after investigating this question, it is expected behavior that a PVC using a dynamically provisioned volume provided from a CSI driver remain in Pending state until attached to a Pod. Closing this out as answered.
Note that this means if you are deploying a PVC via Helm meant to hang around until another Pod defined outside the chart is deployed, you cannot use the
--wait
or--atomic
flags, or it will necessarily timeout if the Pod using the PVC doesn't deploy before the timeout expires. You'll have to manually check your deployment outside of Helm, along with manual cleanup and rollback if something goes wrong.