Skip to content

Comments

K8SPG-771 Documented PVC snapshot support#362

Draft
nastena1606 wants to merge 1 commit into2.0from
K8SPG-771-Doc-PVC-snapshot-support
Draft

K8SPG-771 Documented PVC snapshot support#362
nastena1606 wants to merge 1 commit into2.0from
K8SPG-771-Doc-PVC-snapshot-support

Conversation

@nastena1606
Copy link
Collaborator

new file: docs/backups-pvc-snapshots.md
modified: docs/backups.md
modified: docs/env-var-operator.md
modified: docs/operator.md

new file:   docs/backups-pvc-snapshots.md
        modified:   docs/backups.md
        modified:   docs/env-var-operator.md
        modified:   docs/operator.md
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds documentation for PVC snapshot-based backups/restores (tech preview) and exposes related configuration options in the Operator docs.

Changes:

  • Adds new docs pages describing PVC snapshots and a step-by-step setup/usage tutorial.
  • Updates backup/restore reference docs to include snapshot-related fields and backup method selection.
  • Updates MkDocs navigation and feature-gate docs to surface the new functionality.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
mkdocs-base.yml Adds nav entries for new PVC snapshot docs (currently with a broken filename and typo).
docs/backups.md Introduces “backup methods” section and links to PVC snapshots.
docs/backups-pvc-snapshots.md New overview doc describing what PVC snapshots are, workflow, requirements/limitations.
docs/backups-pvc-setup.md New tutorial for enabling the feature gate, configuring snapshot class, and performing backup/restore/clone flows.
docs/backup-resource-options.md Documents new spec.method field for backup resources (currently inconsistent casing vs tutorial).
docs/restore-options.md Adds volumeSnapshotBackupName restore option and links to the tutorial.
docs/operator.md Documents dataSource.* fields and backups.volumeSnapshots.* settings.
docs/env-var-operator.md Documents VolumeSnapshots=true feature gate and multi-feature configuration example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +355 to +358
dataSource:
apiGroup: snapshot.storage.k8s.io
kind: VolumeSnapshot
name: <name-of-the-pvc-snapshot-backup>
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The "Create a new cluster from a PVC snapshot" YAML example has inconsistent indentation and tab characters around dataSource/apiGroup/kind/name, which makes the manifest invalid when copied. Reformat the example using spaces and ensure dataSource is correctly nested under spec (as a sibling of instances).

Suggested change
dataSource:
apiGroup: snapshot.storage.k8s.io
kind: VolumeSnapshot
name: <name-of-the-pvc-snapshot-backup>
dataSource:
apiGroup: snapshot.storage.k8s.io
kind: VolumeSnapshot
name: <name-of-the-pvc-snapshot-backup>

Copilot uses AI. Check for mistakes.
Comment on lines +584 to +588
Specifies what name of the PVC snapshot backup that will be used as a data source for the restore.

| Value type | Example |
| ---------- | ------- |
| :material-code-string: string | `my-snapshot-backup-data` |
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

dataSource.name is described as the "PVC snapshot backup" name, but dataSource.kind is VolumeSnapshot, so dataSource.name should refer to the Kubernetes VolumeSnapshot object name (not the backup resource name). Clarify this to avoid pointing users at the wrong object.

Suggested change
Specifies what name of the PVC snapshot backup that will be used as a data source for the restore.
| Value type | Example |
| ---------- | ------- |
| :material-code-string: string | `my-snapshot-backup-data` |
Specifies the name of the Kubernetes `VolumeSnapshot` object that will be used as a data source for the restore.
| Value type | Example |
| ---------- | ------- |
| :material-code-string: string | `my-volume-snapshot` |

Copilot uses AI. Check for mistakes.
Comment on lines +44 to +48
Specifies what method to use for the backup. When undefined, uses `pgBackRest` by default. Supported value is `VolumeSnapshot`. See [PVC snapshot support](backups-pvc-snapshots.md) to learn more.

| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `VolumeSnapshot` |
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The docs describe the spec.method supported value as VolumeSnapshot, but the new PVC snapshot tutorial uses method: volumeSnapshot and shows the backup TYPE as volumeSnapshot. Please make the casing consistent across docs to match the actual CRD enum value.

Suggested change
Specifies what method to use for the backup. When undefined, uses `pgBackRest` by default. Supported value is `VolumeSnapshot`. See [PVC snapshot support](backups-pvc-snapshots.md) to learn more.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `VolumeSnapshot` |
Specifies what method to use for the backup. When undefined, uses `pgBackRest` by default. Supported value is `volumeSnapshot`. See [PVC snapshot support](backups-pvc-snapshots.md) to learn more.
| Value type | Example |
| ----------- | ---------- |
| :material-code-string: string | `volumeSnapshot` |

Copilot uses AI. Check for mistakes.
Comment on lines +218 to +220
- PVC shapshots:
- "About PVC snapshots": backups-pvc-snapshots.md
- "Configure PVC snapshots": backups-pvc-snapshots-setup.md
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

In the navigation, "PVC shapshots" is misspelled and the linked page backups-pvc-snapshots-setup.md does not exist in the docs tree (the new tutorial file is docs/backups-pvc-setup.md). This will produce a broken nav / build error; update the label and point the nav entry to the correct file.

Suggested change
- PVC shapshots:
- "About PVC snapshots": backups-pvc-snapshots.md
- "Configure PVC snapshots": backups-pvc-snapshots-setup.md
- PVC snapshots:
- "About PVC snapshots": backups-pvc-snapshots.md
- "Configure PVC snapshots": backups-pvc-setup.md

Copilot uses AI. Check for mistakes.
Comment on lines +7 to +11
This document provides an overview of PVC snapshots. If you are familiar with the concept and want to try it out, jump to the [Configure and PVC snaphots](backups-pvc-setup.md) tutorial.

By reading this document you will learn the following:

* [What is a PVC shapshot](#overview)
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

Typos in the intro/list: "snaphots"/"shapshot" should be "snapshots". Also the link text "Configure and PVC snaphots" is missing a word (e.g., "Configure and use PVC snapshots").

Suggested change
This document provides an overview of PVC snapshots. If you are familiar with the concept and want to try it out, jump to the [Configure and PVC snaphots](backups-pvc-setup.md) tutorial.
By reading this document you will learn the following:
* [What is a PVC shapshot](#overview)
This document provides an overview of PVC snapshots. If you are familiar with the concept and want to try it out, jump to the [Configure and use PVC snapshots](backups-pvc-setup.md) tutorial.
By reading this document you will learn the following:
* [What is a PVC snapshot](#overview)

Copilot uses AI. Check for mistakes.
Comment on lines +105 to +111
2. Edit the `deploy/cr.yaml` Custom Resource and add the `snapshots` subsection under `backups`. Specify the name of the `VolumeSnapshotClass` in the `volumeSnapshotClassName` key:

```yaml
spec:
backups:
snapshots:
volumeSnapshotClassName: <name-of-your-volume-snapshot-class>
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

This section documents configuring snapshots under spec.backups.snapshots.volumeSnapshotClassName, but elsewhere in the docs (e.g., docs/operator.md) the fields are backups.volumeSnapshots.className/mode/schedule. Please align the tutorial with the actual CR schema and use consistent key names.

Suggested change
2. Edit the `deploy/cr.yaml` Custom Resource and add the `snapshots` subsection under `backups`. Specify the name of the `VolumeSnapshotClass` in the `volumeSnapshotClassName` key:
```yaml
spec:
backups:
snapshots:
volumeSnapshotClassName: <name-of-your-volume-snapshot-class>
2. Edit the `deploy/cr.yaml` Custom Resource and add the `volumeSnapshots` subsection under `backups`. Specify the name of the `VolumeSnapshotClass` in the `className` key:
```yaml
spec:
backups:
volumeSnapshots:
className: <name-of-your-volume-snapshot-class>

Copilot uses AI. Check for mistakes.
Comment on lines +167 to +180
1. Configure the backup schedule in your cluster Custom Resource. Edit the `deploy/cr.yaml` manifest. In the `schedule` key in the `snapshots` subsection under `backups`, specify the schedule in the Cron format for the snapshots to be made automatically. Your updated configuration should look like this:

```yaml
apiVersion: pgv2.percona.com/v2
kind: PerconaPGCluster
metadata:
name: my-cluster
spec:
backups:
volumeSnapshots:
className: my-snapshot-class
mode: offline
schedule: "0 3 ** *" # Every day at 3:00 AM
```
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The scheduled backup example has an invalid cron expression ("0 3 ** *") and the surrounding text mentions the snapshots subsection while the YAML uses volumeSnapshots. Fix the cron to a valid 5-field expression and make the subsection name consistent.

Copilot uses AI. Check for mistakes.
Comment on lines +70 to +74
Following feature gates are present as of Operator version 2.8.1:

1. `AutoGrowVolumes=true` - Enables automatic PVC resize when the storage usage reaches a threshold. The Operator can trigger volume expansion for database data volumes. To learn more, refer to the [Scale your cluster](scaling.md#enable-automatic-storage-resize) chapter.

2. `VolumeSnapshots=true` - Enables [PVC snapshot support](backups-pvc-snapshots.md) for backups and restores. When enabled and configured in the cluster Custom Resource, the Operator creates volume snapshots in coordination with pgBackRest backups, enabling much faster restores for large datasets.
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

This section says feature gates are present "as of Operator version 2.8.1", but VolumeSnapshots is described elsewhere in the docs as starting with 2.9.0. Please reconcile the version statement so users don't assume the feature gate exists in 2.8.1.

Copilot uses AI. Check for mistakes.
or

```bash
kubectl apply --sever-side -f deploy/bundle.yaml -n $NAMESPACE
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

Typo in the kubectl command: --sever-side should be --server-side. As written, the command will fail when copied.

Suggested change
kubectl apply --sever-side -f deploy/bundle.yaml -n $NAMESPACE
kubectl apply --server-side -f deploy/bundle.yaml -n $NAMESPACE

Copilot uses AI. Check for mistakes.
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: gke-snapshot-class
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The VolumeSnapshotClass YAML example uses a tab-indented name: field under metadata:. Tabs make the YAML invalid for copy/paste; use spaces and align name correctly under metadata:.

Suggested change
name: gke-snapshot-class
name: gke-snapshot-class

Copilot uses AI. Check for mistakes.
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.

2 participants