CRI: clarify mount host_path docs

Mention that the `host_path` can be empty if image volumes are being
used.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
This commit is contained in:
Sascha Grunert 2024-10-08 11:13:01 +02:00
parent 0b91def6bc
commit ce9351c824
No known key found for this signature in database
GPG Key ID: 09D97D153EF94D93
2 changed files with 8 additions and 4 deletions

View File

@ -627,8 +627,10 @@ func (m *PortMapping) GetHostIp() string {
type Mount struct {
// Path of the mount within the container.
ContainerPath string `protobuf:"bytes,1,opt,name=container_path,json=containerPath,proto3" json:"container_path,omitempty"`
// Path of the mount on the host. If the hostPath doesn't exist, then runtimes
// should report error. If the hostpath is a symbolic link, runtimes should
// Path of the mount on the host. Has to be empty if the image field below
// is provided, because those fields are mutually exclusive. If the image
// field below is nil and the host path doesn't exist, then runtimes should
// report an error. If the hostpath is a symbolic link, runtimes should
// follow the symlink and mount the real destination to container.
HostPath string `protobuf:"bytes,2,opt,name=host_path,json=hostPath,proto3" json:"host_path,omitempty"`
// If set, the mount is read-only.

View File

@ -221,8 +221,10 @@ enum MountPropagation {
message Mount {
// Path of the mount within the container.
string container_path = 1;
// Path of the mount on the host. If the hostPath doesn't exist, then runtimes
// should report error. If the hostpath is a symbolic link, runtimes should
// Path of the mount on the host. Has to be empty if the image field below
// is provided, because those fields are mutually exclusive. If the image
// field below is nil and the host path doesn't exist, then runtimes should
// report an error. If the hostpath is a symbolic link, runtimes should
// follow the symlink and mount the real destination to container.
string host_path = 2;
// If set, the mount is read-only.