kubernetes-plugin and PersistentVolumeClaims

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

kubernetes-plugin and PersistentVolumeClaims

Scott Grissom
I have a use case where a PersistentVolumeClaim is used to clone a volume snapshot, which is a prebuilt m2 repository. A PVC object needs to be created before creating the Pod object, then deleted after the pod finishes.

Using kubernetes-plugin, it seems that the yaml attribute in the declarative pipeline only supports Pod objects. Before I go off and try to figure out how to script the creation of a PVC object before launching the Pod, I wanted to ask if there is a mechanism in this plugin that would help manage a PVC lifecycle...and I'm just not seeing it. 

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e1011b4f-1222-433d-91dd-44c1dba7b748%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: kubernetes-plugin and PersistentVolumeClaims

Usov Dmitri
https://github.com/jenkinsci/kubernetes-cd-plugin

kubernetes-cd plugin has the capability to create a pvc, the recent plugin version has got fixed an issue with subsequent invocation of a yaml that creates/updates a pvc.

Regards,
Dmitri

On Tuesday, January 14, 2020 at 12:38:46 AM UTC+3, scottyg wrote:
I have a use case where a PersistentVolumeClaim is used to clone a volume snapshot, which is a prebuilt m2 repository. A PVC object needs to be created before creating the Pod object, then deleted after the pod finishes.

Using kubernetes-plugin, it seems that the yaml attribute in the declarative pipeline only supports Pod objects. Before I go off and try to figure out how to script the creation of a PVC object before launching the Pod, I wanted to ask if there is a mechanism in this plugin that would help manage a PVC lifecycle...and I'm just not seeing it. 

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/75ceecc2-1223-4398-a04c-882ccb230f97%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: kubernetes-plugin and PersistentVolumeClaims

Scott Grissom
kubernetes-cd is certainly possible, though I haven't figured out how I would use in in a declarative pipeline in conjunction with the kubernetes-plugin yet. But overall it's a less than ideal solution for my use case:
- Cannot use the existing configuration with kubernetes-plugin
- Have to install kubectl on some non-kube node.

I was hoping to find a natural way to integrate creation of PVC before agent launch into kubernetes-plugin but I'm not seeing a clean way to accomplish it.


On Monday, January 13, 2020 at 8:48:00 PM UTC-6, Usov Dmitri wrote:
<a href="https://github.com/jenkinsci/kubernetes-cd-plugin" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fkubernetes-cd-plugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGt_PcYoFkumAhC1mVcAsH0wWCEuQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fkubernetes-cd-plugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGt_PcYoFkumAhC1mVcAsH0wWCEuQ&#39;;return true;">https://github.com/jenkinsci/kubernetes-cd-plugin

kubernetes-cd plugin has the capability to create a pvc, the recent plugin version has got fixed an issue with subsequent invocation of a yaml that creates/updates a pvc.

Regards,
Dmitri

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a6a460e4-2393-4c80-8003-cda1d6353e12%40googlegroups.com.