v1alpha1

package
v0.0.0-...-3b03b5c Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 5 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 v1alpha1 contains API Schema definitions for the klio v1alpha1 API group. +kubebuilder:object:generate=true +groupName=klio.cnpg.io

Index

Constants

View Source
const (
	// PluginConfigurationConditionConfigurationApplied indicates whether the
	// configuration has been successfully applied to the Secret.
	PluginConfigurationConditionConfigurationApplied = "ConfigurationApplied"
)

Condition types for PluginConfiguration.

View Source
const (
	// ReasonSecretUpdated means the Secret was successfully created or updated.
	ReasonSecretUpdated = "SecretUpdated"
)

Condition reasons for ConfigurationApplied.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	//
	//nolint:gochecknoglobals
	GroupVersion = schema.GroupVersion{Group: "klio.cnpg.io", Version: "v1alpha1"}

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

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

Functions

This section is empty.

Types

type CompressionAlgorithm

type CompressionAlgorithm string

CompressionAlgorithm is the name of a Kopia compression algorithm. The special value "none" disables compression. +kubebuilder:validation:Enum=none;deflate-best-compression;deflate-best-speed;deflate-default;gzip;gzip-best-compression;gzip-best-speed;pgzip;pgzip-best-compression;pgzip-best-speed;s2-better;s2-default;s2-parallel-4;s2-parallel-8;zstd;zstd-better-compression;zstd-fastest

type CompressionPolicy

type CompressionPolicy struct {
	// Algorithm is the name of the Kopia compression algorithm to use.
	// +kubebuilder:validation:Required
	Algorithm CompressionAlgorithm `json:"algorithm" mapstructure:"algorithm"`

	// MinSize is the minimum file size, in bytes, to attempt compression for.
	// Files smaller than this are stored uncompressed. Zero means no minimum.
	// +optional
	// +kubebuilder:validation:Minimum=0
	MinSize int64 `json:"minSize,omitempty" mapstructure:"minSize"`

	// MaxSize is the maximum file size, in bytes, to attempt compression for.
	// Files larger than this are stored uncompressed. Zero means no maximum.
	// +optional
	// +kubebuilder:validation:Minimum=0
	MaxSize int64 `json:"maxSize,omitempty" mapstructure:"maxSize"`
}

CompressionPolicy configures the Kopia compression policy applied to base backup data. A `minSize` above a non-zero `maxSize` would match no file at all: Kopia accepts such a policy and then silently skips compression for every file, so it is rejected at admission instead. +kubebuilder:validation:XValidation:rule="!has(self.maxSize) || self.maxSize == 0 || !has(self.minSize) || self.minSize <= self.maxSize",message="minSize must not be greater than maxSize"

func (*CompressionPolicy) DeepCopy

func (in *CompressionPolicy) DeepCopy() *CompressionPolicy

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

func (*CompressionPolicy) DeepCopyInto

func (in *CompressionPolicy) DeepCopyInto(out *CompressionPolicy)

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

type EmbeddedObjectMeta

type EmbeddedObjectMeta struct {
	// +optional
	Labels map[string]string `json:"labels,omitempty"`

	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
}

EmbeddedObjectMeta contains metadata for embedded objects.

func (*EmbeddedObjectMeta) DeepCopy

func (in *EmbeddedObjectMeta) DeepCopy() *EmbeddedObjectMeta

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

func (*EmbeddedObjectMeta) DeepCopyInto

func (in *EmbeddedObjectMeta) DeepCopyInto(out *EmbeddedObjectMeta)

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

type EncryptionFiles

type EncryptionFiles struct {
	// Volume is the volume source that holds the encryption key file and
	// the identity file.
	Volume VolumeSource `json:"volume"`

	// KeyPath is the path of the Age-encrypted encryption key file within
	// the volume.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=1024
	// +kubebuilder:validation:XValidation:rule="!self.startsWith('/') && !self.split('/').exists(s, s == '..')",message="must be a relative path without '..' segments"
	KeyPath string `json:"keyPath"`

	// IdentityPath is the path of the Age identity (private key) file
	// within the volume, used to decrypt the encryption key.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=1024
	// +kubebuilder:validation:XValidation:rule="!self.startsWith('/') && !self.split('/').exists(s, s == '..')",message="must be a relative path without '..' segments"
	IdentityPath string `json:"identityPath"`
}

EncryptionFiles is the Age-encrypted encryption key and the Age identity used to decrypt it, read from a single volume.

func (*EncryptionFiles) DeepCopy

func (in *EncryptionFiles) DeepCopy() *EncryptionFiles

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

func (*EncryptionFiles) DeepCopyInto

func (in *EncryptionFiles) DeepCopyInto(out *EncryptionFiles)

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

type ImageConfiguration

type ImageConfiguration struct {
	// Image is the image to be used for the Klio server
	Image string `json:"image"`

	// ImagePullPolicy defines the policy for pulling the image
	// +optional
	// +kubebuilder:default=IfNotPresent
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`

	// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the
	// images
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
}

ImageConfiguration contains the information needed to download the Klio image.

func (*ImageConfiguration) DeepCopy

func (in *ImageConfiguration) DeepCopy() *ImageConfiguration

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

func (*ImageConfiguration) DeepCopyInto

func (in *ImageConfiguration) DeepCopyInto(out *ImageConfiguration)

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

type PluginConfiguration

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

	Spec PluginConfigurationSpec `json:"spec"`
	// +optional
	Status PluginConfigurationStatus `json:"status,omitzero"`
}

PluginConfiguration is the Schema for the client configuration API.

func (*PluginConfiguration) DeepCopy

func (in *PluginConfiguration) DeepCopy() *PluginConfiguration

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

func (*PluginConfiguration) DeepCopyInto

func (in *PluginConfiguration) DeepCopyInto(out *PluginConfiguration)

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

func (*PluginConfiguration) DeepCopyObject

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

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

type PluginConfigurationList

type PluginConfigurationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitzero"`

	Items []PluginConfiguration `json:"items"`
}

PluginConfigurationList contains a list of PluginConfiguration.

func (*PluginConfigurationList) DeepCopy

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

func (*PluginConfigurationList) DeepCopyInto

func (in *PluginConfigurationList) DeepCopyInto(out *PluginConfigurationList)

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

func (*PluginConfigurationList) DeepCopyObject

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

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

type PluginConfigurationSpec

type PluginConfigurationSpec struct {
	// ServerAddress is the address of the Klio server
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	ServerAddress string `json:"serverAddress"`

	// Tier1 is the Tier 1 configuration
	// +optional
	Tier1 *Tier1PluginConfiguration `json:"tier1,omitempty"`

	// Tier2 is the Tier 2 configuration
	// +optional
	Tier2 *Tier2PluginConfiguration `json:"tier2,omitempty"`

	// WALPrefetch configures WAL prefetching behavior during recovery operations.
	// +optional
	WALPrefetch *WALPrefetchConfiguration `json:"walPrefetch,omitempty"`

	// TLS configures the PKI of the plugin: the identity the PostgreSQL
	// instances present to the Klio server and the CA used to verify it.
	// +kubebuilder:validation:Required
	TLS PluginTLSConfiguration `json:"tls"`

	// ClusterName is the name of the PostgreSQL cluster we are connecting to
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	ClusterName string `json:"clusterName"`

	// Pprof enables the pprof endpoint for performance profiling
	// +optional
	Pprof bool `json:"pprof,omitempty"`

	// Mode selects the operation mode of the plugin.
	// +kubebuilder:validation:Enum=standard;read-only
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="mode is immutable"
	// +kubebuilder:default=standard
	Mode ServerMode `json:"mode"`

	// Containers allows defining a list of containers that will be merged with the Klio sidecar containers.
	// This enables users to customize the sidecars with additional environment variables, volume mounts,
	// resource limits, and other container settings without polluting the PostgreSQL container environment.
	//
	// Merge behavior:
	// - Containers are matched by name (klio-plugin)
	// - User customizations serve as the base
	// - Klio required values (name, args, CONTAINER_NAME env var) always override user values
	// - User-defined environment variables and volume mounts are preserved
	// - Template defaults are applied only for fields not set by the user or Klio
	//
	// +optional
	// +kubebuilder:validation:MaxItems=1
	// +listType=map
	// +listMapKey=name
	// +kubebuilder:validation:XValidation:rule="self.all(c, c.name == 'klio-plugin')",message="container name must be klio-plugin"
	Containers []corev1.Container `json:"containers,omitempty"`
}

PluginConfigurationSpec defines the desired state of client configuration. +kubebuilder:validation:XValidation:rule="self.mode != 'read-only' || (has(self.tier2) && (!has(self.tier2.enableBackup) || !self.tier2.enableBackup) && self.tier2.enableRecovery && !has(self.tier1))",message="when mode is read-only, tier2.enableRecovery must be true, tier2.enableBackup must be false, and tier1 must not exist" +kubebuilder:validation:XValidation:rule="!(self.mode == 'read-only' && has(self.tier2) && has(self.tier2.compression))",message="tier2.compression cannot be set when mode is read-only"

func (*PluginConfigurationSpec) DeepCopy

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

func (*PluginConfigurationSpec) DeepCopyInto

func (in *PluginConfigurationSpec) DeepCopyInto(out *PluginConfigurationSpec)

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

func (*PluginConfigurationSpec) GetWALPrefetch

GetWALPrefetch returns the WAL prefetch configuration with defaults applied.

type PluginConfigurationStatus

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

PluginConfigurationStatus defines the observed state of ClientConfig.

func (*PluginConfigurationStatus) DeepCopy

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

func (*PluginConfigurationStatus) DeepCopyInto

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

type PluginTLSConfiguration

type PluginTLSConfiguration struct {
	// ClientIdentity is the TLS identity the PostgreSQL instances
	// present to the Klio server: the client certificate and its
	// matching private key.
	// +kubebuilder:validation:Required
	ClientIdentity TLSIdentity `json:"clientIdentity"`

	// ServerCA is the CA bundle used to verify the Klio server.
	// It is mounted into PostgreSQL instance pods and used for both
	// base backups (Kopia, via --server-cert-ca-file) and WAL streaming
	// (gRPC).
	// The referenced file must contain the PEM-encoded CA certificate(s).
	// +kubebuilder:validation:Required
	ServerCA VolumeFileReference `json:"serverCa"`
}

PluginTLSConfiguration contains the information needed to configure the PKI of the plugin.

func (*PluginTLSConfiguration) DeepCopy

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

func (*PluginTLSConfiguration) DeepCopyInto

func (in *PluginTLSConfiguration) DeepCopyInto(out *PluginTLSConfiguration)

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

type PodTemplateSpec

type PodTemplateSpec struct {
	// +optional
	Metadata EmbeddedObjectMeta `json:"metadata,omitempty"`

	// +optional
	Spec corev1.PodSpec `json:"spec,omitempty"`
}

PodTemplateSpec describes the data a pod should have when created from a template.

func (*PodTemplateSpec) DeepCopy

func (in *PodTemplateSpec) DeepCopy() *PodTemplateSpec

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

func (*PodTemplateSpec) DeepCopyInto

func (in *PodTemplateSpec) DeepCopyInto(out *PodTemplateSpec)

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

func (*PodTemplateSpec) ToCoreV1

func (p *PodTemplateSpec) ToCoreV1() *corev1.PodTemplateSpec

ToCoreV1 converts the custom PodTemplateSpec to corev1.PodTemplateSpec.

type RetentionPolicy

type RetentionPolicy struct {
	// Latest is the number of latest backups to keep. Zero disables
	// retention: every backup is kept, the same as leaving this policy unset.
	// +optional
	// +kubebuilder:validation:Minimum=0
	Latest *int32 `json:"latest,omitempty" mapstructure:"latest"`
}

RetentionPolicy defines how many backups we should keep.

func (*RetentionPolicy) DeepCopy

func (in *RetentionPolicy) DeepCopy() *RetentionPolicy

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

func (*RetentionPolicy) DeepCopyInto

func (in *RetentionPolicy) DeepCopyInto(out *RetentionPolicy)

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

type S3Configuration

type S3Configuration struct {
	// BucketName is the name of the bucket
	BucketName string `json:"bucketName"`

	// Prefix is the path within the bucket under which all Klio objects
	// are stored, allowing a single bucket to be shared across multiple deployments.
	// +optional
	Prefix string `json:"prefix,omitempty"`

	// Endpoint is the endpoint to be used
	// +optional
	Endpoint string `json:"endpoint,omitempty"`

	// Region is the region to be used
	// +optional
	Region string `json:"region,omitempty"`

	// The S3 access key ID
	// +optional
	AccessKeyID *machineryapi.SecretKeySelector `json:"accessKeyId,omitempty"`

	// The S3 access key
	// +optional
	SecretAccessKey *machineryapi.SecretKeySelector `json:"secretAccessKey,omitempty"`

	// The S3 session token
	// +optional
	SessionToken *machineryapi.SecretKeySelector `json:"sessionToken,omitempty"`

	// CredentialsFile is an AWS shared credentials file (INI format) mounted
	// from a volume. It is mutually exclusive with accessKeyId,
	// secretAccessKey and sessionToken.
	// +optional
	CredentialsFile *VolumeFileReference `json:"credentialsFile,omitempty"`

	// Profile is the profile to use within CredentialsFile.
	// +optional
	Profile string `json:"profile,omitempty"`

	// CustomCABundle is a PEM-encoded CA bundle, mounted from a volume, that
	// is trusted when connecting to the S3 endpoint.
	// +optional
	CustomCABundle *VolumeFileReference `json:"customCaBundle,omitempty"`
}

S3Configuration is the configuration to a S3 defined tier 2. +kubebuilder:validation:XValidation:rule="!has(self.credentialsFile) || !(has(self.accessKeyId) || has(self.secretAccessKey) || has(self.sessionToken))",message="credentialsFile cannot be combined with accessKeyId, secretAccessKey or sessionToken" +kubebuilder:validation:XValidation:rule="!has(self.profile) || has(self.credentialsFile)",message="profile requires credentialsFile" +kubebuilder:validation:XValidation:rule="has(self.accessKeyId) == has(self.secretAccessKey)",message="accessKeyId and secretAccessKey must be set together" +kubebuilder:validation:XValidation:rule="!has(self.sessionToken) || (has(self.accessKeyId) && has(self.secretAccessKey))",message="sessionToken requires accessKeyId and secretAccessKey"

func (*S3Configuration) DeepCopy

func (in *S3Configuration) DeepCopy() *S3Configuration

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

func (*S3Configuration) DeepCopyInto

func (in *S3Configuration) DeepCopyInto(out *S3Configuration)

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

type Server

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

	Spec ServerSpec `json:"spec"`
	// +optional
	Status ServerStatus `json:"status,omitzero"`
}

Server is the Schema for the servers API.

func (*Server) DeepCopy

func (in *Server) DeepCopy() *Server

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

func (*Server) DeepCopyInto

func (in *Server) DeepCopyInto(out *Server)

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

func (*Server) DeepCopyObject

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

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

func (*Server) GetServiceName

func (s *Server) GetServiceName() string

GetServiceName returns the name of the service associated with the Klio server.

func (*Server) GetStatefulSetName

func (s *Server) GetStatefulSetName() string

GetStatefulSetName returns the name of the StatefulSet running the Klio server.

type ServerList

type ServerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitzero"`

	Items []Server `json:"items"`
}

ServerList contains a list of Server.

func (*ServerList) DeepCopy

func (in *ServerList) DeepCopy() *ServerList

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

func (*ServerList) DeepCopyInto

func (in *ServerList) DeepCopyInto(out *ServerList)

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

func (*ServerList) DeepCopyObject

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

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

type ServerMode

type ServerMode string

ServerMode defines the operation mode of the Server.

const (
	// ModeStandard corresponds to server with standard read/write permissions.
	ModeStandard ServerMode = "standard"
	// ModeReadOnly corresponds to a server with read-only permissions.
	ModeReadOnly ServerMode = "read-only"
)

type ServerSpec

type ServerSpec struct {
	// ImageConfiguration tells how to download the Klio
	// image.
	ImageConfiguration `json:",inline"`

	// TLS configures the PKI of the Klio server: the identity it presents
	// and the CA used to verify clients.
	TLS TLSConfiguration `json:"tls"`

	// Mode selects the operation mode of the server.
	// +kubebuilder:validation:Enum=standard;read-only
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="mode is immutable"
	// +kubebuilder:default=standard
	Mode ServerMode `json:"mode"`

	// Tier1 is the Tier 1 configuration
	Tier1 *Tier1Configuration `json:"tier1,omitempty"`

	// Tier2 is the Tier 2 configuration
	Tier2 *Tier2Configuration `json:"tier2,omitempty"`

	// Storage is the configuration of the single PersistentVolumeClaim
	// mounted at /klio, hosting base backups, WAL, the work queue, and
	// the Tier 1/Tier 2 caches as fixed subdirectories (data, queue,
	// cache_tier1, cache_tier2).
	// +kubebuilder:validation:XValidation:rule="!has(oldSelf.pvcTemplate.resources) || !has(oldSelf.pvcTemplate.resources.requests) || !('storage' in oldSelf.pvcTemplate.resources.requests) || !('storage' in self.pvcTemplate.resources.requests) || !quantity(self.pvcTemplate.resources.requests['storage']).isLessThan(quantity(oldSelf.pvcTemplate.resources.requests['storage']))",message="storage PVC size cannot be decreased"
	Storage Storage `json:"storage"`

	// Template to override the default StatefulSet of the Klio server.
	// WARNING: Modifying this template may break the server functionality if not done carefully.
	// This field is primarily intended for advanced configuration such as telemetry setup.
	// Use at your own risk and ensure thorough testing before applying changes.
	// +optional
	Template *PodTemplateSpec `json:"template,omitempty"`
}

ServerSpec defines the desired state of Server. +kubebuilder:validation:XValidation:rule="self.mode == 'read-only' || has(self.tier1)",message="tier1 is required" +kubebuilder:validation:XValidation:rule="self.mode != 'read-only' || has(self.tier2)",message="tier2 is required when mode is read-only" +kubebuilder:validation:XValidation:rule="!(self.mode == 'read-only' && has(self.tier1))",message="tier1 cannot be set when mode is read-only" +kubebuilder:validation:XValidation:rule="!(self.mode == 'read-only' && has(self.tier2) && has(self.tier2.compression))",message="tier2.compression cannot be set when mode is read-only"

func (*ServerSpec) DeepCopy

func (in *ServerSpec) DeepCopy() *ServerSpec

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

func (*ServerSpec) DeepCopyInto

func (in *ServerSpec) DeepCopyInto(out *ServerSpec)

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

type ServerStatus

type ServerStatus struct {
}

ServerStatus defines the observed state of Server.

func (*ServerStatus) DeepCopy

func (in *ServerStatus) DeepCopy() *ServerStatus

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

func (*ServerStatus) DeepCopyInto

func (in *ServerStatus) DeepCopyInto(out *ServerStatus)

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

type Storage

type Storage struct {
	// PersistentVolumeClaimTemplate is used to generate the PVC that
	// backs the /klio directory tree for this server.
	PersistentVolumeClaimTemplate corev1.PersistentVolumeClaimSpec `json:"pvcTemplate"`
}

Storage defines the configuration for the Klio server's PersistentVolumeClaim.

func (*Storage) DeepCopy

func (in *Storage) DeepCopy() *Storage

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

func (*Storage) DeepCopyInto

func (in *Storage) DeepCopyInto(out *Storage)

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

type TLSConfiguration

type TLSConfiguration struct {
	// ServerIdentity is the TLS identity presented to clients: the
	// server certificate and its matching private key.
	// +kubebuilder:validation:Required
	ServerIdentity TLSIdentity `json:"serverIdentity"`

	// ClientCA is the CA bundle used to verify client certificates.
	// It must contain the PEM-encoded CA certificate(s).
	// +kubebuilder:validation:Required
	ClientCA VolumeFileReference `json:"clientCa"`
}

TLSConfiguration contains the information needed to configure the PKI infrastructure of the Klio server.

func (*TLSConfiguration) DeepCopy

func (in *TLSConfiguration) DeepCopy() *TLSConfiguration

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

func (*TLSConfiguration) DeepCopyInto

func (in *TLSConfiguration) DeepCopyInto(out *TLSConfiguration)

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

type TLSIdentity

type TLSIdentity struct {
	// Volume is the volume source that holds the certificate and the
	// private key.
	Volume VolumeSource `json:"volume"`

	// CertPath is the path of the certificate file within the volume.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=1024
	// +kubebuilder:validation:XValidation:rule="!self.startsWith('/') && !self.split('/').exists(s, s == '..')",message="must be a relative path without '..' segments"
	CertPath string `json:"certPath"`

	// KeyPath is the path of the private key file within the volume.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=1024
	// +kubebuilder:validation:XValidation:rule="!self.startsWith('/') && !self.split('/').exists(s, s == '..')",message="must be a relative path without '..' segments"
	KeyPath string `json:"keyPath"`
}

TLSIdentity is the certificate and private key a component uses to authenticate itself over TLS.

func (*TLSIdentity) DeepCopy

func (in *TLSIdentity) DeepCopy() *TLSIdentity

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

func (*TLSIdentity) DeepCopyInto

func (in *TLSIdentity) DeepCopyInto(out *TLSIdentity)

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

type Tier1Configuration

type Tier1Configuration struct {
	// Encryption specifies the Age-encrypted encryption key file and the
	// Age identity (private key) file used to decrypt it.
	Encryption EncryptionFiles `json:"encryption"`

	// Compression defines the repository-wide (global) compression policy
	// applied to base backups stored on tier1. Individual clusters can
	// override it through their PluginConfiguration.
	// +optional
	Compression *CompressionPolicy `json:"compression,omitempty"`
}

Tier1Configuration is the tier 1 configuration.

func (*Tier1Configuration) DeepCopy

func (in *Tier1Configuration) DeepCopy() *Tier1Configuration

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

func (*Tier1Configuration) DeepCopyInto

func (in *Tier1Configuration) DeepCopyInto(out *Tier1Configuration)

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

type Tier1PluginConfiguration

type Tier1PluginConfiguration struct {
	// RetentionPolicy defines how many backups we should keep
	// +optional
	RetentionPolicy *RetentionPolicy `json:"retention,omitempty" mapstructure:"retention"`

	// Compression defines the compression policy applied to this cluster's
	// base backups on tier1. It overrides the tier1 repository-wide policy
	// configured on the Server.
	// +optional
	Compression *CompressionPolicy `json:"compression,omitempty" mapstructure:"compression"`
}

Tier1PluginConfiguration configures tier1 backup and recovery settings.

func (*Tier1PluginConfiguration) DeepCopy

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

func (*Tier1PluginConfiguration) DeepCopyInto

func (in *Tier1PluginConfiguration) DeepCopyInto(out *Tier1PluginConfiguration)

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

type Tier2Configuration

type Tier2Configuration struct {
	// S3 contains the configuration parameters for an S3-based tier 2.
	S3 *S3Configuration `json:"s3"`

	// Encryption specifies the Age-encrypted encryption key file and the
	// Age identity (private key) file used to decrypt it.
	Encryption EncryptionFiles `json:"encryption"`

	// Compression defines the repository-wide (global) compression policy
	// applied to base backups stored on tier2. Individual clusters can
	// override it through their PluginConfiguration.
	// +optional
	Compression *CompressionPolicy `json:"compression,omitempty"`
}

Tier2Configuration is the tier 2 configuration.

func (*Tier2Configuration) DeepCopy

func (in *Tier2Configuration) DeepCopy() *Tier2Configuration

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

func (*Tier2Configuration) DeepCopyInto

func (in *Tier2Configuration) DeepCopyInto(out *Tier2Configuration)

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

type Tier2PluginConfiguration

type Tier2PluginConfiguration struct {
	// EnableBackup controls whether WAL and base backups should be stored in tier2
	// +optional
	EnableBackup bool `json:"enableBackup,omitempty"`

	// EnableRecovery controls whether tier2 should be included in the recovery source list
	// +optional
	EnableRecovery bool `json:"enableRecovery,omitempty"`

	// RetentionPolicy defines how many backups we should keep
	// +optional
	RetentionPolicy *RetentionPolicy `json:"retention,omitempty" mapstructure:"retention"`

	// Compression defines the compression policy applied to this cluster's
	// base backups on tier2. It overrides the tier2 repository-wide policy
	// configured on the Server.
	// +optional
	Compression *CompressionPolicy `json:"compression,omitempty" mapstructure:"compression"`
}

Tier2PluginConfiguration configures tier2 backup and recovery settings. +kubebuilder:validation:XValidation:rule="self.enableBackup || self.enableRecovery",message="at least one of enableBackup or enableRecovery must be true"

func (*Tier2PluginConfiguration) DeepCopy

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

func (*Tier2PluginConfiguration) DeepCopyInto

func (in *Tier2PluginConfiguration) DeepCopyInto(out *Tier2PluginConfiguration)

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

type VolumeFileReference

type VolumeFileReference struct {
	// Volume is the volume source to mount.
	Volume VolumeSource `json:"volume"`

	// Path is the file path within the mounted volume.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=1024
	// +kubebuilder:validation:XValidation:rule="!self.startsWith('/') && !self.split('/').exists(s, s == '..')",message="must be a relative path without '..' segments"
	Path string `json:"path"`
}

VolumeFileReference specifies a file from a volume source.

func (*VolumeFileReference) DeepCopy

func (in *VolumeFileReference) DeepCopy() *VolumeFileReference

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

func (*VolumeFileReference) DeepCopyInto

func (in *VolumeFileReference) DeepCopyInto(out *VolumeFileReference)

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

type VolumeSource

type VolumeSource struct {
	// Secret is a volume populated by a Secret.
	// +optional
	Secret *corev1.SecretVolumeSource `json:"secret,omitempty"`

	// ConfigMap is a volume populated by a ConfigMap.
	// +optional
	ConfigMap *corev1.ConfigMapVolumeSource `json:"configMap,omitempty"`

	// Projected is a projected volume (secrets, config maps, cluster
	// trust bundles, ...).
	// +optional
	Projected *corev1.ProjectedVolumeSource `json:"projected,omitempty"`

	// CSI is a volume provided by a CSI driver.
	// +optional
	CSI *corev1.CSIVolumeSource `json:"csi,omitempty"`
}

VolumeSource is the subset of volume sources Klio can read files from. +kubebuilder:validation:ExactlyOneOf=secret;configMap;projected;csi +kubebuilder:validation:XValidation:rule="!has(self.secret) || (has(self.secret.secretName) && size(self.secret.secretName) > 0)",message="secret.secretName must be set when the secret volume source is used" +kubebuilder:validation:XValidation:rule="!has(self.configMap) || (has(self.configMap.name) && size(self.configMap.name) > 0)",message="configMap.name must be set when the configMap volume source is used" +kubebuilder:validation:XValidation:rule="!has(self.projected) || (has(self.projected.sources) && size(self.projected.sources) > 0)",message="projected.sources must not be empty when the projected volume source is used" +kubebuilder:validation:XValidation:rule="!has(self.csi) || (has(self.csi.driver) && size(self.csi.driver) > 0)",message="csi.driver must be set when the csi volume source is used" +kubebuilder:validation:XValidation:rule="!has(self.secret) || !has(self.secret.optional) || !self.secret.optional",message="secret.optional must be unset or false, credential volumes cannot be optional" +kubebuilder:validation:XValidation:rule="!has(self.configMap) || !has(self.configMap.optional) || !self.configMap.optional",message="configMap.optional must be unset or false, credential volumes cannot be optional"

func (*VolumeSource) DeepCopy

func (in *VolumeSource) DeepCopy() *VolumeSource

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

func (*VolumeSource) DeepCopyInto

func (in *VolumeSource) DeepCopyInto(out *VolumeSource)

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

func (*VolumeSource) ToCoreV1

func (s *VolumeSource) ToCoreV1() corev1.VolumeSource

ToCoreV1 converts the subset to a corev1.VolumeSource. The result is a deep copy, so callers may mutate it.

type WALPrefetchConfiguration

type WALPrefetchConfiguration struct {
	// Count is the number of WAL files to prefetch ahead during recovery.
	// A value of 0 disables prefetching.
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=64
	// +kubebuilder:default=2
	Count int `json:"count"`

	// MaxConcurrentDownloads is the maximum number of concurrent WAL downloads.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=64
	// +kubebuilder:default=4
	MaxConcurrentDownloads int `json:"maxConcurrentDownloads"`
}

WALPrefetchConfiguration configures WAL prefetching during recovery.

func (*WALPrefetchConfiguration) DeepCopy

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

func (*WALPrefetchConfiguration) DeepCopyInto

func (in *WALPrefetchConfiguration) DeepCopyInto(out *WALPrefetchConfiguration)

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