ankra-cloud-csi

by Ankra

Helm chartv0.3.2App v0.3.2Apache-2.0Verified publisher

CSI driver csi.ankra.cloud for Ankra Cloud block storage (dynamic volumes per tier, snapshots, clones, online expansion).

About this chart

ankra-cloud-csi

The Kubernetes CSI driver csi.ankra.cloud for Ankra Cloud block storage. Clusters running on Ankra Cloud servers get persistent volumes backed by Ankra Cloud storages: dynamic provisioning per storage tier, hot-plug attach and detach, online expansion, snapshots, restore from a snapshot and clones. The driver talks only to the public Ankra Cloud API, with a customer API token.

The driver is in preview. Full documentation: https://cloud.ankra.app/docs/kubernetes-csi.

Source of truth: github.com/ankraio/ankra-cloud-csi (charts/ankra-cloud-csi). This directory is a copy made for each release; change the chart there, not here.

Install

helm repo add ankra https://ankraio.github.io/ankra-charts
helm repo update
helm install ankra-cloud-csi ankra/ankra-cloud-csi -n kube-system --set api.token=<token>

<token> is an Ankra Cloud API token whose user can operate storages (Settings → API tokens in the console). For production, keep the token out of Helm values and point the chart at a Secret you manage:

kubectl -n kube-system create secret generic ankra-cloud-csi-api --from-literal=token=<token>
helm install ankra-cloud-csi ankra/ankra-cloud-csi -n kube-system --set api.existingSecret=ankra-cloud-csi-api

The chart is also published as an OCI artifact:

helm install ankra-cloud-csi oci://share.ankra.cloud/charts/ankra-cloud-csi --version 0.3.2 -n kube-system \
  --set api.existingSecret=ankra-cloud-csi-api

Or apply the rendered manifests (create the Secret above first):

kubectl apply -f https://raw.githubusercontent.com/ankraio/ankra-cloud-csi/main/deploy/ankra-cloud-csi.yaml
# Needs the snapshot CRDs and snapshot-controller (github.com/kubernetes-csi/external-snapshotter):
kubectl apply -f https://raw.githubusercontent.com/ankraio/ankra-cloud-csi/main/deploy/volumesnapshotclass.yaml

Then claim a volume:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: data
spec:
  accessModes: ["ReadWriteOnce"]
  storageClassName: ankra-default
  resources:
    requests:
      storage: 10Gi

Storage capacity

With capacity.enabled (the default) the controller publishes a CSIStorageCapacity for every node and StorageClass, and the scheduler binds a WaitForFirstConsumer claim only to a node whose capacity fits it. For local-nvme (and ankra-default in a zone whose default tier is local-nvme) it is what the Ankra Local pool of the node's compute node still takes, by the same rule that refuses a volume with 409 the node's Ankra Local pool takes no new volumes. Other tiers report the largest volume the API takes. Several servers can share one compute node's pool and each reports the whole room, so a burst of claims can still overrun it; the API then refuses the extra volume and the claim is retried. See the source README for the details.

Values

ValueDefaultDescription
api.urlhttps://cloud.ankra.appThe Ankra Cloud API's base URL.
api.existingSecret""A Secret holding the API token. The chart creates one from api.token when empty.
api.existingSecretKeytokenThe key of the token in the Secret.
api.token""An API token. Prefer api.existingSecret.
api.caBundle.existingSecret""A Secret with a PEM CA bundle for a privately signed API certificate.
api.caBundle.keyca.crtThe key of the bundle in that Secret.
defaultZone""Zone of volumes created without a topology; empty reads the controller's own zone.
image.repositoryshare.ankra.cloud/library/ankra-cloud-csiThe driver image (linux/amd64, linux/arm64).
image.tagthe chart's appVersionAn immutable tag: v<semver> or sha-<commit>.
image.pullPolicyIfNotPresent
imagePullSecrets[]
sidecars.*.imagepinnedThe Kubernetes CSI sidecars. Upgrade them together with the chart.
controller.replicas1
controller.operationTimeout5mHow long one CSI call waits for an API operation.
controller.sidecarTimeout6mThe sidecars' per-call timeout; above operationTimeout so the driver answers first.
controller.resources, .nodeSelector, .tolerations, .affinity, .priorityClassNamesee values.yamlScheduling of the controller.
capacity.enabledtrueStorage capacity tracking: the CSIDriver's storageCapacity and external-provisioner's --enable-capacity.
capacity.pollInterval30sHow often external-provisioner asks the driver for every node's capacity again.
capacity.cacheTTL10sHow long one API read of a node's capacity answers its StorageClasses; keep it below pollInterval.
node.kubeletDir/var/lib/kubeletThe kubelet's root directory.
node.maxVolumesPerNode15Volumes one server can attach: 16 storage devices less its boot storage.
node.resources, .nodeSelector, .tolerations, .priorityClassNamesee values.yamlScheduling of the node plugin.
storageClassesankra-default (zone default tier, default class) and the four tiersname, tier and default per StorageClass.
storageClassDefaults.reclaimPolicyDelete
storageClassDefaults.allowVolumeExpansiontrue
storageClassDefaults.fsTypeext4ext4 or xfs.
volumeSnapshotClass.enabledtrueRendered only when the snapshot API is served.
volumeSnapshotClass.nameankra-snapshots
volumeSnapshotClass.defaulttrue
volumeSnapshotClass.deletionPolicyDelete

The binary reads these environment variables, which the chart sets:

Variable
ANKRA_CLOUD_API_URLThe API's base URL. Required.
ANKRA_CLOUD_TOKENAn API token that may operate storages. Required.
ANKRA_CLOUD_CA_BUNDLEA PEM file of extra roots. Optional.
ANKRA_CLOUD_ZONEThe controller's default zone (--default-zone). Optional.
ANKRA_CLOUD_SERVER_IDSkips the metadata service on the node (--server-id). Optional.

Links

Deploy ankra-cloud-csi with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ankra-cloud-csi 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 chartankra-cloud-csi is pinned at v0.3.2 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