Skip to content

K8SPSMDB-1472 automatic PVC resizing#2177

Merged
hors merged 24 commits intomainfrom
K8SPSMDB-1472
Jan 21, 2026
Merged

K8SPSMDB-1472 automatic PVC resizing#2177
hors merged 24 commits intomainfrom
K8SPSMDB-1472

Conversation

@gkech
Copy link
Copy Markdown
Contributor

@gkech gkech commented Jan 7, 2026

K8SPSMDB-1472 Powered by Pull Request Badge

CHANGE DESCRIPTION

Problem:

Right now, pvc resizing can only happen manually, see docs: https://docs.percona.com/percona-operator-for-mongodb/scaling.html.

We could utilize metrics (df) to determine the current pvc usage and, according to the following configuration, adjust incrementally the pvc size.

spec:
  storageAutoscaling:
    enabled: true
    triggerThresholdPercent: 80
    growthStepGi: 2
    maxSize: "100Gi"

Cause:
Short explanation of the root cause of the issue if applicable.

Solution:

Helm PR: percona/percona-helm-charts#763

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?
  • Are OpenShift compare files changed for E2E tests (compare/*-oc.yml)?

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 MongoDB version?
  • Does the change support oldest and newest supported Kubernetes version?

@pull-request-size pull-request-size bot added the size/XXL 1000+ lines label Jan 7, 2026
@github-actions github-actions bot added tests dependencies Pull requests that update a dependency file labels Jan 7, 2026
@gkech gkech force-pushed the K8SPSMDB-1472 branch 3 times, most recently from ffda71e to 9419a84 Compare January 9, 2026 14:01
@it-percona-cla
Copy link
Copy Markdown

it-percona-cla commented Jan 9, 2026

CLA assistant check
All committers have signed the CLA.

nmarukovich
nmarukovich previously approved these changes Jan 16, 2026
egegunes
egegunes previously approved these changes Jan 16, 2026
Comment on lines +971 to +978
// GrowthStepGi is the amount in GiB to add to the storage when the threshold is exceeded
// +kubebuilder:validation:Minimum=1
// +kubebuilder:default=2
GrowthStepGi int64 `json:"growthStepGi,omitempty"`

// MaxSize is the maximum size for PVCs (e.g., "100Gi")
// If set, autoscaling will not increase storage beyond this limit
MaxSize string `json:"maxSize,omitempty"`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to define them as resource.Quantity instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pooknull
pooknull previously approved these changes Jan 19, 2026
nmarukovich
nmarukovich previously approved these changes Jan 19, 2026
@gkech gkech dismissed stale reviews from nmarukovich and pooknull via 2236992 January 19, 2026 15:55
@egegunes egegunes added this to the v1.22.0 milestone Jan 20, 2026
@JNKPercona
Copy link
Copy Markdown
Collaborator

Test Name Result Time
arbiter passed 00:00:00
balancer passed 00:00:00
cross-site-sharded passed 00:00:00
custom-replset-name passed 00:00:00
custom-tls passed 00:00:00
custom-users-roles passed 00:00:00
custom-users-roles-sharded passed 00:00:00
data-at-rest-encryption passed 00:00:00
data-sharded passed 00:00:00
demand-backup passed 00:00:00
demand-backup-eks-credentials-irsa passed 00:00:00
demand-backup-fs passed 00:00:00
demand-backup-if-unhealthy passed 00:00:00
demand-backup-incremental passed 00:00:00
demand-backup-incremental-sharded passed 00:59:49
demand-backup-physical-parallel passed 00:00:00
demand-backup-physical-aws passed 00:00:00
demand-backup-physical-azure passed 00:00:00
demand-backup-physical-gcp-s3 passed 00:00:00
demand-backup-physical-gcp-native passed 00:00:00
demand-backup-physical-minio passed 00:00:00
demand-backup-physical-minio-native passed 00:00:00
demand-backup-physical-minio-native-tls passed 00:00:00
demand-backup-physical-sharded-parallel passed 00:00:00
demand-backup-physical-sharded-aws passed 00:00:00
demand-backup-physical-sharded-azure passed 00:00:00
demand-backup-physical-sharded-gcp-native passed 00:00:00
demand-backup-physical-sharded-minio passed 00:00:00
demand-backup-physical-sharded-minio-native passed 00:00:00
demand-backup-sharded passed 00:00:00
disabled-auth passed 00:00:00
expose-sharded passed 00:00:00
finalizer passed 00:00:00
ignore-labels-annotations passed 00:00:00
init-deploy passed 00:00:00
ldap passed 00:00:00
ldap-tls passed 00:00:00
limits passed 00:00:00
liveness passed 00:00:00
mongod-major-upgrade passed 00:00:00
mongod-major-upgrade-sharded passed 00:00:00
monitoring-2-0 passed 00:00:00
monitoring-pmm3 passed 00:00:00
multi-cluster-service passed 00:00:00
multi-storage passed 00:00:00
non-voting-and-hidden passed 00:00:00
one-pod passed 00:00:00
operator-self-healing-chaos passed 00:00:00
pitr passed 00:00:00
pitr-physical passed 00:00:00
pitr-sharded passed 00:00:00
pitr-to-new-cluster passed 00:00:00
pitr-physical-backup-source passed 00:00:00
preinit-updates passed 00:00:00
pvc-auto-resize passed 00:00:00
pvc-resize passed 00:00:00
recover-no-primary passed 00:00:00
replset-overrides passed 00:00:00
replset-remapping passed 00:00:00
replset-remapping-sharded passed 00:00:00
rs-shard-migration passed 00:00:00
scaling passed 00:00:00
scheduled-backup passed 00:00:00
security-context passed 00:00:00
self-healing-chaos passed 00:00:00
service-per-pod passed 00:00:00
serviceless-external-nodes passed 00:00:00
smart-update passed 00:00:00
split-horizon passed 00:00:00
stable-resource-version passed 00:00:00
storage passed 00:00:00
tls-issue-cert-manager passed 00:00:00
unsafe-psa passed 00:00:00
upgrade passed 00:00:00
upgrade-consistency passed 00:00:00
upgrade-consistency-sharded-tls passed 00:00:00
upgrade-sharded passed 00:00:00
upgrade-partial-backup passed 00:00:00
users passed 00:00:00
users-vault passed 00:00:00
version-service passed 00:00:00
Summary Value
Tests Run 81/81
Job Duration 01:32:08
Total Test Time 00:59:49

commit: 629f2ff
image: perconalab/percona-server-mongodb-operator:PR-2177-629f2ff5

@hors hors merged commit d11d764 into main Jan 21, 2026
12 checks passed
@hors hors deleted the K8SPSMDB-1472 branch January 21, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants