Package org.cdk8s.plus24.k8s
Class CsiPersistentVolumeSource.Builder
- java.lang.Object
-
- org.cdk8s.plus24.k8s.CsiPersistentVolumeSource.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<CsiPersistentVolumeSource>
- Enclosing interface:
- CsiPersistentVolumeSource
@Stability(Stable) public static final class CsiPersistentVolumeSource.Builder extends Object implements software.amazon.jsii.Builder<CsiPersistentVolumeSource>
A builder forCsiPersistentVolumeSource
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
driver
@Stability(Stable) public CsiPersistentVolumeSource.Builder driver(String driver)
Sets the value ofCsiPersistentVolumeSource.getDriver()
- Parameters:
driver
- driver is the name of the driver to use for this volume. This parameter is required. Required.- Returns:
this
-
volumeHandle
@Stability(Stable) public CsiPersistentVolumeSource.Builder volumeHandle(String volumeHandle)
Sets the value ofCsiPersistentVolumeSource.getVolumeHandle()
- Parameters:
volumeHandle
- volumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. This parameter is required. Required.- Returns:
this
-
controllerExpandSecretRef
@Stability(Stable) public CsiPersistentVolumeSource.Builder controllerExpandSecretRef(SecretReference controllerExpandSecretRef)
Sets the value ofCsiPersistentVolumeSource.getControllerExpandSecretRef()
- Parameters:
controllerExpandSecretRef
- controllerExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. This is an alpha field and requires enabling ExpandCSIVolumes feature gate. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.- Returns:
this
-
controllerPublishSecretRef
@Stability(Stable) public CsiPersistentVolumeSource.Builder controllerPublishSecretRef(SecretReference controllerPublishSecretRef)
Sets the value ofCsiPersistentVolumeSource.getControllerPublishSecretRef()
- Parameters:
controllerPublishSecretRef
- controllerPublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.- Returns:
this
-
fsType
@Stability(Stable) public CsiPersistentVolumeSource.Builder fsType(String fsType)
Sets the value ofCsiPersistentVolumeSource.getFsType()
- Parameters:
fsType
- fsType to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs".- Returns:
this
-
nodePublishSecretRef
@Stability(Stable) public CsiPersistentVolumeSource.Builder nodePublishSecretRef(SecretReference nodePublishSecretRef)
Sets the value ofCsiPersistentVolumeSource.getNodePublishSecretRef()
- Parameters:
nodePublishSecretRef
- nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.- Returns:
this
-
nodeStageSecretRef
@Stability(Stable) public CsiPersistentVolumeSource.Builder nodeStageSecretRef(SecretReference nodeStageSecretRef)
Sets the value ofCsiPersistentVolumeSource.getNodeStageSecretRef()
- Parameters:
nodeStageSecretRef
- nodeStageSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.- Returns:
this
-
readOnly
@Stability(Stable) public CsiPersistentVolumeSource.Builder readOnly(Boolean readOnly)
Sets the value ofCsiPersistentVolumeSource.getReadOnly()
- Parameters:
readOnly
- readOnly value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).- Returns:
this
-
volumeAttributes
@Stability(Stable) public CsiPersistentVolumeSource.Builder volumeAttributes(Map<String,String> volumeAttributes)
Sets the value ofCsiPersistentVolumeSource.getVolumeAttributes()
- Parameters:
volumeAttributes
- volumeAttributes of the volume to publish.- Returns:
this
-
build
@Stability(Stable) public CsiPersistentVolumeSource build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CsiPersistentVolumeSource>
- Returns:
- a new instance of
CsiPersistentVolumeSource
- Throws:
NullPointerException
- if any required attribute was not provided
-
-