Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

rook-ceph: Add reclaim_policy #1369

Merged
merged 4 commits into from
Mar 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ci/aws/aws-cluster.lokocfg.envsubst
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,10 @@ component "httpbin" {
certmanager_cluster_issuer = "letsencrypt-staging"
}

component "aws-ebs-csi-driver" {}
component "aws-ebs-csi-driver" {
// Avoid proliferation of unused PVs.
reclaim_policy = "Delete"
}

component "experimental-istio-operator" {
enable_monitoring = true
Expand Down
18 changes: 10 additions & 8 deletions docs/configuration-reference/components/aws-ebs-csi-driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ component "aws-ebs-csi-driver" {
enable_volume_scheduling = true
enable_volume_resizing = true
enable_volume_snapshot = true
reclaim_policy = "Delete"

node_affinity {
key = "kubernetes.io/hostname"
Expand All @@ -53,14 +54,15 @@ component "aws-ebs-csi-driver" {

Table of all the arguments accepted by the component.

| Argument | Description | Default | Type | Required |
|--------------------------------|-------------------------------------------------------------------------------------------------------|---------------------------------------|------------------------------------------------------------------------------------------------------------------|----------|
| `enable_default_storage_class` | Use the storage class provided by the component as the default storage class. | `true` | bool | false |
| `enable_volume_scheduling` | Provision EBS volumes using PersistentVolumeClaim(PVC) dynamically. | `true` | bool | false |
| `enable_volume_resizing` | Expand the volume size after the initial provisioning. | `true` | bool | false |
| `enable_volume_snapshot` | Create Volume snapshots from an existing EBS volume for backup and restore. | `true` | bool | false |
| `node_affinity` | Node affinity for deploying the EBS CSI controller and EBS Snapshot controller pods. | - | `list(object({key = string, operator = string, values = list(string)}))` | false |
| `tolerations` | Tolerations that the EBS CSI Node, EBS CSI controller and EBS Snapshot controller pods will tolerate. | `tolerations { operator = "Exists" }` | `list(object({key = string, effect = string, operator = string, value = string, toleration_seconds = string }))` | false |
| Argument | Description | Default | Type | Required |
|--------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------|------------------------------------------------------------------------------------------------------------------|----------|
| `enable_default_storage_class` | Use the storage class provided by the component as the default storage class. | `true` | bool | false |
| `enable_volume_scheduling` | Provision EBS volumes using PersistentVolumeClaim(PVC) dynamically. | `true` | bool | false |
| `enable_volume_resizing` | Expand the volume size after the initial provisioning. | `true` | bool | false |
| `enable_volume_snapshot` | Create Volume snapshots from an existing EBS volume for backup and restore. | `true` | bool | false |
| `node_affinity` | Node affinity for deploying the EBS CSI controller and EBS Snapshot controller pods. | - | `list(object({key = string, operator = string, values = list(string)}))` | false |
| `tolerations` | Tolerations that the EBS CSI Node, EBS CSI controller and EBS Snapshot controller pods will tolerate. | `tolerations { operator = "Exists" }` | `list(object({key = string, effect = string, operator = string, value = string, toleration_seconds = string }))` | false |
| `reclaim_policy` | Persistent volumes created with the storage class created by this component will have this reclaim policy. This field decides what happens to the volume after a user deletes a PVC. Valid values: `Retain`, `Recycle` and `Delete`. Read more in the [Kubernetes docs](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#reclaiming). | `Retain` | string | false |

## Applying

Expand Down
22 changes: 13 additions & 9 deletions docs/configuration-reference/components/openebs-storage-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@ OpenEBS storage class component configuration example:
component "openebs-storage-class" {
# Optional arguments
storage-class "openebs-replica1" {
replica_count = 1
replica_count = 1
reclaim_policy = "Delete"
}

storage-class "openebs-replica3" {
replica_count = 3
default = true
disks = [
replica_count = 3
default = true
reclaim_policy = "Retain"
disks = [
"blockdevice-0565dd2d566cab012b7bc35e54874d9f",
"blockdevice-17901367ccd9e1ead797a7e233de8cc8",
"blockdevice-1f4315cb4acbb4b0dbf5202adcdb70d8"
Expand All @@ -54,11 +57,12 @@ component "openebs-storage-class" {

Table of all the arguments accepted by the component.

| Argument | Description | Default | Type | Required |
|-----------------|----------------------------------------------------------------------------------------------------------------------------|:-------:|:------------:|:--------:|
| `replica_count` | Defines the number of cStor volume replicas. | 3 | number | false |
| `default` | Indicates whether the storage class is default or not. | false | bool | false |
| `disks` | List of selected unclaimed BlockDevice CRs which are unmounted and do not contain a filesystem in each participating node. | - | list(string) | false |
| Argument | Description | Default | Type | Required |
|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------:|:------------:|:--------:|
| `replica_count` | Defines the number of cStor volume replicas. | 3 | number | false |
| `default` | Indicates whether the storage class is default or not. | false | bool | false |
| `disks` | List of selected unclaimed BlockDevice CRs which are unmounted and do not contain a filesystem in each participating node. | - | list(string) | false |
| `reclaim_policy` | Persistent volumes created with this storage class will have this reclaim policy. This field decides what happens to the volume after a user deletes a PVC. Valid values: `Retain`, `Recycle` and `Delete`. Read more in the [Kubernetes docs](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#reclaiming). | `Retain` | string | false |


## Applying
Expand Down
Loading