Package org.cdk8s.plus24
Class EmptyDirVolumeOptions.Builder
- java.lang.Object
-
- org.cdk8s.plus24.EmptyDirVolumeOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<EmptyDirVolumeOptions>
- Enclosing interface:
- EmptyDirVolumeOptions
@Stability(Stable) public static final class EmptyDirVolumeOptions.Builder extends Object implements software.amazon.jsii.Builder<EmptyDirVolumeOptions>
A builder forEmptyDirVolumeOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EmptyDirVolumeOptions
build()
Builds the configured instance.EmptyDirVolumeOptions.Builder
medium(EmptyDirMedium medium)
Sets the value ofEmptyDirVolumeOptions.getMedium()
EmptyDirVolumeOptions.Builder
sizeLimit(org.cdk8s.Size sizeLimit)
Sets the value ofEmptyDirVolumeOptions.getSizeLimit()
-
-
-
Method Detail
-
medium
@Stability(Stable) public EmptyDirVolumeOptions.Builder medium(EmptyDirMedium medium)
Sets the value ofEmptyDirVolumeOptions.getMedium()
- Parameters:
medium
- By default, emptyDir volumes are stored on whatever medium is backing the node - that might be disk or SSD or network storage, depending on your environment. However, you can set the emptyDir.medium field toEmptyDirMedium.MEMORY
to tell Kubernetes to mount a tmpfs (RAM-backed filesystem) for you instead. While tmpfs is very fast, be aware that unlike disks, tmpfs is cleared on node reboot and any files you write will count against your Container's memory limit.- Returns:
this
-
sizeLimit
@Stability(Stable) public EmptyDirVolumeOptions.Builder sizeLimit(org.cdk8s.Size sizeLimit)
Sets the value ofEmptyDirVolumeOptions.getSizeLimit()
- Parameters:
sizeLimit
- Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod.- Returns:
this
-
build
@Stability(Stable) public EmptyDirVolumeOptions build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<EmptyDirVolumeOptions>
- Returns:
- a new instance of
EmptyDirVolumeOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-
-