diff options
Diffstat (limited to 'k8s/k8sclient/k8sclient.py')
-rw-r--r-- | k8s/k8sclient/k8sclient.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/k8s/k8sclient/k8sclient.py b/k8s/k8sclient/k8sclient.py index ee4250d..3a02efd 100644 --- a/k8s/k8sclient/k8sclient.py +++ b/k8s/k8sclient/k8sclient.py @@ -267,7 +267,7 @@ def _parse_volumes(volume_list): vname = str(uuid.uuid4()) vhost = v['host']['path'] vcontainer = v['container']['bind'] - vro = (v['container']['mode'] == 'ro') + vro = (v['container'].get('mode') == 'ro') volumes.append(client.V1Volume(name=vname, host_path=client.V1HostPathVolumeSource(path=vhost))) volume_mounts.append(client.V1VolumeMount(name=vname, mount_path=vcontainer, read_only=vro)) |