diff options
author | Jason Luo <cl4531@att.com> | 2019-03-20 01:04:13 +0000 |
---|---|---|
committer | Jason Luo <cl4531@att.com> | 2019-03-22 13:52:00 +0000 |
commit | 4823b2acc5c61d5e5442364cd0540dd475949e73 (patch) | |
tree | 8467b18fda64283704d95da45242c4c1ab67a8f1 /k8s/k8sclient/k8sclient.py | |
parent | a3f62fa65e34b2dd1130ea8dd647a98e0575a330 (diff) |
add comment on 63 label length, fix _parse_volumes
change to v['container'].get('mode') to allow mode value be absent
Issue-ID: DCAEGEN2-1126
Change-Id: I12fe257995f466238f64b06e6cf80f3cc2654c5b
Signed-off-by: Jason Luo <cl4531@att.com>
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)) |