Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Sim <ivan.sim@kasten.io>
  • Loading branch information
ihcsim committed Mar 14, 2022
1 parent 6f76d7a commit 8892549
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
80 changes: 80 additions & 0 deletions docs/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1332,6 +1332,58 @@ Example:
snapshotClass: do-block-storage
CreateCSISnapshotStatic
-----------------------

This function creates a pair of CSI VolumeSnapshot and VolumeSnapshotContent.
It is commonly used to pre-provision snapshot volume and snapshot volume content
resources as described in the Kubernetes `documentation
<https://kubernetes.io/docs/concepts/storage/volume-snapshots/#static>`_.

The deletion behavior is defined by the ``deletionPolicy`` property (``Retain``,
``Delete``) of the snapshot class.

Arguments:

.. csv-table::
:header: "Argument", "Required", "Type", "Description"
:align: left
:widths: 5,5,5,15

`name`, Yes, `string`, name of the new VolumeSnapshot
`namespace`, Yes, `string`, namespace of the new VolumeSnapshot
`driver`, Yes, `string`, name of the CSI driver for the new VolumeSnapshotContent
`handle`, Yes, `string`, unique identifier of the volume created on the storage backend used as the source of the new VolumeSnapshotContent
`snapshotClass`, Yes, `string`, name of the VolumeSnapshotClass to use

Outputs:

.. csv-table::
:header: "Output", "Type", "Description"
:align: left
:widths: 5,5,15

`name`,`string`, name of the new VolumeSnapshot
`namespace`, string, namespace of the new VolumeSnapshot
`restoreSize`, string, required memory size to restore the volume
`snapshotContent`, string, name of the new VolumeSnapshotContent

Example:

.. code-block:: yaml
:linenos:
actions:
createVSC:
phases:
- func: CreateCSISnapshotStatic
name: createCSISnapshotStatic
args:
name: volume-snapshot
namespace: namespace
snapshotClass: csi-hostpath-snapclass
driver: 7bdd0de3-aaeb-11e8-9aae-0242ac110002
RestoreCSISnapshot
------------------

Expand Down Expand Up @@ -1412,6 +1464,34 @@ Example:
name: "{{ .ArtifactsIn.snapshotInfo.KeyValue.name }}"
namespace: "{{ .ArtifactsIn.snapshotInfo.KeyValue.namespace }}"
DeleteCSISnapshotContent
------------------------

This function deletes a VolumeSnapshotContent resource. Only unbounded
VolumeSnapshotContent can be deleted using this function.

Arguments:

.. csv-table::
:header: "Argument", "Required", "Type", "Description"
:align: left
:widths: 5,5,5,15

`name`, Yes, `string`, name of the VolumeSnapshot

Example:

.. code-block:: yaml
:linenos:
actions:
deleteVSC:
phases:
- func: DeleteCSISnapshotContent
name: deleteCSISnapshotContent
args:
name: "test-snapshot-content-content-dfc8fa67-8b11-4fdf-bf94-928589c2eed8"
Registering Functions
---------------------
Expand Down
2 changes: 2 additions & 0 deletions docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
actionset
args
aws
backend
backupIdentifier
backupID
backupInfo
Expand Down Expand Up @@ -29,6 +30,7 @@ param
params
PersistentVolumeClaim
pluggable
pre
prepopulated
Quickstart
repo
Expand Down

0 comments on commit 8892549

Please sign in to comment.