Configure your PV autoscaling workload

Configure your PV autoscaling workload

This section describes how to configure your workload in PV autoscaling.

To configure workloads, edit the workload YAML file.

Configure the storage class

To initiate your workload Pods for PV autoscaling, you need to configure the storage class.

You can use the default, Zesty Disk storage class or define a custom storage class. To change from a previously-defined Zesty Disk storage class, follow the instructions for a custom storage class.

Zesty Disk storage class
Custom storage class

Configure the default, Zesty Disk storage class

To use the Zesty Disk class, change the storage class setting to zesty-sc.

Also, for increased utilization, consider changing the initial PVC size.

Example:

....

volumeClaimTemplates:

- metadata:

name: democlaim

spec:

accessModes: [ "ReadWriteOnce" ]

storageClassName: "zesty-sc"

resources:

requests:

storage: 25Gi

...

Configure a custom storage class

To use a custom class, or to change from the storage class that was set during installation, use an annotation with the name of the custom storage class.

Example:

....

volumeClaimTemplates:

- metadata:
        name: democlaim
        annotations:
          disk.zesty.co/storageClassName: "io1-sc"
      spec:
        accessModes: [ "ReadWriteOnce" ]
        storageClassName: "zesty-sc"
        resources:
          requests:
            storage: 25Gi
....

Configure workload policy

Once the Zesty Disk storage class is configured, you can set policies to control how PV autoscaling will work. The current supported policies are:

Example:

....

volumeClaimTemplates:

- metadata:

name: democlaim

spec:

accessModes: [ "ReadWriteOnce" ]

storageClassName: "zesty-sc"

resources:

requests:

storage: 10Gi

buffer: 40Gi

limits:

storage: 500Gi

...