Add an option to mount volumes in read-only mode
Change-Id: I2b879fa3d10e25c51c8aab8dfc2e11560f5c89f8
This commit is contained in:
parent
adfba243e7
commit
ea3f17bfec
|
@ -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:
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue