Adds the possibility to mount an existing volume
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).
I don't think it can work this way. In any case, it should be already doable using the yaml field.
I don't think it can work this way. In any case, it should be already doable using the
yamlfield.
Is the only way to mount a volume in pod A into pod B is through the YAML field?
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?