Skip to content

StorageClass

Bases: DuploTenantResourceV3

DuploStorageClass is a resource that represents a Kubernetes StorageClass.

See
- https://docs.duplocloud.com/docs/overview/aws-services/storage/adding-k8s-storage-class

apply

Apply a service.

create

Create a StorageClass resource.

CLI Usage

duploctl storageclass create -f 'storageclass.yaml'
Contents of the storageclass.yaml file
provisioner: efs.csi.aws.com
reclaimPolicy: Delete
volumeBindingMode: Immediate
name: test1
allowVolumeExpansion: true

One liner example
echo """
provisioner: efs.csi.aws.com
reclaimPolicy: Delete
volumeBindingMode: Immediate
name: test1
allowVolumeExpansion: true
""" | duploctl storageclass create -f -

Parameters:

Name Type Description Default
body BODY

The resource to create.

required
wait WAIT

Wait for the resource to be created.

False
wait_check callable

A callable function to check if the resource

None

Returns:

Name Type Description
message dict

Success message.

Raises:

Type Description
DuploError

If the resource could not be created.

delete

Delete a StorageClass resource by name.

cli usage
duploctl storageclass delete <name>

Parameters:

Name Type Description Default
name NAME

The name of the StorageClass resource to delete.

required

Returns:

Name Type Description
message dict

A success message.

Raises:

Type Description
DuploError

If the {{kind}} resource could not be found or deleted.

find

Find StorageClass resources by name.

cli usage
duploctl storageclass find <name>

Parameters:

Name Type Description Default
name NAME

The name of the StorageClass resource to find.

required

Returns:

Name Type Description
resource dict

The StorageClass object.

Raises:

Type Description
DuploError

If the {{kind}} could not be found.

list

Retrieve a List of StorageClass resources

cli usage
duploctl storageclass list

Returns:

Name Type Description
list list

A list of StorageClass.

update

Update a V3 resource by name.

Parameters:

Name Type Description Default
body str

The resource to update.

required

Returns: Success message. Raises: DuploError: If the resource could not be created.