Share via


VolumeMountV1 Class

Definition

Represents a volume mount configuration in a Kubernetes container.

[YamlDotNet.Serialization.YamlSerializable]
public sealed class VolumeMountV1
[<YamlDotNet.Serialization.YamlSerializable>]
type VolumeMountV1 = class
Public NotInheritable Class VolumeMountV1
Inheritance
VolumeMountV1
Attributes
YamlDotNet.Serialization.YamlSerializableAttribute

Remarks

This class is used to specify how a volume is mounted into a container, including the path within the container, any sub-paths, mount propagation settings, and read-only configurations.

Constructors

VolumeMountV1()

Properties

MountPath

Gets or sets the path within the container at which the volume will be mounted.

MountPropagation

Specifies the mount propagation behavior for the volume mount. Defines how mounts are propagated from the host to the container and vice versa. This property is typically used to control sharing of volumes between containers and impacts the way the volume is mounted in the container environment. Can be set to specific propagation modes such as "HostToContainer", "Bidirectional", or left null for default behavior.

Name

Gets or sets the name of the volume mount. This property specifies the identifier for the volume to be mounted, which is used to reference it within the container.

ReadOnly

Gets or sets a value indicating whether the volume mount is read-only.

RecursiveReadOnly

Gets or sets the recursive read-only mode configuration for the volume mount. This property determines if the volume should be mounted in recursive read-only mode, which enforces read-only access on all subdirectories and files within the volume.

SubPath

Specifies the relative path within the volume from which the container will access data. This property allows you to mount a specific subdirectory of a volume rather than the root directory.

SubPathExpr

Gets or sets the sub-path expression within the volume mount. This property allows dynamic sub-paths to be specified using environment variable substitutions and provides flexibility for configuring paths at runtime.

Applies to