Skip to main content

Manual snapshots in Aonnis Valkey Panther

This document provides guidance on configuring manual snapshots for Valkey clusters using the ValkeyCluster Kubernetes Custom Resource Definition (CRD). It explains the available settings for scheduling, retention, storage configuration, and retry mechanisms, ensuring efficient snapshot management within a Kubernetes environment.

Currently, initiating a manual (on-demand) snapshot for a Valkey cluster requires adding the following configuration to the cluster's specification. It is acknowledged that this approach may be cumbersome. An improved method for triggering manual snapshots through the plugin will soon be introduced in a future update.

manualSnapshotConfig

  • Type: ManualSnapshotConfigType
  • Description: Configuration for manual snapshots.
  • Fields:
  • name: Name of the snapshot (must be unique).
  • startTime:
    • Type: int64
    • Description: Unix epoch time to schedule the snapshot (immediate if in the past).
    • Required: true
  • storageConfig:
    • Type: StorageConfigType
    • Description: Storage configuration for snapshots.
    • Required: true
  • uploadRetryLimit:
    • Type: int32
    • Description: Number of retry attempts for snapshot uploads, in case of failure to connect to storageConfig.
    • Required: false
    • Default: 1
  • Example:
    manualSnapshotConfig:
    name: "manual-backup-001"
    startTime: 1633072800
    uploadRetryLimit: 3
    storageConfig:
    protocol: S3
    accessConfig:
    endpoint: "https://s3.amazonaws.com"
    region: "us-east-1"
    bucket: "valkey-snapshots"
    folderPath: "manual-backups"
    accessKeysSecretRef:
    name: "s3-credentials"
    namespace: "default"
    accessKey: "access-key"
    secretKey: "secret-key"

Required S3 permissions

Make sure the identity used for creating access keys have following S3 permissions. So that Aonnis Valkey Panther can work smoothly.

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:ListBucketMultipartUploads",
"s3:AbortMultipartUpload",
"s3:ListMultipartUploadParts"
],
"Resource": [
"arn:aws:s3:::your-bucket-name",
"arn:aws:s3:::your-bucket-name/*"
]
}
]
}