v1beta1

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package v1 contains API Schema definitions for the v1 API group. +kubebuilder:object:generate=true +groupName=cnpg-extensions.yandex.cloud

Index

Constants

View Source
const (
	DefaultDownloadFileRetries = 5
	DefaultDeltaMaxSteps       = 0
)
View Source
const (
	StorageTypeS3  = "s3"
	StorageTypeGCS = "gcs"
)
View Source
const (
	// ConditionTypeWALIntegrityCheck indicates whether WAL data integrity check has passed
	ConditionTypeWALIntegrityCheck = "WALIntegrityCheckPassed"

	// ConditionTypeCredentialsValid indicates whether the configured credentials are valid
	ConditionTypeCredentialsValid = "CredentialsValid"

	// ConditionTypeStorageReadable indicates whether the configured storage is accessible for reading
	ConditionTypeStorageReadable = "StorageReadable"

	// ConditionTypeStorageWritable indicates whether the configured storage is accessible for writing
	ConditionTypeStorageWritable = "StorageWritable"
)

Condition types for BackupConfig

View Source
const BackupAllDependentsAnnotationName = "cnpg-plugin-wal-g.yandex.cloud/dependent-backups-all"

BackupAllDependentsAnnotation represents all incremental backups (both direct and indirect) depending on current backup

View Source
const BackupConfigCMFinalizerName = "cnpg-plugin-wal-g.yandex.cloud/backup-config-configmap-protection"

Finalizer added to ConfigMap resources referenced by BackupConfig to protect from accidental deletion It is used to ensure that ConfigMap are not deleted while they are still referenced by a BackupConfig

View Source
const BackupConfigFinalizerName = "cnpg-plugin-wal-g.yandex.cloud/backup-config-cleanup"

Finalizer added to CNPG BackupConfig resources managed by plugin It is used to ensure that backup removed from storage before Backup resource deleted

View Source
const BackupConfigSecretFinalizerName = "cnpg-plugin-wal-g.yandex.cloud/backup-config-secret-protection"

Finalizer added to Secret resources referenced by BackupConfig to protect from accidental deletion It is used to ensure that Secrets are not deleted while they are still referenced by a BackupConfig

View Source
const BackupDirectDependentsAnnotationName = "cnpg-plugin-wal-g.yandex.cloud/dependent-backups-direct"

BackupDirectDependentsAnnotation represents incremental backups which are created from current backup

View Source
const BackupFinalizerName = "cnpg-plugin-wal-g.yandex.cloud/backup-cleanup"

Finalizer added to CNPG Backup resources managed by plugin It is used to ensure that backup removed from storage before Backup resource deleted

View Source
const BackupPgVersionLabelName = "cnpg-plugin-wal-g.yandex.cloud/pg-major"

PGVersionLabel represents PG major version from which backup was created

View Source
const BackupTypeLabelName = "cnpg-plugin-wal-g.yandex.cloud/backup-type"

BackupTypeLabel represents type of created backup (full / incremental)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "cnpg-extensions.yandex.cloud", Version: "v1beta1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme

	BackupConfigKind = "BackupConfig"
)

Functions

func BackupConfigIsUsedForArchivation

func BackupConfigIsUsedForArchivation(backupConfigName types.NamespacedName, cluster *cnpgv1.Cluster) bool

BackupConfigIsUsedForArchivation checks whether BackupConfig with specified name is used by CNPG Cluster as configuration for new backups && wal archive

func BackupConfigIsUsedForRecovery

func BackupConfigIsUsedForRecovery(backupConfigName types.NamespacedName, cluster *cnpgv1.Cluster) bool

BackupConfigIsUsedForRecovery checks whether BackupConfig with specified name is used by CNPG Cluster as recovery source

func GetBackupConfigEncryptionSecretName added in v0.2.0

func GetBackupConfigEncryptionSecretName(b *BackupConfig) string

GetBackupConfigEncryptionSecretName returns secret name

Types

type BackupConfig

type BackupConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   BackupConfigSpec   `json:"spec,omitempty"`
	Status BackupConfigStatus `json:"status,omitempty"`
}

BackupConfig is the Schema for the backupconfigs API.

func GetBackupConfigForBackup added in v0.2.0

func GetBackupConfigForBackup(ctx context.Context, c client.Client, backup *cnpgv1.Backup) (*BackupConfig, error)

GetBackupConfigForBackup fetches the BackupConfig for a given Backup

func GetBackupConfigForCluster

func GetBackupConfigForCluster(ctx context.Context, c client.Client, cluster *cnpgv1.Cluster) (*BackupConfig, error)

GetBackupConfigForCluster returns BackupConfig object used for making backups If no BackupConfig reference specified in cluster plugin configuration - it will return (nil, nil) If BackupConfig reference specified, but couldn't fetch object - will return (nil, error)

func GetBackupConfigForClusterRecovery

func GetBackupConfigForClusterRecovery(ctx context.Context, c client.Client, cluster *cnpgv1.Cluster) (*BackupConfig, error)

GetBackupConfigForCluster returns BackupConfig object used for restoring from backups If no BackupConfig reference specified in cluster plugin configuration - it will return (nil, nil) If BackupConfig reference specified, but couldn't fetch object - will return (nil, error)

func (*BackupConfig) DeepCopy

func (in *BackupConfig) DeepCopy() *BackupConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupConfig.

func (*BackupConfig) DeepCopyInto

func (in *BackupConfig) DeepCopyInto(out *BackupConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BackupConfig) DeepCopyObject

func (in *BackupConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*BackupConfig) Default added in v0.2.0

func (b *BackupConfig) Default()

func (*BackupConfig) PrefetchSecretsData

func (b *BackupConfig) PrefetchSecretsData(ctx context.Context, c client.Client) (*BackupConfigWithSecrets, error)

type BackupConfigList

type BackupConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []BackupConfig `json:"items"`
}

BackupConfigList contains a list of BackupConfig.

func (*BackupConfigList) DeepCopy

func (in *BackupConfigList) DeepCopy() *BackupConfigList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupConfigList.

func (*BackupConfigList) DeepCopyInto

func (in *BackupConfigList) DeepCopyInto(out *BackupConfigList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BackupConfigList) DeepCopyObject

func (in *BackupConfigList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type BackupConfigPhase added in v0.3.0

type BackupConfigPhase string

BackupConfigPhase represents the overall phase of a BackupConfig

const (
	// BackupConfigPhaseHealthy indicates that the backup configuration is healthy
	// and all conditions are met
	BackupConfigPhaseHealthy BackupConfigPhase = "Healthy"

	// BackupConfigPhaseDegraded indicates that the backup configuration is partially
	// operational but some conditions are not met
	BackupConfigPhaseDegraded BackupConfigPhase = "Degraded"

	// BackupConfigPhaseFailed indicates that the backup configuration has critical
	// issues preventing normal operation
	BackupConfigPhaseFailed BackupConfigPhase = "Failed"

	// BackupConfigPhaseUnknown indicates that the backup configuration status
	// cannot be determined
	BackupConfigPhaseUnknown BackupConfigPhase = "Unknown"
)

type BackupConfigSpec

type BackupConfigSpec struct {
	// How many goroutines to use during backup && wal downloading. Default value is evaluated at runtime
	DownloadConcurrency *int `json:"downloadConcurrency,omitempty"`

	// Disk read rate limit during backup creation in bytes per second. Default value is evaluated at runtime
	UploadDiskRateLimit *int `json:"uploadDiskRateLimitBytesPerSecond,omitempty"`

	// Network upload rate limit during backup uploading in bytes per second. Default value is evaluated at runtime
	UploadNetworkRateLimit *int `json:"uploadNetworkRateLimitBytesPerSecond,omitempty"`

	// How many concurrency streams to use during backup uploading. Default value is evaluated at runtime
	UploadConcurrency *int `json:"uploadConcurrency,omitempty"`

	// How many concurrency streams are reading disk during backup uploading. Default value is evaluated at runtime
	UploadDiskConcurrency *int `json:"uploadDiskConcurrency,omitempty"`

	// How many times failed file will be retried during backup / wal download. Default: 15.
	DownloadFileRetries int `json:"downloadFileRetries,omitempty"`

	// Determines how many delta backups can be between full backups. Defaults to 0.
	DeltaMaxSteps int `json:"deltaMaxSteps,omitempty"`

	// Disable calling fsync after writing files when extracting tar files. Default: false.
	TarDisableFsync bool `json:"tarDisableFsync,omitempty"`

	// Threshold in bytes is size of one backup bundle. Default: 1073741823.
	TarSizeThreshold *int64 `json:"tarSizeThreshold,omitempty"`

	// Backups retention configuration
	Retention BackupRetentionConfig `json:"retention,omitempty"`

	// Backups storage configuration
	Storage StorageConfig `json:"storage"`

	// Resources for wal-g sidecar configurations
	//
	// IMPORTANT: resource changes will NOT trigger auto-update on clusters
	// Manual rollout with pods recreation needed instead
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// Backups encryption configuration
	Encryption BackupEncryptionConfig `json:"encryption,omitempty"`
}

BackupConfigSpec defines the desired state of BackupConfig.

func (*BackupConfigSpec) DeepCopy

func (in *BackupConfigSpec) DeepCopy() *BackupConfigSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupConfigSpec.

func (*BackupConfigSpec) DeepCopyInto

func (in *BackupConfigSpec) DeepCopyInto(out *BackupConfigSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BackupConfigSpecWithSecrets

type BackupConfigSpecWithSecrets struct {
	BackupConfigSpec
	Storage    StorageConfigWithSecrets           `json:"storage"`
	Encryption *BackupEncryptionConfigWithSecrets `json:"encryption,omitempty"`
}

backupConfigSpec defines the BackupConfigSpec extended with secrets data

func (*BackupConfigSpecWithSecrets) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupConfigSpecWithSecrets.

func (*BackupConfigSpecWithSecrets) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BackupConfigStatus

type BackupConfigStatus struct {
	// Overall status of the BackupConfig
	// +kubebuilder:validation:Enum=Healthy;Degraded;Failed;Unknown
	// +optional
	Phase BackupConfigPhase `json:"phase,omitempty"`

	// First recoverability point, the earliest point in time to which
	// the database can be restored using available backups and WAL files
	// +optional
	FirstRecoverabilityPoint *metav1.Time `json:"firstRecoverabilityPoint,omitempty"`

	// Timestamp of the last successful backup
	// +optional
	LastSuccessfulBackup *metav1.Time `json:"lastSuccessfulBackup,omitempty"`

	// Timestamp of the last failed backup
	// +optional
	LastFailedBackup *metav1.Time `json:"lastFailedBackup,omitempty"`

	// Consumed storage space breakdown by category (total, WAL)
	// +optional
	ConsumedStorage *ConsumedStorageInfo `json:"consumedStorage,omitempty"`

	// Conditions represent the latest available observations of the BackupConfig state
	// +listType=map
	// +listMapKey=type
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

BackupConfigStatus defines the observed state of BackupConfig.

func (*BackupConfigStatus) DeepCopy

func (in *BackupConfigStatus) DeepCopy() *BackupConfigStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupConfigStatus.

func (*BackupConfigStatus) DeepCopyInto

func (in *BackupConfigStatus) DeepCopyInto(out *BackupConfigStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BackupConfigWithSecrets

type BackupConfigWithSecrets struct {
	BackupConfig
	Spec BackupConfigSpecWithSecrets `json:"spec,omitempty"`
}

BackupConfigWithSecrets defines the BackupConfig with embedded secrets data (ex. S3 credentials)

func GetBackupConfigWithSecretsForBackup added in v0.2.0

func GetBackupConfigWithSecretsForBackup(
	ctx context.Context,
	c client.Client,
	backup *cnpgv1.Backup,
) (*BackupConfigWithSecrets, error)

GetBackupConfigWithSecretsForBackup fetches the BackupConfig with secrets for a given Backup

func (*BackupConfigWithSecrets) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupConfigWithSecrets.

func (*BackupConfigWithSecrets) DeepCopyInto

func (in *BackupConfigWithSecrets) DeepCopyInto(out *BackupConfigWithSecrets)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BackupEncryptionConfig added in v0.2.0

type BackupEncryptionConfig struct {
	// Method used for backup encryption.
	// Currently "libsodium" method supported only.
	// Use "none" or leave empty to disable encryption.
	Method string `json:"method,omitempty"`

	// Name of the existing secret with entryption keys.
	//
	// If empty / not provided - secret will be generated automatically
	// with name "<backupconfig-name>-encryption" and random key
	//
	// For "libsodium" method secret should contain single key "libsodiumKey"
	// containing hex-encoded 32-bytes length key i.e. created with `openssl rand -hex 32`
	ExistingEncryptionSecretName string `json:"encryptionSecret,omitempty"`
}

func (*BackupEncryptionConfig) DeepCopy added in v0.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupEncryptionConfig.

func (*BackupEncryptionConfig) DeepCopyInto added in v0.2.0

func (in *BackupEncryptionConfig) DeepCopyInto(out *BackupEncryptionConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BackupEncryptionConfigWithSecrets added in v0.2.0

type BackupEncryptionConfigWithSecrets struct {
	BackupEncryptionConfig
	EncryptionKeyData string
}

BackupEncryptionConfigWithSecrets defines encryption configuration with embedded secrets data

func (*BackupEncryptionConfigWithSecrets) DeepCopy added in v0.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupEncryptionConfigWithSecrets.

func (*BackupEncryptionConfigWithSecrets) DeepCopyInto added in v0.2.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BackupRetentionConfig added in v0.2.0

type BackupRetentionConfig struct {
	// Whether to disable S3 storage cleanup on BackupConfig deletion.
	// Useful when managing storage retention by S3 lifecycle policies.
	// When true, the operator will skip storage cleanup when BackupConfig is deleted.
	// +kubebuilder:default:=false
	// +optional
	IgnoreForBackupConfigDeletion bool `json:"ignoreForBackupConfigDeletion,omitempty"`

	// Whether to disable S3 storage cleanup on individual Backup resource deletion.
	// Useful when managing storage retention by S3 lifecycle policies.
	// When true, the operator will skip storage cleanup when individual Backup resources are deleted.
	// +kubebuilder:default:=false
	// +optional
	IgnoreForBackupDeletion bool `json:"ignoreForBackupDeletion,omitempty"`

	// Whether to ignore manually created backups in retention policy
	//
	// IMPORTANT: Automatically created backups should have OwnerReference with
	// ScheduledBackup or Cluster resource to be treated as auto backups!
	// (.spec.backupOwnerReference: "self" or "cluster" in ScheduledBackup resource)
	// +kubebuilder:default:=false
	// +optional
	IgnoreForManualBackups bool `json:"ignoreForManualBackups,omitempty"`

	// Minimal number of full backups to keep, this will keep backups
	// even if backup should be deleted due to DeleteBackupsAfter policy
	// Default is 5 backups
	// +kubebuilder:default:=5
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=99
	// +optional
	MinBackupsToKeep int `json:"minBackupsToKeep,omitempty"`

	// DeleteBackupsAfter is the retention policy to be used for backups
	// and WALs (i.e. '60d'). It is expressed in the form
	// of `XXu` where `XX` is a positive integer and `u` is in `[dwmh]` -
	// days, weeks, months, hours (i.e. '7d', '4w', '1m', '6h').
	// Different units should not be used at the same time
	// If not specified - backups will not be deleted automatically
	// +kubebuilder:validation:Pattern=^[1-9][0-9]*[dwmh]$
	// +optional
	DeleteBackupsAfter string `json:"deleteBackupsAfter,omitempty"`
}

func (*BackupRetentionConfig) DeepCopy added in v0.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupRetentionConfig.

func (*BackupRetentionConfig) DeepCopyInto added in v0.2.0

func (in *BackupRetentionConfig) DeepCopyInto(out *BackupRetentionConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BackupType added in v0.2.0

type BackupType string

BackupType is string enumeration for backup types, can only be "full" or "incremental"

const BackupTypeFull BackupType = "full"
const BackupTypeIncremental BackupType = "incremental"

type ConsumedStorageInfo added in v0.3.0

type ConsumedStorageInfo struct {
	// Total storage space consumed by backups and WAL files in bytes
	// +optional
	TotalBytes *int64 `json:"totalBytes,omitempty"`

	// Human-readable representation of total consumed storage space (e.g. "1.50 GiB", "256.00 MiB")
	// +optional
	Total string `json:"total,omitempty"`

	// Storage space consumed by base backups in bytes
	// +optional
	BackupsBytes *int64 `json:"backupsBytes,omitempty"`

	// Human-readable representation of base backups consumed storage space (e.g. "1.50 GiB", "256.00 MiB")
	// +optional
	Backups string `json:"backups,omitempty"`

	// Storage space consumed by WAL files in bytes
	// +optional
	WALBytes *int64 `json:"walBytes,omitempty"`

	// Human-readable representation of WAL consumed storage space (e.g. "1.50 GiB", "256.00 MiB")
	// +optional
	WAL string `json:"wal,omitempty"`
}

ConsumedStorageInfo contains storage consumption details broken down by category

func (*ConsumedStorageInfo) DeepCopy added in v0.3.0

func (in *ConsumedStorageInfo) DeepCopy() *ConsumedStorageInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsumedStorageInfo.

func (*ConsumedStorageInfo) DeepCopyInto added in v0.3.0

func (in *ConsumedStorageInfo) DeepCopyInto(out *ConsumedStorageInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CustomCAReference added in v0.2.2

type CustomCAReference struct {
	// Kind of the resource containing the CA certificate
	// Can be either "ConfigMap" or "Secret"
	// +kubebuilder:validation:Enum=ConfigMap;Secret
	Kind string `json:"kind"`

	// Name of the ConfigMap or Secret containing the CA certificate
	Name string `json:"name"`

	// Key in the ConfigMap or Secret containing the CA certificate
	Key string `json:"key"`
}

CustomCAReference defines a reference to a custom CA certificate stored in a ConfigMap or Secret

func (*CustomCAReference) DeepCopy added in v0.2.2

func (in *CustomCAReference) DeepCopy() *CustomCAReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomCAReference.

func (*CustomCAReference) DeepCopyInto added in v0.2.2

func (in *CustomCAReference) DeepCopyInto(out *CustomCAReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GCSStorageConfig added in v0.3.0

type GCSStorageConfig struct {
	// e.g. gs://bucket/path/to/folder
	// Mutually exclusive with PrefixFrom
	Prefix string `json:"prefix,omitempty"`

	// Reference to get prefix value from Secret or ConfigMap
	// Mutually exclusive with Prefix
	// +optional
	PrefixFrom *ValueFromSource `json:"prefixFrom,omitempty"`

	// Reference to a Secret key containing a GCP service account JSON key.
	// If omitted, Application Default Credentials are used (e.g. GKE Workload Identity).
	// +optional
	CredentialsSecretRef *corev1.SecretKeySelector `json:"credentialsSecretRef,omitempty"`
}

GCSStorageConfig defines Google Cloud Storage-specific configuration for object storage

func (*GCSStorageConfig) DeepCopy added in v0.3.0

func (in *GCSStorageConfig) DeepCopy() *GCSStorageConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCSStorageConfig.

func (*GCSStorageConfig) DeepCopyInto added in v0.3.0

func (in *GCSStorageConfig) DeepCopyInto(out *GCSStorageConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GCSStorageConfigWithSecrets added in v0.3.0

type GCSStorageConfigWithSecrets struct {
	GCSStorageConfig
	CredentialsData string // GCP service account JSON key data, empty if using Application Default Credentials
	// Resolved values from references
	ResolvedPrefix string // Resolved value from Prefix or PrefixFrom
}

gcsStorageConfigWithSecrets defines GCS-specific configuration with embedded secrets data (credentials)

func (*GCSStorageConfigWithSecrets) DeepCopy added in v0.3.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCSStorageConfigWithSecrets.

func (*GCSStorageConfigWithSecrets) DeepCopyInto added in v0.3.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type S3StorageConfig

type S3StorageConfig struct {
	// e.g. s3://bucket/path/to/folder
	// Mutually exclusive with PrefixFrom
	Prefix string `json:"prefix,omitempty"`

	// Reference to get prefix value from Secret or ConfigMap
	// Mutually exclusive with Prefix
	// +optional
	PrefixFrom *ValueFromSource `json:"prefixFrom,omitempty"`

	// S3 Region
	// Mutually exclusive with RegionFrom
	Region string `json:"region,omitempty"`

	// Reference to get region value from Secret or ConfigMap
	// Mutually exclusive with Region
	// +optional
	RegionFrom *ValueFromSource `json:"regionFrom,omitempty"`

	// S3 endpoint url
	// Mutually exclusive with EndpointURLFrom
	EndpointURL string `json:"endpointUrl,omitempty"`

	// Reference to get endpoint URL value from Secret or ConfigMap
	// Mutually exclusive with EndpointURL
	// +optional
	EndpointURLFrom *ValueFromSource `json:"endpointUrlFrom,omitempty"`

	// To enable path-style addressing (i.e., http://s3.amazonaws.com/BUCKET/KEY)
	// when connecting to an S3-compatible service that lack of support for
	// sub-domain style bucket URLs (i.e., http://BUCKET.s3.amazonaws.com/KEY)
	ForcePathStyle bool `json:"forcePathStyle,omitempty"`

	// S3 storage class used for backup files.
	// Default is "STANDARD". Other supported values include
	// "STANDARD_IA" for Infrequent Access and
	// "REDUCED_REDUNDANCY" for Reduced Redundancy.
	StorageClass string `json:"storageClass,omitempty"`

	// Custom CA certificate reference for S3 endpoint
	// Can be specified in either ConfigMap or Secret
	CustomCA *CustomCAReference `json:"customCA,omitempty"`

	AccessKeyIDRef     *corev1.SecretKeySelector `json:"accessKeyId,omitempty"`
	AccessKeySecretRef *corev1.SecretKeySelector `json:"accessKeySecret,omitempty"`
}

S3StorageConfig defines S3-specific configuration for object storage

func (*S3StorageConfig) DeepCopy

func (in *S3StorageConfig) DeepCopy() *S3StorageConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3StorageConfig.

func (*S3StorageConfig) DeepCopyInto

func (in *S3StorageConfig) DeepCopyInto(out *S3StorageConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type S3StorageConfigWithSecrets

type S3StorageConfigWithSecrets struct {
	S3StorageConfig
	AccessKeyID     string
	AccessKeySecret string
	CACertData      string // Custom CA certificate data for S3 endpoint
	// Resolved values from references
	ResolvedPrefix      string // Resolved value from Prefix or PrefixFrom
	ResolvedRegion      string // Resolved value from Region or RegionFrom
	ResolvedEndpointURL string // Resolved value from EndpointURL or EndpointURLFrom
}

s3StorageConfigWithSecrets defines S3-specific configuration with embedded secrets data (AccessKeyID && AccessKeySecret)

func (*S3StorageConfigWithSecrets) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3StorageConfigWithSecrets.

func (*S3StorageConfigWithSecrets) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StorageConfig

type StorageConfig struct {
	StorageType StorageType       `json:"type"`          // Type of storage to use, currently supported "s3" and "gcs"
	S3          *S3StorageConfig  `json:"s3,omitempty"`  // S3-specific parameters
	GCS         *GCSStorageConfig `json:"gcs,omitempty"` // GCS-specific parameters
}

StorageConfig defines object storage configuration for BackupConfig

func (*StorageConfig) DeepCopy

func (in *StorageConfig) DeepCopy() *StorageConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageConfig.

func (*StorageConfig) DeepCopyInto

func (in *StorageConfig) DeepCopyInto(out *StorageConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StorageConfigWithSecrets

type StorageConfigWithSecrets struct {
	StorageConfig
	S3  *S3StorageConfigWithSecrets  `json:"s3,omitempty"`  // S3-specific parameters
	GCS *GCSStorageConfigWithSecrets `json:"gcs,omitempty"` // GCS-specific parameters
}

storageConfigWithSecrets defines object storage configuration extended with secrets data

func (*StorageConfigWithSecrets) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageConfigWithSecrets.

func (*StorageConfigWithSecrets) DeepCopyInto

func (in *StorageConfigWithSecrets) DeepCopyInto(out *StorageConfigWithSecrets)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StorageType

type StorageType string

type ValueFromSource added in v0.2.2

type ValueFromSource struct {
	// Reference to a key in a Secret
	// +optional
	SecretKeyRef *corev1.SecretKeySelector `json:"secretKeyRef,omitempty"`

	// Reference to a key in a ConfigMap
	// +optional
	ConfigMapKeyRef *corev1.ConfigMapKeySelector `json:"configMapKeyRef,omitempty"`
}

ValueFromSource defines a reference to a value stored in a Secret or ConfigMap

func (*ValueFromSource) DeepCopy added in v0.2.2

func (in *ValueFromSource) DeepCopy() *ValueFromSource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValueFromSource.

func (*ValueFromSource) DeepCopyInto added in v0.2.2

func (in *ValueFromSource) DeepCopyInto(out *ValueFromSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL