Enum MountPropagation
- java.lang.Object
-
- java.lang.Enum<MountPropagation>
-
- org.cdk8s.plus24.MountPropagation
-
- All Implemented Interfaces:
Serializable
,Comparable<MountPropagation>
@Generated(value="jsii-pacmak/1.72.0 (build 4b8828b)", date="2022-12-22T02:29:49.554Z") @Stability(Stable) public enum MountPropagation extends Enum<MountPropagation>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BIDIRECTIONAL
This volume mount behaves the same the HostToContainer mount.HOST_TO_CONTAINER
This volume mount will receive all subsequent mounts that are mounted to this volume or any of its subdirectories.NONE
This volume mount will not receive any subsequent mounts that are mounted to this volume or any of its subdirectories by the host.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MountPropagation
valueOf(String name)
Returns the enum constant of this type with the specified name.static MountPropagation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
@Stability(Stable) public static final MountPropagation NONE
This volume mount will not receive any subsequent mounts that are mounted to this volume or any of its subdirectories by the host.In similar fashion, no mounts created by the Container will be visible on the host.
This is the default mode.
This mode is equal to
private
mount propagation as described in the Linux kernel documentation
-
HOST_TO_CONTAINER
@Stability(Stable) public static final MountPropagation HOST_TO_CONTAINER
This volume mount will receive all subsequent mounts that are mounted to this volume or any of its subdirectories.In other words, if the host mounts anything inside the volume mount, the Container will see it mounted there.
Similarly, if any Pod with Bidirectional mount propagation to the same volume mounts anything there, the Container with HostToContainer mount propagation will see it.
This mode is equal to
rslave
mount propagation as described in the Linux kernel documentation
-
BIDIRECTIONAL
@Stability(Stable) public static final MountPropagation BIDIRECTIONAL
This volume mount behaves the same the HostToContainer mount.In addition, all volume mounts created by the Container will be propagated back to the host and to all Containers of all Pods that use the same volume
A typical use case for this mode is a Pod with a FlexVolume or CSI driver or a Pod that needs to mount something on the host using a hostPath volume.
This mode is equal to
rshared
mount propagation as described in the Linux kernel documentationCaution: Bidirectional mount propagation can be dangerous. It can damage the host operating system and therefore it is allowed only in privileged Containers. Familiarity with Linux kernel behavior is strongly recommended. In addition, any volume mounts created by Containers in Pods must be destroyed (unmounted) by the Containers on termination.
-
-
Method Detail
-
values
public static MountPropagation[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MountPropagation c : MountPropagation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MountPropagation valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-