cloudnative-pg / cloudnative-pg/cloudnative-pg

[Feature]: Storage Autoscaling Support

Open
#10,842 2 comments 2 reactions 1 assignee Claimed by @gbartolini View on GitHub
triage
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.