@@ -1029,9 +1029,9 @@ specified but globally disabled in the configuration. The
10291029
10301030# # Increase volume size
10311031
1032- Postgres operator supports statefulset volume resize if you're using the
1033- operator on top of AWS . For that you need to change the size field of the
1034- volume description in the cluster manifest and apply the change :
1032+ Postgres operator supports statefulset volume resize without doing a rolling
1033+ update . For that you need to change the size field of the volume description
1034+ in the cluster manifest and apply the change :
10351035
10361036` ` ` yaml
10371037spec:
@@ -1040,22 +1040,29 @@ spec:
10401040` ` `
10411041
10421042The operator compares the new value of the size field with the previous one and
1043- acts on differences.
1043+ acts on differences. The `storage_resize_mode` can be configured. By default,
1044+ the operator will adjust the PVCs and leave it to K8s and the infrastructure to
1045+ apply the change.
10441046
1045- You can only enlarge the volume with the process described above, shrinking is
1046- not supported and will emit a warning. After this update all the new volumes in
1047- the statefulset are allocated according to the new size. To enlarge persistent
1048- volumes attached to the running pods, the operator performs the following
1049- actions :
1047+ When using AWS with gp3 volumes you should set the mode to `mixed` because it
1048+ will also adjust the IOPS and throughput that can be defined in the manifest.
1049+ Check the [AWS docs](https://aws.amazon.com/ebs/general-purpose/) to learn
1050+ about default and maximum values. Keep in mind that AWS rate-limits updating
1051+ volume specs to no more than once every 6 hours.
10501052
1051- * call AWS API to change the volume size
1052-
1053- * connect to pod using `kubectl exec` and resize filesystem with `resize2fs`.
1053+ ` ` ` yaml
1054+ spec:
1055+ volume:
1056+ size: 5Gi # new volume size
1057+ iops: 4000
1058+ throughput: 500
1059+ ` ` `
10541060
1055- Fist step has a limitation, AWS rate-limits this operation to no more than once
1056- every 6 hours. Note, that if the statefulset is scaled down before resizing the
1057- new size is only applied to the volumes attached to the running pods. The
1058- size of volumes that correspond to the previously running pods is not changed.
1061+ The operator can only enlarge volumes. Shrinking is not supported and will emit
1062+ a warning. However, it can be done manually after updating the manifest. You
1063+ have to delete the PVC, which will hang until you also delete the corresponding
1064+ pod. Proceed with the next pod when the cluster is healthy again and replicas
1065+ are streaming.
10591066
10601067# # Logical backups
10611068
0 commit comments