aws-storageclass
by somaz94
Data-driven AWS StorageClasses — EBS (gp3/gp2/io2/...) and EFS — rendered from a list of per-entry-toggleable inputs. One release manages any number of StorageClasses for an EKS cluster; the AWS EBS/EFS CSI drivers themselves are installed separately.
About this chart
aws-storageclass
Data-driven AWS StorageClasses — EBS and EFS — rendered as a Helm release from a single list of per-entry-toggleable inputs.
EKS ships no default StorageClass, and the AWS EBS/EFS CSI drivers install the provisioners but do not create StorageClass objects — those are left for you to apply out-of-band. This chart closes that gap: declare any number of classes (gp3, gp2, io2, EFS, ...) in one list, toggle each with enabled, and manage them declaratively in Git with the same helm / helmfile flow as the rest of the platform.
What it deploys
| Resource | API | Created from |
|---|---|---|
StorageClass | storage.k8s.io/v1 | storageClasses[] (one per enabled entry) |
storageClasses defaults to empty, so an unconfigured helm install creates nothing. StorageClass is cluster-scoped — the release namespace is used only for Helm bookkeeping.
Prerequisites
- Kubernetes >= 1.25
- The matching AWS CSI driver installed for each provisioner you use:
- EBS classes (
ebs.csi.aws.com) → aws-ebs-csi-driver - EFS classes (
efs.csi.aws.com) → aws-efs-csi-driver
- EBS classes (
This chart only creates StorageClass objects; it does not install the CSI drivers.
Install
OCI registry:
helm install storageclasses oci://ghcr.io/somaz94/charts/aws-storageclass \
--namespace kube-system \
-f my-values.yaml
Classic Helm repo:
helm repo add somaz94 https://charts.somaz.blog
helm install storageclasses somaz94/aws-storageclass \
--namespace kube-system \
-f my-values.yaml
Quick examples
A single gp3 encrypted default class
storageClasses:
- name: ebs-sc
provisioner: ebs.csi.aws.com
isDefault: true
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Retain
allowVolumeExpansion: true
parameters:
type: gp3
encrypted: "true"
Multiple EBS tiers + EFS, gp2 kept off
storageClasses:
- enabled: true
name: ebs-sc # gp3, default
provisioner: ebs.csi.aws.com
isDefault: true
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Retain
allowVolumeExpansion: true
parameters:
type: gp3
encrypted: "true"
- enabled: false # defined but not rendered
name: ebs-gp2
provisioner: ebs.csi.aws.com
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Delete
allowVolumeExpansion: true
parameters:
type: gp2
encrypted: "true"
- enabled: true
name: efs-sc
provisioner: efs.csi.aws.com
volumeBindingMode: Immediate
reclaimPolicy: Retain
mountOptions:
- tls
parameters:
provisioningMode: efs-ap
fileSystemId: fs-0123456789abcdef0
directoryPerms: "700"
Zone-restricted io2 (allowedTopologies)
storageClasses:
- name: ebs-io2
provisioner: ebs.csi.aws.com
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Retain
allowVolumeExpansion: true
parameters:
type: io2
iops: "10000"
encrypted: "true"
allowedTopologies:
- matchLabelExpressions:
- key: topology.ebs.csi.aws.com/zone
values:
- eu-central-1a
Values reference
Top level
| Key | Type | Default | Description |
|---|---|---|---|
commonLabels | map | {} | Labels added to every StorageClass. |
commonAnnotations | map | {} | Annotations added to every StorageClass. |
storageClasses | list | [] | StorageClass definitions (see below). Empty = no-op install. |
storageClasses[] entry
| Field | Type | Required | Description |
|---|---|---|---|
enabled | bool | no (default true) | Render this class. Set false to keep the definition but skip it. |
name | string | yes | StorageClass name. |
provisioner | string | yes | CSI provisioner (ebs.csi.aws.com / efs.csi.aws.com). |
isDefault | bool | no | Adds storageclass.kubernetes.io/is-default-class: "true". Only one class per cluster should be default. |
parameters | map | no | CSI parameters (string:string). EBS: type, encrypted, iops, throughput, kmsKeyId. EFS: provisioningMode, fileSystemId, directoryPerms. |
volumeBindingMode | string | no | Immediate or WaitForFirstConsumer. |
reclaimPolicy | string | no | Retain or Delete. |
allowVolumeExpansion | bool | no | Allow online volume resize (EBS). |
mountOptions | list | no | Mount options (common for EFS: tls). |
allowedTopologies | list | no | Restrict provisioning to zones/topologies. |
labels | map | no | Extra labels on this StorageClass. |
annotations | map | no | Extra annotations on this StorageClass. |
parametersExtra | map | no | Extra key/values merged into parameters for unsurfaced CSI fields. |
License
Apache-2.0. See LICENSE.
Deploy aws-storageclass with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has aws-storageclass on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartaws-storageclass is pinned at v0.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply