calrissian icon indicating copy to clipboard operation
calrissian copied to clipboard

Allow setting the container when the pod has more than one container

Open fabricebrito opened this issue 1 year ago • 2 comments

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

fabricebrito avatar May 17 '23 11:05 fabricebrito