Skip to content

SapNfsVolumeSnapshotSchedule Custom Resource ​

WARNING

This is a beta feature available only per request for SAP-internal teams.

The sapnfsvolumesnapshotschedule.cloud-resources.kyma-project.io namespaced custom resource (CR) automates SapNfsVolumeSnapshot creation for a given SapNfsVolume. It supports both recurring schedules using cron expressions and one-time snapshots.

The CR performs the following actions:

  • Creates SapNfsVolumeSnapshot resources automatically at the specified interval, or once immediately for one-time mode.
  • Stamps each created snapshot with a deleteAfterDays value derived from maxRetentionDays, enabling time-based automatic expiry.
  • Enforces count-based retention: evicts the oldest Ready snapshot before creating a new one when maxReadySnapshots would be exceeded, and garbage-collects Failed snapshots beyond maxFailedSnapshots.
  • Enables you to temporarily suspend or permanently stop snapshot creation.

Created snapshots are named using the pattern {prefix}-{index}, where prefix defaults to the schedule name and index is a monotonically incrementing counter.

NOTE

Snapshot quota is shared across the entire OpenStack project. The default per-project limit is 50 snapshots across all volumes and schedules. The maxReadySnapshots default of 50 aligns with this limit but is applied per schedule. Multiple schedules targeting different volumes in the same project compete for the same quota pool. Consider lowering maxReadySnapshots when running multiple schedules in the same project.

How It Works ​

An SapNfsVolumeSnapshotSchedule progresses through the following states:

StateDescription
ActiveThe schedule is running normally and will create snapshots at the configured interval.
SuspendedThe schedule has been paused via spec.suspend: true. No new snapshots are created, but existing ones are preserved.
DoneThe schedule has completed: either a one-time snapshot finished, or endTime has passed.
ErrorA transient error occurred. The reconciler retries automatically.
DeletingThe schedule is being deleted. Snapshot cascade deletion is performed if deleteCascade is true.

Specification ​

This table lists the parameters of the given resource together with their descriptions:

Spec:

ParameterTypeRequiredImmutableDescription
templateobjectYesNoTemplate for the SapNfsVolumeSnapshot resources created by this schedule.
template.spec.sourceVolumeobjectYesNoReference to the SapNfsVolume to snapshot. The volume must be in the Ready state when each snapshot is created.
template.spec.sourceVolume.namestringYesNoName of the source SapNfsVolume.
template.spec.sourceVolume.namespacestringNoNoNamespace of the source SapNfsVolume. Defaults to the schedule's namespace if not provided.
template.labelsmap[string]stringNoNoLabels applied to each created SapNfsVolumeSnapshot. Merged with schedule-managed labels.
template.annotationsmap[string]stringNoNoAnnotations applied to each created SapNfsVolumeSnapshot.
schedulestringNoNoCron expression for the recurring schedule. When empty or not specified, a single snapshot is created immediately (one-time mode) and the schedule transitions to Done. See Cron syntax.
prefixstringNoNoPrefix for the names of created SapNfsVolumeSnapshot resources. Defaults to the name of this schedule.
startTimestringNoNoTime before which no snapshots are created, in RFC 3339 format (e.g., 2026-06-01T00:00:00Z). When not set, the schedule becomes effective immediately.
endTimestringNoNoTime after which no new snapshots are created, in RFC 3339 format. When reached, the schedule transitions to Done. When not set, the schedule runs indefinitely.
maxRetentionDaysintNoNoMaximum number of days to retain each created snapshot. Stamped as deleteAfterDays on each snapshot at creation time. Defaults to 375. Minimum: 1.
maxReadySnapshotsintNoNoMaximum number of Ready snapshots to retain. The oldest Ready snapshot is deleted before creating a new one when this limit would be exceeded. Defaults to 50. Minimum: 1.
maxFailedSnapshotsintNoNoMaximum number of Failed snapshots to retain. Oldest snapshots beyond this count are garbage-collected. Defaults to 5. Minimum: 1.
suspendbooleanNoNoWhen true, stops the schedule from creating new snapshots and sets state to Suspended. Existing snapshots are not affected. Defaults to false.
deleteCascadebooleanNoNoWhen true, all SapNfsVolumeSnapshot resources created by this schedule are deleted when the schedule itself is deleted. When false, existing snapshots are preserved. Defaults to false.

Status:

ParameterTypeDescription
statestringCurrent state of the schedule. Possible values: Active, Suspended, Done, Error, Deleting.
conditions[]objectRepresents the current state of the CR's conditions.
conditions.lastTransitionTimestringDefines the date of the last condition status change.
conditions.messagestringProvides more details about the condition status change.
conditions.reasonstringDefines the reason for the condition status change.
conditions.status (required)stringRepresents the status of the condition. The value is either True, False, or Unknown.
conditions.typestringProvides a short description of the condition.
nextRunTimes[]stringPreview of up to 3 upcoming times when the next snapshots will be created.
nextDeleteTimesmap[string]stringMap of snapshot names to their expected time-based deletion time, calculated from maxRetentionDays.
lastCreateRunstringTime when the last snapshot creation was triggered.
lastCreatedBackupobjectRefObject reference of the last created snapshot.
lastDeleteRunstringTime when the last retention-based deletion was performed.
lastDeletedBackups[]objectRefObject references of the snapshots deleted during the last retention run.
schedulestringThe cron expression of the currently active schedule.
snapshotIndexintMonotonically incrementing counter used for snapshot naming.
backupCountintNumber of snapshots currently present in the system for this schedule.

Sample Custom Resources ​

Recurring Daily Snapshot ​

Create a daily snapshot at midnight, retaining the last 7 snapshots for up to 30 days:

yaml
apiVersion: cloud-resources.kyma-project.io/v1beta1
kind: SapNfsVolumeSnapshotSchedule
metadata:
  name: daily-snapshot
  namespace: default
spec:
  template:
    spec:
      sourceVolume:
        name: my-sap-nfs-vol
  schedule: "0 0 * * *"
  prefix: daily
  maxRetentionDays: 30
  maxReadySnapshots: 7

One-Time Snapshot ​

Create a single snapshot immediately, for example before a maintenance window:

yaml
apiVersion: cloud-resources.kyma-project.io/v1beta1
kind: SapNfsVolumeSnapshotSchedule
metadata:
  name: pre-maintenance-snapshot
  namespace: default
spec:
  template:
    spec:
      sourceVolume:
        name: my-sap-nfs-vol

Time-Bounded Weekly Schedule with Cascade Delete ​

Create weekly snapshots within a defined time window, and delete all managed snapshots when the schedule is removed:

yaml
apiVersion: cloud-resources.kyma-project.io/v1beta1
kind: SapNfsVolumeSnapshotSchedule
metadata:
  name: weekly-snapshot
  namespace: default
spec:
  template:
    spec:
      sourceVolume:
        name: my-sap-nfs-vol
  schedule: "0 2 * * 0"
  prefix: weekly
  startTime: "2026-06-01T00:00:00Z"
  endTime: "2027-06-01T00:00:00Z"
  maxRetentionDays: 90
  maxReadySnapshots: 12
  deleteCascade: true