Skip to content

Commit

Permalink
Merge pull request #2 from lablabs/add-storage-class
Browse files Browse the repository at this point in the history
feat: add StorageClasses creation
  • Loading branch information
dojci authored Sep 12, 2022
2 parents bc5ad79 + 8a4f840 commit b5c05b7
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ No modules.
| <a name="input_service_account_create"></a> [service\_account\_create](#input\_service\_account\_create) | Whether to create Service Account | `bool` | `true` | no |
| <a name="input_service_account_name"></a> [service\_account\_name](#input\_service\_account\_name) | The k8s EBS CSI driver service account name | `string` | `"aws-ebs-csi-driver"` | no |
| <a name="input_settings"></a> [settings](#input\_settings) | Additional helm sets which will be passed to the Helm chart values, see https://github.com/kubernetes-sigs/aws-ebs-csi-driver/tree/master/charts/aws-ebs-csi-driver | `map(any)` | `{}` | no |
| <a name="input_storage_classes"></a> [storage\_classes](#input\_storage\_classes) | List of the custom Storage Classes definitions | `list` | <pre>[<br> {<br> "allowVolumeExpansion": true,<br> "annotations": {<br> "storageclass.kubernetes.io/is-default-class": "true"<br> },<br> "name": "ebs-csi-gp3",<br> "parameters": {<br> "encrypted": "true",<br> "type": "gp3"<br> },<br> "reclaimPolicy": "Delete",<br> "volumeBindingMode": "WaitForFirstConsumer"<br> }<br>]</pre> | no |
| <a name="input_storage_classes_create"></a> [storage\_classes\_create](#input\_storage\_classes\_create) | Whether to create Storage Classes | `bool` | `true` | no |
| <a name="input_values"></a> [values](#input\_values) | Additional yaml encoded values which will be passed to the Helm chart, see https://github.com/kubernetes-sigs/aws-ebs-csi-driver/tree/master/charts/aws-ebs-csi-driver | `string` | `""` | no |

## Outputs
Expand Down
1 change: 1 addition & 0 deletions values.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ locals {
}
}
}
"storageClasses" : var.storage_classes_create ? var.storage_classes : []
})
}

Expand Down
25 changes: 25 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,31 @@ variable "irsa_tags" {
description = "IRSA resources tags"
}

variable "storage_classes_create" {
type = bool
default = true
description = "Whether to create Storage Classes"
}

variable "storage_classes" {
default = [
{
"name" : "ebs-csi-gp3"
"annotations" : {
"storageclass.kubernetes.io/is-default-class" : "true"
}
"allowVolumeExpansion" : true
"volumeBindingMode" : "WaitForFirstConsumer"
"reclaimPolicy" : "Delete"
"parameters" : {
"type" : "gp3"
"encrypted" : "true"
}
}
]
description = "List of the custom Storage Classes definitions"
}

variable "argo_namespace" {
type = string
default = "argo"
Expand Down

0 comments on commit b5c05b7

Please sign in to comment.