@Generated(value="jsii-pacmak/1.34.0 (build 9b72778)", date="2021-09-24T22:49:58.420Z") @Stability(value=Stable) public enum MountPropagation extends Enum<MountPropagation>
| Enum Constant and 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.
|
| Modifier and Type | Method and 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.
|
@Stability(value=Stable) public static final MountPropagation NONE
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
@Stability(value=Stable) public static final MountPropagation HOST_TO_CONTAINER
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
@Stability(value=Stable) public static final MountPropagation BIDIRECTIONAL
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 documentation
Caution: 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.
public static MountPropagation[] values()
for (MountPropagation c : MountPropagation.values()) System.out.println(c);
public static MountPropagation valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2021. All rights reserved.