cloudnative-pg / cloudnative-pg/cloudnative-pg
[Feature]: Storage Autoscaling Support
- Dominant language
- Go
- Stars
- 9.3k
- Forks
- 759
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 44
Description
### Is there an existing issue already for this feature request/idea?
- [x] I have searched for an existing issue, and could not find anything. I believe this is a new feature request to be evaluated.
### What problem is this feature going to solve? Why should it be added?
In production environments, clusters can run into storage saturation. Kubernetes allows PV expansion if the provider supports it, so including a feature like this should be relatively easy (we can already do this scaling operation manually). This feature would also reduce operational overhead.
Actually, CrunchyData PGO supports this https://access.crunchydata.com/documentation/postgres-operator/latest/guides/autogrowable-disk.
### Describe the solution you'd like
Monitor volume usage, and automatically trigger expansion when reaching a configurable threshold.
Configuration example:
```yaml
storage:
size: 500GiB
autogrow:
enabled: true
threshold: 80%
increment: 20GiB # a percentage based value would be more useful though
maxSize: 2TiB
```
### Describe alternatives you've considered
Having a CronJob manipulate `spec.storage.size` or using [Volume Autoscaler](https://github.com/DevOps-Nirvana/Kubernetes-Volume-Autoscaler)
### Additional context
Duplicate of #9385, closed by stale bot, but was not stale. (Wrongly configured) Stale bots destroy Open Source (https://nostalebots.xyz/). See also a discussion in k8s itself: https://github.com/kubernetes/kubernetes/issues/103151
### Backport?
Yes
### Are you willing to actively contribute to this feature?
No
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Assessment
This issue has not been assessed yet.