calrissian
calrissian copied to clipboard
Allow setting the container when the pod has more than one container
The env variable CALRISSIAN_POD_NAME
allow discovering the volumes to mount on the spawned pods.
This is implemented in class KubernetesPodVolumeInspector
on the assumption that there's a single container in that pod
python
def get_first_container(self):
return self.pod.spec.containers[0]
When having more containers in the calrissian pod, this implementation breaks.
The proposed evolution in this issue is to allow defining the container name via env variable and get the container by name if that variable is set