Restricting space of persistent storage volume

Hi everyone,

do you know if there is a way to restrict/limit the maximum space used by a volume claim?

e.g. I would like to limit the spaced used by persistent-storage to 32GB.

version: '2'
volumes:
    persistent-storage:
services:
  myapp:
    restart: always
    build: .
    volumes:
      - persistent-storage:/back-end/persistent-storage/

Hi there!
Actually, it’s not possible to restrict your volumes from the persistent-storage. You will have to implement a different strategy.
In case you are working with logs, you could employ some log rotation strategy on an application level. Or similar repeating data where old entries could be purged.