Package org.cdk8s.plus24.k8s
Class CsiNodeDriver.Builder
- java.lang.Object
-
- org.cdk8s.plus24.k8s.CsiNodeDriver.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<CsiNodeDriver>
- Enclosing interface:
- CsiNodeDriver
@Stability(Stable) public static final class CsiNodeDriver.Builder extends Object implements software.amazon.jsii.Builder<CsiNodeDriver>
A builder forCsiNodeDriver
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CsiNodeDriver.Builder
allocatable(VolumeNodeResources allocatable)
Sets the value ofCsiNodeDriver.getAllocatable()
CsiNodeDriver
build()
Builds the configured instance.CsiNodeDriver.Builder
name(String name)
Sets the value ofCsiNodeDriver.getName()
CsiNodeDriver.Builder
nodeId(String nodeId)
Sets the value ofCsiNodeDriver.getNodeId()
CsiNodeDriver.Builder
topologyKeys(List<String> topologyKeys)
Sets the value ofCsiNodeDriver.getTopologyKeys()
-
-
-
Method Detail
-
name
@Stability(Stable) public CsiNodeDriver.Builder name(String name)
Sets the value ofCsiNodeDriver.getName()
- Parameters:
name
- This is the name of the CSI driver that this object refers to. This parameter is required. This MUST be the same name returned by the CSI GetPluginName() call for that driver.- Returns:
this
-
nodeId
@Stability(Stable) public CsiNodeDriver.Builder nodeId(String nodeId)
Sets the value ofCsiNodeDriver.getNodeId()
- Parameters:
nodeId
- nodeID of the node from the driver point of view. This parameter is required. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as "node1", but the storage system may refer to the same node as "nodeA". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. "nodeA" instead of "node1". This field is required.- Returns:
this
-
allocatable
@Stability(Stable) public CsiNodeDriver.Builder allocatable(VolumeNodeResources allocatable)
Sets the value ofCsiNodeDriver.getAllocatable()
- Parameters:
allocatable
- allocatable represents the volume resources of a node that are available for scheduling. This field is beta.- Returns:
this
-
topologyKeys
@Stability(Stable) public CsiNodeDriver.Builder topologyKeys(List<String> topologyKeys)
Sets the value ofCsiNodeDriver.getTopologyKeys()
- Parameters:
topologyKeys
- topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. "company.com/zone", "company.com/region"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology.- Returns:
this
-
build
@Stability(Stable) public CsiNodeDriver build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CsiNodeDriver>
- Returns:
- a new instance of
CsiNodeDriver
- Throws:
NullPointerException
- if any required attribute was not provided
-
-