Skip to content

Commit d712d49

Browse files
Add VolumeSnapshotClass documentation for PVC snapshot support (#454)
Add documentation for configuring VolumeSnapshotClass alongside StorageClass. This enables cost optimization by allowing the runtime-api to snapshot paused runtime PVCs instead of keeping them active. Includes examples for both AWS EKS and GKE. Co-authored-by: openhands <openhands@all-hands.dev>
1 parent c5c15d6 commit d712d49

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

charts/openhands/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,44 @@ volumeBindingMode: WaitForFirstConsumer
539539
EOF
540540
```
541541

542+
### VolumeSnapshotClass Configuration (Optional)
543+
544+
To enable PVC snapshots for cost optimization (snapshotting paused runtime PVCs instead of keeping them active), you need to create a VolumeSnapshotClass. This is optional but recommended for production deployments to reduce storage costs.
545+
546+
```bash
547+
# For AWS EKS
548+
kubectl apply -f - <<EOF
549+
apiVersion: snapshot.storage.k8s.io/v1
550+
kind: VolumeSnapshotClass
551+
metadata:
552+
name: ebs-snapshot-class
553+
driver: ebs.csi.aws.com
554+
deletionPolicy: Delete
555+
EOF
556+
557+
# For GKE
558+
kubectl apply -f - <<EOF
559+
apiVersion: snapshot.storage.k8s.io/v1
560+
kind: VolumeSnapshotClass
561+
metadata:
562+
name: pd-snapshot-class
563+
driver: pd.csi.storage.gke.io
564+
deletionPolicy: Delete
565+
parameters:
566+
storage-locations: us-central1 # Replace with your cluster's region
567+
EOF
568+
```
569+
570+
Then configure the runtime-api to use the snapshot class:
571+
572+
```yaml
573+
runtime-api:
574+
env:
575+
VOLUME_SNAPSHOT_CLASS: "pd-snapshot-class" # or "ebs-snapshot-class" for AWS
576+
```
577+
578+
> **Note:** The VolumeSnapshot CRDs must be installed in your cluster. Most managed Kubernetes services (GKE, EKS) include these by default. If not, see the [Kubernetes VolumeSnapshot documentation](https://kubernetes.io/docs/concepts/storage/volume-snapshots/).
579+
542580
## Upgrading
543581

544582
To upgrade the chart:

0 commit comments

Comments
 (0)