aws-storageclass

by somaz94

Helm chartv0.1.0App 1.0.0Apache-2.0Verified publisher

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

ResourceAPICreated from
StorageClassstorage.k8s.io/v1storageClasses[] (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:

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

KeyTypeDefaultDescription
commonLabelsmap{}Labels added to every StorageClass.
commonAnnotationsmap{}Annotations added to every StorageClass.
storageClasseslist[]StorageClass definitions (see below). Empty = no-op install.

storageClasses[] entry

FieldTypeRequiredDescription
enabledboolno (default true)Render this class. Set false to keep the definition but skip it.
namestringyesStorageClass name.
provisionerstringyesCSI provisioner (ebs.csi.aws.com / efs.csi.aws.com).
isDefaultboolnoAdds storageclass.kubernetes.io/is-default-class: "true". Only one class per cluster should be default.
parametersmapnoCSI parameters (string:string). EBS: type, encrypted, iops, throughput, kmsKeyId. EFS: provisioningMode, fileSystemId, directoryPerms.
volumeBindingModestringnoImmediate or WaitForFirstConsumer.
reclaimPolicystringnoRetain or Delete.
allowVolumeExpansionboolnoAllow online volume resize (EBS).
mountOptionslistnoMount options (common for EFS: tls).
allowedTopologieslistnoRestrict provisioning to zones/topologies.
labelsmapnoExtra labels on this StorageClass.
annotationsmapnoExtra annotations on this StorageClass.
parametersExtramapnoExtra 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartaws-storageclass is pinned at v0.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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