mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
Merge pull request #22575 from MikaelCluseau/wip-issue-20466
Automatic merge from submit-queue Add subPath to mount a child dir or file of a volumeMount Allow users to specify a subPath in Container.volumeMounts so they can use a single volume for many mounts instead of creating many volumes. For instance, a user can now use a single PersistentVolume to store the Mysql database and the document root of an Apache server of a LAMP stack pod by mapping them to different subPaths in this single volume. Also solves https://github.com/kubernetes/kubernetes/issues/20466.
This commit is contained in:
@@ -2031,6 +2031,10 @@
|
||||
"mountPath": {
|
||||
"type": "string",
|
||||
"description": "Path within the container at which the volume should be mounted. Must not contain ':'."
|
||||
},
|
||||
"subPath": {
|
||||
"type": "string",
|
||||
"description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root)."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2036,6 +2036,10 @@
|
||||
"mountPath": {
|
||||
"type": "string",
|
||||
"description": "Path within the container at which the volume should be mounted. Must not contain ':'."
|
||||
},
|
||||
"subPath": {
|
||||
"type": "string",
|
||||
"description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root)."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -7343,6 +7343,10 @@
|
||||
"mountPath": {
|
||||
"type": "string",
|
||||
"description": "Path within the container at which the volume should be mounted. Must not contain ':'."
|
||||
},
|
||||
"subPath": {
|
||||
"type": "string",
|
||||
"description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root)."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -17330,6 +17330,10 @@
|
||||
"mountPath": {
|
||||
"type": "string",
|
||||
"description": "Path within the container at which the volume should be mounted. Must not contain ':'."
|
||||
},
|
||||
"subPath": {
|
||||
"type": "string",
|
||||
"description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root)."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user