Add an option to mount volumes in read-only mode

Change-Id: I2b879fa3d10e25c51c8aab8dfc2e11560f5c89f8
This commit is contained in:
Proskurin Kirill 2016-07-28 14:24:22 +02:00
parent adfba243e7
commit ea3f17bfec
2 changed files with 4 additions and 1 deletions

View File

@ -145,6 +145,8 @@ Parameters description
+------------+-------------------------------------------+----------+-----------------------+---------+
| mount-path | Mount path in container | false | string | path |
+------------+-------------------------------------------+----------+-----------------------+---------+
| readOnly | Mount mode of the volume | false | bool | False |
+------------+-------------------------------------------+----------+-----------------------+---------+
.. _command:

View File

@ -69,7 +69,8 @@ def serialize_volume_mounts(container):
for v in container.get("volumes", ()):
spec.append({
"name": v["name"],
"mountPath": v.get("mount-path", v["path"])
"mountPath": v.get("mount-path", v["path"]),
"readOnly": v.get("readOnly", False)
})
return spec