Skip to content

Shrinking a volume in the catalog compose breaks every running deployment of that app: PVC storage cannot be decreased #292

Description

@v0l

Live now. Kieran reduced volume sizes in the catalog compose and every deployment went to error state:

PersistentVolumeClaim "haven-db" is invalid: spec.resources.requests.storage:
Forbidden: field can not be less than status.capacity
reason: Invalid, code: 422

Kubernetes permits PVC expansion only. Because reconcile re-reads the catalog compose every pass, one edit to an app row puts every existing deployment of that app into a permanent 422 loop — the operator cannot walk it back, and the customer sees Error.

The row edit is data and raising the sizes again recovers it. The defect is that nothing stopped the edit. Not an outage: the affected deployments were test apps.

Reject a volume size decrease at app create/update, in the same validation layer as the volumes:/user: rule from #277. Compare each (service, volume name) in the incoming compose against the stored row; a smaller size_bytes is an error, equal or larger is fine. Removed volumes and renames are in scope: both are as unrecoverable as the shrink.

— Alejandra

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions