kubernetes-plugin icon indicating copy to clipboard operation
kubernetes-plugin copied to clipboard

Adds the possibility to mount an existing volume

Open kiddouk opened this issue 5 years ago • 3 comments

As an example, when a k8s cluster runs on EKS (and that OIDC is configured properly), each pod that gets started on the cluster (including the jenkins-agents) gets a Projected Volume added automagically (usefull for AWS authentication, but I digress)

This patch adds the possibility of adding a volumeMount just by specifying a volume name (ie: without the template adding the volume definition).

kiddouk avatar Feb 05 '20 10:02 kiddouk

I don't think it can work this way. In any case, it should be already doable using the yaml field.

Vlatombe avatar Feb 07 '20 10:02 Vlatombe

I don't think it can work this way. In any case, it should be already doable using the yaml field.

Is the only way to mount a volume in pod A into pod B is through the YAML field?

EZtheOG avatar Sep 23 '20 15:09 EZtheOG

Coming back on this PR, I fail to understand what is the use case.

The current pod template model in the plugin defines volumes which get mounted in all containers. If you want something more specific, use the yaml field and you have pretty much full control on the resulting spec.

The example about EKS IAM service account doesn't seem to apply here: the admission controller injects both volume and volume mount. Why would you need to declare an additional volume mount?

Vlatombe avatar Dec 23 '20 09:12 Vlatombe