Repository navigation
Conversation
Add spec.volume.volumeAttributesClass to the postgresql CRD. The operator sets it on the statefulset's data volume claim template and updates the existing persistent volume claims in place, so the CSI driver can modify the volumes without recreating them. - Volume claims are synced on update regardless of storage_resize_mode; only size changes stay gated by it. - In mixed mode the operator no longer changes iops, throughput or type through the AWS API when a class is set. - Removing the field keeps the class on existing volume claims. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
monotek
marked this pull request as ready for review
November 4, 2026 18:52
monotek
requested review from
FxKu,
Jan-M,
hughcapet,
idanovinda,
jopadi and
mikkeloscar
as code owners
November 4, 2026 18:52
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem description
There is no way to set a VolumeAttributesClass on the data volumes. That class is how Kubernetes changes IOPS and throughput of existing volumes in place, without the AWS-only
mixedresize mode.This PR adds an optional
spec.volume.volumeAttributesClass. The operator sets it on the volume claim template and updates the existing PVCs, and the CSI driver then modifies the volumes without restarting the pods.Update / Sync syncVolumes # Update: now also runs with storage_resize_mode "off" syncUnderlyingEBSVolume # mixed mode + skip iops/throughput/type when a class is set syncVolumeClaims grow size # skipped with mode "off"/"ebs" + set volumeAttributesClassName # if set in manifest and different generateStatefulSet volume claim template + volumeAttributesClassNameRemoving the field leaves the class on existing PVCs.
Merge danger: two-way door; blast radius opt-in. Clusters without the field get no template change and no StatefulSet replacement. One behaviour change for everyone: with
storage_resize_mode: off, an update now also syncs PVC annotations, as the periodic sync already did.Details
Evidence
New tests
TestVolumeAttributesClass(PVC template) andTestSyncVolumeAttributesClass(live PVCs):go test ./...: 358 passed.hack/verify-codegen.sh: up to date.Known limits
VolumeAttributesClassfeature gate) and a CSI driver that supports ModifyVolume. If the API server drops the field, the operator keeps trying to set it on every sync.Linked issues
None found.
Checklist
Thanks for submitting a pull request to the Postgres Operator project.
Please, ensure your contribution matches the following items:
acid.zalan.doapi package.🤖 Generated with Claude Code