Skip to content

K8SPG-691: add repo host autoscaling#1689

Open
pooknull wants to merge 3 commits into
mainfrom
K8SPG-691
Open

K8SPG-691: add repo host autoscaling#1689
pooknull wants to merge 3 commits into
mainfrom
K8SPG-691

Conversation

@pooknull

@pooknull pooknull commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

DESCRIPTION

This PR adds autoscaling for pgbackrest PVCs. It follows the pgdata PVC autoscaling logic.

When the AutoGrowVolumes feature gate is enabled and spec.backups.pgbackrest.repos[].volume.volumeClaimSpec.resources.limits.storage is configured:

  • A script running in the pgbackrest-config container checks disk usage every five seconds.
  • When usage exceeds 75%, the script calculates a new desired size by increasing the current volume size by 50% and writes it to the repo-host pod annotation suggested-pgbackrest-<repo-name>-pvc-size
  • The annotation update triggers reconcile. The operator increases the PVCs resources.requests.storage to the suggested size
  • The operator saves the latest suggestion in status.pgbackrest.repos[].desiredRepoVolume

CHECKLIST

Jira

  • Is the Jira ticket created and referenced properly?
  • Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
  • Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

  • Is an E2E test/test case added for the new feature/change?
  • Are unit tests added where appropriate?

Config/Logging/Testability

  • Are all needed new/changed options added to default YAML files?
  • Are all needed new/changed options added to the Helm Chart?
  • Did we add proper logging messages for operator actions?
  • Did we ensure compatibility with the previous version or cluster upgrade process?
  • Does the change support oldest and newest supported PG version?
  • Does the change support oldest and newest supported Kubernetes version?

@pooknull
pooknull marked this pull request as ready for review July 20, 2026 20:23
@JNKPercona

Copy link
Copy Markdown
Collaborator
Test Name Result Time
backup-enable-disable passed 00:10:39
builtin-extensions passed 00:06:45
cert-manager-tls passed 00:09:04
custom-envs passed 00:19:10
custom-tls passed 00:06:14
database-init-sql passed 00:02:59
demand-backup passed 00:24:10
demand-backup-offline-snapshot passed 00:17:02
dynamic-configuration passed 00:03:29
finalizers passed 00:04:10
init-deploy passed 00:03:12
huge-pages passed 00:03:00
major-upgrade-14-to-15 passed 00:11:06
major-upgrade-15-to-16 passed 00:10:48
major-upgrade-16-to-17 passed 00:11:36
major-upgrade-17-to-18 passed 00:11:32
ldap passed 00:04:07
ldap-tls passed 00:07:40
monitoring passed 00:08:10
monitoring-pmm3 passed 00:09:41
one-pod passed 00:05:47
repo-host-autogrow passed 00:02:25
operator-self-healing failure 01:30:13
pgbouncer-mtls passed 00:03:26
pitr passed 00:12:32
scaling passed 00:05:38
scheduled-backup passed 00:33:47
self-healing passed 00:09:42
sidecars passed 00:03:01
standby-pgbackrest passed 00:19:14
standby-streaming passed 00:13:03
start-from-backup passed 00:12:42
tablespaces passed 00:07:54
telemetry-transfer passed 00:04:55
upgrade-consistency passed 00:06:54
upgrade-minor passed 00:08:11
users passed 00:04:59
migration-from-crunchy-standby passed 00:22:39
migration-from-crunchy-pv passed 00:08:48
migration-from-crunchy-backup-restore passed 00:16:55
Summary Value
Tests Run 40/40
Job Duration 02:52:34
Total Test Time 07:57:37

commit: ae363f8
image: perconalab/percona-postgresql-operator:PR-1689-ae363f849

@egegunes egegunes added this to the v3.1.0 milestone Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants