v1

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the ps v1 API group +kubebuilder:object:generate=true +groupName=ps.percona.com

Index

Constants

View Source
const (
	MinSafeProxySize = 2
	MinSafeGRSize    = 3
	MaxSafeGRSize    = 9
	MinSafeAsyncSize = 2
)
View Source
const (
	ConditionInnoDBClusterBootstrapped    string = "InnoDBClusterBootstrapped"
	ConditionClusterSetReplicationRunning string = "ClusterSetReplicationRunning"
	ConditionAwaitingExternalBootstrap    string = "AwaitingExternalBootstrap"
)
View Source
const (
	BinVolumeName = "bin"
	BinVolumePath = "/opt/percona"
)
View Source
const (
	UpgradeStrategyDisabled    = "disabled"
	UpgradeStrategyNever       = "never"
	UpgradeStrategyRecommended = "recommended"
)
View Source
const (
	AzureBlobStoragePrefix string = ""
	AwsBlobStoragePrefix   string = "s3://"
	GCSStoragePrefix       string = "gs://"
)
View Source
const (
	EventTypeClusterSetPrimarySwitched       string = "ClusterSetPrimarySwitched"
	EventTypeClusterSetPrimaryForcedSwitched string = "ClusterSetPrimaryForcedSwitched"
	EventTypeClusterSetBootstrapped          string = "ClusterSetBootstrapped"
	EventTypeClusterSetUnhealthy             string = "ClusterSetHealthDegraded"
	EventTypeClusterSetMemberAdded           string = "ClusterSetMemberAdded"
	EventTypeClusterSetMemberRemoved         string = "ClusterSetMemberRemoved"
)
View Source
const (
	ConditionMySQLShellRunnerReady             string = "MySQLShellRunnerReady"
	ConditionClusterSetBootstrapped            string = "ClusterSetBootstrapped"
	ConditionClusterSetPrimarySwitchOverInProg string = "SwitchoverInProgress"
	ConditionReplicaManagementFailure          string = "ReplicaManagementFailure"
	ConditionClusterSetDissolving              string = "ClusterSetDissolving"
	ConditionClusterSetReady                   string = "Ready"
	ConditionClusterSetErrorReconcile          string = "ErrorReconcile"
)
View Source
const AffinityTopologyKeyNone = "none"
View Source
const (
	ConditionBackupLeaseAcquired = "BackupLeaseAcquired"
)
View Source
const SmartUpdateStatefulSetStrategyType appsv1.StatefulSetUpdateStrategyType = "SmartUpdate"

SmartUpdateStatefulSetStrategyType

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "ps.percona.com", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var NonAlphaNumeric = regexp.MustCompile("[^a-zA-Z0-9_]+")

Functions

func ConditionsEqual added in v1.1.0

func ConditionsEqual(a, b []metav1.Condition) bool

func FNVHash

func FNVHash(p []byte) string

FNVHash computes a hash of the provided byte slice using the FNV-1a algorithm.

func GetClusterNameFromObject

func GetClusterNameFromObject(obj client.Object) (string, error)

GetClusterNameFromObject retrieves the cluster's name from the given client object's labels.

Types

type AutoscalingSpec added in v1.2.0

type AutoscalingSpec struct {
	// Enabled enables storage autoscaling
	Enabled bool `json:"enabled,omitempty"`

	// TriggerThresholdPercent is the percentage of disk usage that triggers automatic storage expansion
	// +kubebuilder:validation:Minimum=50
	// +kubebuilder:validation:Maximum=95
	// +kubebuilder:default=80
	TriggerThresholdPercent int `json:"triggerThresholdPercent,omitempty"`

	// GrowthStep is the amount to add to storage when the threshold is exceeded (e.g., "2Gi")
	// +kubebuilder:validation:XValidation:rule="isQuantity(self)",message="growthStep must be a valid Kubernetes quantity (e.g., '2Gi')"
	// +kubebuilder:validation:XValidation:rule="sign(quantity(self)) == 1",message="growthStep must be a positive quantity"
	// +kubebuilder:default="2Gi"
	GrowthStep resource.Quantity `json:"growthStep,omitempty"`

	// MaxSize is the maximum size for PVCs (e.g., "100Gi")
	// If set, autoscaling will not increase storage beyond this limit
	// +kubebuilder:validation:XValidation:rule="isQuantity(self)",message="maxSize must be a valid Kubernetes quantity (e.g., '2Gi')"
	// +kubebuilder:validation:XValidation:rule="sign(quantity(self)) == 1",message="maxSize must be a positive quantity"
	// +kubebuilder:validation:XValidation:rule="quantity(self).compareTo(quantity('1Gi')) >= 0",message="maxSize should be at least 1Gi"
	MaxSize resource.Quantity `json:"maxSize,omitempty"`
}

AutoscalingSpec defines the configuration for automatic storage expansion

func (*AutoscalingSpec) DeepCopy added in v1.2.0

func (in *AutoscalingSpec) DeepCopy() *AutoscalingSpec

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

func (*AutoscalingSpec) DeepCopyInto added in v1.2.0

func (in *AutoscalingSpec) DeepCopyInto(out *AutoscalingSpec)

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

type BackupContainerArgs

type BackupContainerArgs struct {
	Xtrabackup []string `json:"xtrabackup,omitempty"`
	Xbcloud    []string `json:"xbcloud,omitempty"`
	Xbstream   []string `json:"xbstream,omitempty"`
}

func (*BackupContainerArgs) DeepCopy

func (in *BackupContainerArgs) DeepCopy() *BackupContainerArgs

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

func (*BackupContainerArgs) DeepCopyInto

func (in *BackupContainerArgs) DeepCopyInto(out *BackupContainerArgs)

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

func (BackupContainerArgs) GetXtrabackupFlagValue added in v1.2.0

func (args BackupContainerArgs) GetXtrabackupFlagValue(flag string) string

type BackupContainerOptions

type BackupContainerOptions struct {
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`
	// +optional
	Args BackupContainerArgs `json:"args"`
}

func (*BackupContainerOptions) DeepCopy

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

func (*BackupContainerOptions) DeepCopyInto

func (in *BackupContainerOptions) DeepCopyInto(out *BackupContainerOptions)

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

func (*BackupContainerOptions) GetArgs added in v1.2.0

func (*BackupContainerOptions) GetEnv

func (b *BackupContainerOptions) GetEnv() []corev1.EnvVar

type BackupDestination

type BackupDestination string

func (*BackupDestination) BackupName

func (dest *BackupDestination) BackupName() string

func (*BackupDestination) BucketAndPrefix

func (dest *BackupDestination) BucketAndPrefix() (string, string)

func (*BackupDestination) IncrementalBaseDestination added in v1.1.0

func (dest *BackupDestination) IncrementalBaseDestination() BackupDestination

IncrementalBaseDestination returns the full destination of the base (full) backup for an incremental backup. For example, given "s3://bucket/prefix/weekly-full-1.incr/2026-03-17T000000", it returns "s3://bucket/prefix/weekly-full-1". Returns the destination unchanged if it's not incremental.

func (*BackupDestination) IncrementalsDir added in v1.1.0

func (dest *BackupDestination) IncrementalsDir() string

IncrementalsDir returns the ".incr/" directory prefix used to list all incremental backups for a given base backup. For example, given "s3://bucket/prefix/weekly-full-1.incr/2026-03-17T000000", it returns "s3://bucket/prefix/weekly-full-1.incr/". Returns empty string if the destination is not incremental.

func (*BackupDestination) IsIncremental added in v1.1.0

func (dest *BackupDestination) IsIncremental() bool

func (*BackupDestination) PathWithoutBucket

func (dest *BackupDestination) PathWithoutBucket() string

func (*BackupDestination) SetAzureDestination

func (dest *BackupDestination) SetAzureDestination(container, backupName string)

func (*BackupDestination) SetGCSDestination

func (dest *BackupDestination) SetGCSDestination(bucket, backupName string)

func (*BackupDestination) SetS3Destination

func (dest *BackupDestination) SetS3Destination(bucket, backupName string)

func (*BackupDestination) StorageTypePrefix

func (dest *BackupDestination) StorageTypePrefix() string

func (*BackupDestination) String

func (dest *BackupDestination) String() string

type BackupSchedule

type BackupSchedule struct {
	// +kubebuilder:validation:Required
	Name string `json:"name,omitempty"`
	// +kubebuilder:validation:Required
	Schedule string `json:"schedule,omitempty"`
	Keep     int    `json:"keep,omitempty"`
	// +kubebuilder:validation:Required
	StorageName string `json:"storageName,omitempty"`
	// +kubebuilder:validation:Enum=full;incremental
	// +kubebuilder:default:=full
	Type BackupType `json:"type,omitempty"`
}

func (*BackupSchedule) DeepCopy

func (in *BackupSchedule) DeepCopy() *BackupSchedule

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

func (*BackupSchedule) DeepCopyInto

func (in *BackupSchedule) DeepCopyInto(out *BackupSchedule)

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

type BackupSpec

type BackupSpec struct {
	Enabled                  bool                          `json:"enabled,omitempty"`
	SourcePod                string                        `json:"sourcePod,omitempty"`
	Image                    string                        `json:"image,omitempty"`
	ImagePullSecrets         []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	ImagePullPolicy          corev1.PullPolicy             `json:"imagePullPolicy,omitempty"`
	ServiceAccountName       string                        `json:"serviceAccountName,omitempty"`
	ContainerSecurityContext *corev1.SecurityContext       `json:"containerSecurityContext,omitempty"`
	Resources                corev1.ResourceRequirements   `json:"resources,omitempty"`
	Storages                 map[string]*BackupStorageSpec `json:"storages,omitempty"`
	BackoffLimit             *int32                        `json:"backoffLimit,omitempty"`
	PiTR                     PiTRSpec                      `json:"pitr,omitempty"`
	Schedule                 []BackupSchedule              `json:"schedule,omitempty"`

	// Deprecated: not supported since v0.12.0. Use initContainer instead
	InitImage     string             `json:"initImage,omitempty"`
	InitContainer *InitContainerSpec `json:"initContainer,omitempty"`

	// EncryptionKeySecret is the secret key selector for the backup encryption key.
	EncryptionKeySecret *EncryptionKeySecretSelector `json:"encryptionKeySecret,omitempty"`
}

func (*BackupSpec) DeepCopy

func (in *BackupSpec) DeepCopy() *BackupSpec

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

func (*BackupSpec) DeepCopyInto

func (in *BackupSpec) DeepCopyInto(out *BackupSpec)

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

func (*BackupSpec) GetEncryptionEnabled added in v1.2.0

func (s *BackupSpec) GetEncryptionEnabled(storage *BackupStorageSpec) bool

func (*BackupSpec) GetInitSpec

func (s *BackupSpec) GetInitSpec(cr *PerconaServerMySQL) InitContainerSpec

type BackupState

type BackupState string
const (
	BackupNew       BackupState = ""
	BackupStarting  BackupState = "Starting"
	BackupRunning   BackupState = "Running"
	BackupSucceeded BackupState = "Succeeded"

	// Used for backups that failed to start at all
	BackupError BackupState = "Error"
	// Used for backups that started but failed
	BackupFailed BackupState = "Failed"
)

func (BackupState) IsTerminal added in v1.1.0

func (state BackupState) IsTerminal() bool

type BackupStorageAzureSpec

type BackupStorageAzureSpec struct {
	// A container name is a valid DNS name that conforms to the Azure naming rules.
	ContainerName BucketWithPrefix `json:"container"`

	// A prefix is a sub-folder to the backups inside the container
	Prefix string `json:"prefix,omitempty"`

	// A generated key that can be used to authorize access to data in your account using the Shared Key authorization.
	CredentialsSecret string `json:"credentialsSecret"`

	// The endpoint allows clients to securely access data
	EndpointURL string `json:"endpointUrl,omitempty"`

	// Hot (Frequently accessed or modified data), Cool (Infrequently accessed or modified data), Archive (Rarely accessed or modified data)
	StorageClass string `json:"storageClass,omitempty"`
}

func (*BackupStorageAzureSpec) ContainerAndPrefix

func (b *BackupStorageAzureSpec) ContainerAndPrefix() (string, string)

ContainerAndPrefix returns container name from ContainerName and backup prefix from ContainerName concatenated with Prefix. BackupStorageAzureSpec.ContainerName can contain backup path in format `<container-name>/<backup-prefix>`.

func (*BackupStorageAzureSpec) DeepCopy

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

func (*BackupStorageAzureSpec) DeepCopyInto

func (in *BackupStorageAzureSpec) DeepCopyInto(out *BackupStorageAzureSpec)

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

type BackupStorageGCSSpec

type BackupStorageGCSSpec struct {
	Bucket            BucketWithPrefix `json:"bucket"`
	Prefix            string           `json:"prefix,omitempty"`
	CredentialsSecret string           `json:"credentialsSecret"`
	EndpointURL       string           `json:"endpointUrl,omitempty"`

	// STANDARD, NEARLINE, COLDLINE, ARCHIVE
	StorageClass string `json:"storageClass,omitempty"`
}

func (*BackupStorageGCSSpec) BucketAndPrefix

func (b *BackupStorageGCSSpec) BucketAndPrefix() (string, string)

BucketAndPrefix returns bucket name and backup prefix from Bucket concatenated with Prefix. BackupStorageGCSSpec.Bucket can contain backup path in format `<bucket-name>/<backup-prefix>`.

func (*BackupStorageGCSSpec) DeepCopy

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

func (*BackupStorageGCSSpec) DeepCopyInto

func (in *BackupStorageGCSSpec) DeepCopyInto(out *BackupStorageGCSSpec)

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

type BackupStorageS3Spec

type BackupStorageS3Spec struct {
	Bucket            BucketWithPrefix `json:"bucket"`
	Prefix            string           `json:"prefix,omitempty"`
	CredentialsSecret string           `json:"credentialsSecret"`
	Region            string           `json:"region,omitempty"`
	EndpointURL       string           `json:"endpointUrl,omitempty"`
}

func (*BackupStorageS3Spec) BucketAndPrefix

func (b *BackupStorageS3Spec) BucketAndPrefix() (string, string)

BucketAndPrefix returns bucket name and backup prefix from Bucket concatenated with Prefix. BackupStorageS3Spec.Bucket can contain backup path in format `<bucket-name>/<backup-prefix>`.

func (*BackupStorageS3Spec) DeepCopy

func (in *BackupStorageS3Spec) DeepCopy() *BackupStorageS3Spec

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

func (*BackupStorageS3Spec) DeepCopyInto

func (in *BackupStorageS3Spec) DeepCopyInto(out *BackupStorageS3Spec)

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

type BackupStorageSpec

type BackupStorageSpec struct {
	Type                      BackupStorageType                 `json:"type"`
	Volume                    *VolumeSpec                       `json:"volumeSpec,omitempty"`
	S3                        *BackupStorageS3Spec              `json:"s3,omitempty"`
	GCS                       *BackupStorageGCSSpec             `json:"gcs,omitempty"`
	Azure                     *BackupStorageAzureSpec           `json:"azure,omitempty"`
	NodeSelector              map[string]string                 `json:"nodeSelector,omitempty"`
	Resources                 corev1.ResourceRequirements       `json:"resources,omitempty"`
	Affinity                  *corev1.Affinity                  `json:"affinity,omitempty"`
	TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
	Tolerations               []corev1.Toleration               `json:"tolerations,omitempty"`
	Annotations               map[string]string                 `json:"annotations,omitempty"`
	Labels                    map[string]string                 `json:"labels,omitempty"`
	SchedulerName             string                            `json:"schedulerName,omitempty"`
	PriorityClassName         string                            `json:"priorityClassName,omitempty"`
	PodSecurityContext        *corev1.PodSecurityContext        `json:"podSecurityContext,omitempty"`
	ContainerSecurityContext  *corev1.SecurityContext           `json:"containerSecurityContext,omitempty"`
	RuntimeClassName          *string                           `json:"runtimeClassName,omitempty"`
	VerifyTLS                 *bool                             `json:"verifyTLS,omitempty"`
	ContainerOptions          *BackupContainerOptions           `json:"containerOptions,omitempty"`

	// EncryptionKeySecret is the secret key selector for the backup encryption key.
	// This takes precedence over the encryption key secret in the backup spec.
	// +optional
	EncryptionKeySecret *EncryptionKeySecretSelector `json:"encryptionKeySecret,omitempty"`
}

func (*BackupStorageSpec) DeepCopy

func (in *BackupStorageSpec) DeepCopy() *BackupStorageSpec

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

func (*BackupStorageSpec) DeepCopyInto

func (in *BackupStorageSpec) DeepCopyInto(out *BackupStorageSpec)

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

func (*BackupStorageSpec) Equals added in v1.1.0

func (s *BackupStorageSpec) Equals(other *BackupStorageSpec) bool

type BackupStorageType

type BackupStorageType string
const (
	BackupStorageS3    BackupStorageType = "s3"
	BackupStorageGCS   BackupStorageType = "gcs"
	BackupStorageAzure BackupStorageType = "azure"
)

type BackupType added in v1.1.0

type BackupType string
const (
	BackupTypeFull        BackupType = "full"
	BackupTypeIncremental BackupType = "incremental"
)

type BinlogServerSpec

type BinlogServerSpec struct {
	Storage BinlogServerStorageSpec `json:"storage,omitempty"`

	// The number of seconds the MySQL client library will wait to establish a connection with a remote host
	// +kubebuilder:default=30
	ConnectTimeout int32 `json:"connectTimeout,omitempty"`
	// The number of seconds the MySQL client library will wait to read data from a remote server.
	// +kubebuilder:default=30
	ReadTimeout int32 `json:"readTimeout,omitempty"`
	// The number of seconds the MySQL client library will wait to write data to a remote server.
	// +kubebuilder:default=30
	WriteTimeout int32 `json:"writeTimeout,omitempty"`
	// Specifies the server ID that the utility will be using when connecting to a remote MySQL server
	ServerID int32 `json:"serverId,omitempty"`
	// The number of seconds the utility will spend in disconnected mode between reconnection attempts.
	// +kubebuilder:default=30
	IdleTime int32 `json:"idleTime,omitempty"`
	// SSLMode specifies the SSL mode for the connection to MySQL.
	// +kubebuilder:default="verify_identity"
	SSLMode string `json:"sslMode,omitempty"`
	// VerifyChecksum enables checksum verification during replication.
	// +kubebuilder:default=true
	VerifyChecksum *bool `json:"verifyChecksum,omitempty"`
	// RewriteFileSize specifies the maximum binlog file size for rewrite.
	// +kubebuilder:default="128M"
	RewriteFileSize string `json:"rewriteFileSize,omitempty"`
	// CheckpointSize specifies the storage checkpoint size.
	// +kubebuilder:default="16M"
	CheckpointSize string `json:"checkpointSize,omitempty"`
	// CheckpointInterval specifies the storage checkpoint interval.
	// +kubebuilder:default="30s"
	CheckpointInterval string `json:"checkpointInterval,omitempty"`
	// LogLevel specifies the log level.
	// +kubebuilder:default="info"
	LogLevel string `json:"logLevel,omitempty"`

	PodSpec `json:",inline"`
}

+kubebuilder:validation:XValidation:rule="!has(self.size) || self.size <= 1",message="binlogServer size cannot be more than 1"

func (*BinlogServerSpec) DeepCopy

func (in *BinlogServerSpec) DeepCopy() *BinlogServerSpec

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

func (*BinlogServerSpec) DeepCopyInto

func (in *BinlogServerSpec) DeepCopyInto(out *BinlogServerSpec)

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

func (*BinlogServerSpec) SetDefaults added in v1.2.0

func (s *BinlogServerSpec) SetDefaults()

type BinlogServerStorageSpec

type BinlogServerStorageSpec struct {
	S3 *BackupStorageS3Spec `json:"s3,omitempty"`
}

func (*BinlogServerStorageSpec) DeepCopy

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

func (*BinlogServerStorageSpec) DeepCopyInto

func (in *BinlogServerStorageSpec) DeepCopyInto(out *BinlogServerStorageSpec)

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

type BootstrapConfig added in v1.2.0

type BootstrapConfig struct {
	// +kubebuilder:validation:Enum=auto;manual
	// +kubebuilder:default=auto
	Mode *BootstrapMode `json:"mode,omitempty"`
}

func (*BootstrapConfig) DeepCopy added in v1.2.0

func (in *BootstrapConfig) DeepCopy() *BootstrapConfig

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

func (*BootstrapConfig) DeepCopyInto added in v1.2.0

func (in *BootstrapConfig) DeepCopyInto(out *BootstrapConfig)

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

type BootstrapMode added in v1.2.0

type BootstrapMode string
const (
	BootstrapModeAuto   BootstrapMode = "auto"
	BootstrapModeManual BootstrapMode = "manual"
)

type BucketWithPrefix

type BucketWithPrefix string

BucketWithPrefix contains a bucket name with or without a prefix in a format <bucket>/<prefix>

type ClusterSetCluster added in v1.2.0

type ClusterSetCluster struct {
	// InnoDBClusterName is the name of the InnoDB cluster that will be a member of this ClusterSet.
	// This name must be unique within the ClusterSet.
	//
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:XValidation:rule="self.matches('^[A-Za-z0-9]+$')",message="innodbClusterName must contain only alphanumeric characters"
	InnoDBClusterName string `json:"innodbClusterName"`
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinItems:=1
	// +kubebuilder:validation:MaxItems:=9
	Endpoints []ClusterSetClusterEndpoint `json:"endpoints"`
}

func (*ClusterSetCluster) DeepCopy added in v1.2.0

func (in *ClusterSetCluster) DeepCopy() *ClusterSetCluster

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

func (*ClusterSetCluster) DeepCopyInto added in v1.2.0

func (in *ClusterSetCluster) DeepCopyInto(out *ClusterSetCluster)

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

type ClusterSetClusterEndpoint added in v1.2.0

type ClusterSetClusterEndpoint struct {
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MaxLength=253
	// +kubebuilder:validation:XValidation:rule="isIP(self) || !format.dns1123Subdomain().validate(self).hasValue()",message="host must be a valid IP address or domain name"
	Host string `json:"host"`
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:=3306
	Port *int32 `json:"port,omitempty"`
}

func (*ClusterSetClusterEndpoint) DeepCopy added in v1.2.0

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

func (*ClusterSetClusterEndpoint) DeepCopyInto added in v1.2.0

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

func (*ClusterSetClusterEndpoint) GetPort added in v1.2.0

func (ep *ClusterSetClusterEndpoint) GetPort() int32

type ClusterSetClusterStatus added in v1.2.0

type ClusterSetClusterStatus struct {
	ClusterRole  string `json:"clusterRole"`
	GlobalStatus string `json:"globalStatus"`
	Primary      string `json:"primary"`
}

ClusterSetClusterStatus is the status of a single cluster in the cluster set. The shape of this object is derived from the output of `dba.getCluster().getClusterSet().status()` mysqlshell command.

func (*ClusterSetClusterStatus) DeepCopy added in v1.2.0

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

func (*ClusterSetClusterStatus) DeepCopyInto added in v1.2.0

func (in *ClusterSetClusterStatus) DeepCopyInto(out *ClusterSetClusterStatus)

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

type ClusterSetSSLMode added in v1.2.0

type ClusterSetSSLMode string
const (
	// TLS encryption will be enabled if supported by the instance, otherwise disabled.
	ClusterSetSSLModeAuto ClusterSetSSLMode = "AUTO"
	// TLS encryption will be disabled.
	ClusterSetSSLModeDisabled ClusterSetSSLMode = "DISABLED"
	// TLS encryption will be enabled.
	ClusterSetSSLModeRequired ClusterSetSSLMode = "REQUIRED"
	// Like REQUIRED, but additionally verify the peer server TLS certificate against the configured Certificate Authority (CA) certificates.
	// In this case, the replica and primary certificates must be signed by the same Certificate Authority (CA).
	ClusterSetSSLModeVerifyCA ClusterSetSSLMode = "VERIFY_CA"
	// Like VERIFY_CA, but additionally verify that the peer server certificate matches the host to which the connection is attempted.
	// The primary cluster's server cert must have a SAN matching the ClusterSetCluster.Endpoints[].Host value the replica connects to
	ClusterSetSSLModeVerifyIdentity ClusterSetSSLMode = "VERIFY_IDENTITY"
)

type ClusterSetStatus added in v1.2.0

type ClusterSetStatus map[string]ClusterSetClusterStatus

func (ClusterSetStatus) DeepCopy added in v1.2.0

func (in ClusterSetStatus) DeepCopy() ClusterSetStatus

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

func (ClusterSetStatus) DeepCopyInto added in v1.2.0

func (in ClusterSetStatus) DeepCopyInto(out *ClusterSetStatus)

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

type ClusterType

type ClusterType string
const (
	ClusterTypeGR    ClusterType = "group-replication"
	ClusterTypeAsync ClusterType = "async"
)

type ContainerSpec

type ContainerSpec struct {
	Image            string                        `json:"image,omitempty"`
	ImagePullPolicy  corev1.PullPolicy             `json:"imagePullPolicy,omitempty"`
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	Resources        corev1.ResourceRequirements   `json:"resources,omitempty"`

	StartupProbe   corev1.Probe `json:"startupProbe,omitempty"`
	ReadinessProbe corev1.Probe `json:"readinessProbe,omitempty"`
	LivenessProbe  corev1.Probe `json:"livenessProbe,omitempty"`

	ContainerSecurityContext *corev1.SecurityContext `json:"containerSecurityContext,omitempty"`

	Env     []corev1.EnvVar        `json:"env,omitempty"`
	EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`
}

func (*ContainerSpec) DeepCopy

func (in *ContainerSpec) DeepCopy() *ContainerSpec

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

func (*ContainerSpec) DeepCopyInto

func (in *ContainerSpec) DeepCopyInto(out *ContainerSpec)

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

type CreateReplicaClusterOptions added in v1.2.0

type CreateReplicaClusterOptions struct {
	// Preferred method for state recovery/provisioning.
	// Default is 'clone'.
	// Set this to 'incremental' when the cluster is seeded from an existing backup.
	//
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Enum=clone;incremental;auto
	// +kubebuilder:default:=clone
	RecoveryMethod RecoveryMethod `json:"recoveryMethod"`
}

func (*CreateReplicaClusterOptions) DeepCopy added in v1.2.0

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

func (*CreateReplicaClusterOptions) DeepCopyInto added in v1.2.0

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

type EncryptionKeySecretSelector added in v1.2.0

type EncryptionKeySecretSelector struct {
	// +kubebuilder:validation:Required
	Name string `json:"name"`

	// +kubebuilder:validation:Optional
	// +kubebuilder:default:=encryptionKey
	Key string `json:"key,omitempty"`
}

func (*EncryptionKeySecretSelector) DeepCopy added in v1.2.0

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

func (*EncryptionKeySecretSelector) DeepCopyInto added in v1.2.0

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

type HAProxySpec

type HAProxySpec struct {
	Enabled bool `json:"enabled,omitempty"`

	Expose ServiceExpose `json:"expose,omitempty"`

	PodSpec `json:",inline"`

	// SidecarResources defines resource limits and requests per sidecar container name
	// (e.g. "mysql-monit"). If a container is not listed, it runs without resource constraints.
	SidecarResources map[string]corev1.ResourceRequirements `json:"sidecarResources,omitempty"`
}

+kubebuilder:validation:XValidation:rule="!(has(self.enabled) && self.enabled) || (has(self.image) && size(self.image) > 0)",message="haproxy.image is required when haproxy is enabled" +kubebuilder:validation:XValidation:rule="!(has(self.enabled) && self.enabled) || (has(self.size) && self.size > 0)",message="haproxy.size must be greater than 0 when haproxy is enabled"

func (*HAProxySpec) DeepCopy

func (in *HAProxySpec) DeepCopy() *HAProxySpec

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

func (*HAProxySpec) DeepCopyInto

func (in *HAProxySpec) DeepCopyInto(out *HAProxySpec)

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

type InitContainerSpec

type InitContainerSpec struct {
	Image                    string                       `json:"image,omitempty"`
	Resources                *corev1.ResourceRequirements `json:"resources,omitempty"`
	ContainerSecurityContext *corev1.SecurityContext      `json:"containerSecurityContext,omitempty"`
}

func (*InitContainerSpec) DeepCopy

func (in *InitContainerSpec) DeepCopy() *InitContainerSpec

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

func (*InitContainerSpec) DeepCopyInto

func (in *InitContainerSpec) DeepCopyInto(out *InitContainerSpec)

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

type Metadata

type Metadata struct {
	// Map of string keys and values that can be used to organize and categorize
	// (scope and select) objects. May match selectors of replication controllers
	// and services.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
	// +optional
	Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"`

	// Annotations is an unstructured key value map stored with a resource that may be
	// set by external tools to store and retrieve arbitrary metadata. They are not
	// queryable and should be preserved when modifying objects.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations
	// +optional
	Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"`
}

func (*Metadata) DeepCopy

func (in *Metadata) DeepCopy() *Metadata

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

func (*Metadata) DeepCopyInto

func (in *Metadata) DeepCopyInto(out *Metadata)

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

type MySQLRouterSpec

type MySQLRouterSpec struct {
	Enabled bool `json:"enabled,omitempty"`

	Expose ServiceExpose `json:"expose,omitempty"`

	Ports []corev1.ServicePort `json:"ports,omitempty"`

	PodSpec `json:",inline"`
}

+kubebuilder:validation:XValidation:rule="!(has(self.enabled) && self.enabled) || (has(self.image) && size(self.image) > 0)",message="router.image is required when router is enabled" +kubebuilder:validation:XValidation:rule="!(has(self.enabled) && self.enabled) || (has(self.size) && self.size > 0)",message="router.size must be greater than 0 when router is enabled"

func (*MySQLRouterSpec) DeepCopy

func (in *MySQLRouterSpec) DeepCopy() *MySQLRouterSpec

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

func (*MySQLRouterSpec) DeepCopyInto

func (in *MySQLRouterSpec) DeepCopyInto(out *MySQLRouterSpec)

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

type MySQLShellRunnerSpec added in v1.2.0

type MySQLShellRunnerSpec struct {
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	Image string `json:"image"`
}

func (*MySQLShellRunnerSpec) DeepCopy added in v1.2.0

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

func (*MySQLShellRunnerSpec) DeepCopyInto added in v1.2.0

func (in *MySQLShellRunnerSpec) DeepCopyInto(out *MySQLShellRunnerSpec)

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

type MySQLSpec

type MySQLSpec struct {
	// +kubebuilder:validation:Enum=group-replication;async
	// +kubebuilder:default=group-replication
	ClusterType   ClusterType            `json:"clusterType,omitempty"`
	Bootstrap     BootstrapConfig        `json:"bootstrap,omitempty"`
	ExposePrimary ServiceExposeTogglable `json:"exposePrimary,omitempty"`
	Expose        ServiceExposeTogglable `json:"expose,omitempty"`
	AutoRecovery  bool                   `json:"autoRecovery,omitempty"`

	Sidecars       []corev1.Container `json:"sidecars,omitempty"`
	SidecarVolumes []corev1.Volume    `json:"sidecarVolumes,omitempty"`
	SidecarPVCs    []SidecarPVC       `json:"sidecarPVCs,omitempty"`

	VaultSecretName string `json:"vaultSecretName,omitempty"`

	VolumeSpec *VolumeSpec `json:"volumeSpec,omitempty"`

	PodSpec `json:",inline"`
}

+kubebuilder:validation:XValidation:rule="has(self.image) && size(self.image) > 0",message="mysql.image is required" +kubebuilder:validation:XValidation:rule="has(self.size) && self.size > 0",message="mysql.size must be greater than 0"

func (*MySQLSpec) DeepCopy

func (in *MySQLSpec) DeepCopy() *MySQLSpec

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

func (*MySQLSpec) DeepCopyInto

func (in *MySQLSpec) DeepCopyInto(out *MySQLSpec)

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

func (MySQLSpec) IsAsync

func (m MySQLSpec) IsAsync() bool

Checks if the MySQL cluster type is asynchronous.

func (MySQLSpec) IsGR

func (m MySQLSpec) IsGR() bool

Checks if the MySQL cluster type is Group Replication (GR).

type OrchestratorSpec

type OrchestratorSpec struct {
	Enabled bool          `json:"enabled,omitempty"`
	Expose  ServiceExpose `json:"expose,omitempty"`

	PodSpec `json:",inline"`
}

+kubebuilder:validation:XValidation:rule="!(has(self.enabled) && self.enabled) || (has(self.image) && size(self.image) > 0)",message="orchestrator.image is required when orchestrator is enabled" +kubebuilder:validation:XValidation:rule="!(has(self.enabled) && self.enabled) || (has(self.size) && self.size > 0)",message="orchestrator.size must be greater than 0 when orchestrator is enabled"

func (*OrchestratorSpec) DeepCopy

func (in *OrchestratorSpec) DeepCopy() *OrchestratorSpec

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

func (*OrchestratorSpec) DeepCopyInto

func (in *OrchestratorSpec) DeepCopyInto(out *OrchestratorSpec)

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

type PITRType added in v1.1.0

type PITRType string
const (
	PITRGtid PITRType = "gtid"
	PITRDate PITRType = "date"
)

type PMMSpec

type PMMSpec struct {
	Enabled                  bool                        `json:"enabled,omitempty"`
	Image                    string                      `json:"image,omitempty"`
	MySQLParams              string                      `json:"mysqlParams,omitempty"`
	ServerHost               string                      `json:"serverHost,omitempty"`
	CustomClusterName        string                      `json:"customClusterName,omitempty"`
	Resources                corev1.ResourceRequirements `json:"resources,omitempty"`
	ContainerSecurityContext *corev1.SecurityContext     `json:"containerSecurityContext,omitempty"`
	ImagePullPolicy          corev1.PullPolicy           `json:"imagePullPolicy,omitempty"`
	LivenessProbe            *corev1.Probe               `json:"livenessProbe,omitempty"`
	ReadinessProbe           *corev1.Probe               `json:"readinessProbe,omitempty"`
}

+kubebuilder:validation:XValidation:rule="!(has(self.enabled) && self.enabled) || (has(self.image) && size(self.image) > 0)",message="pmm.image is required when pmm is enabled"

func (*PMMSpec) DeepCopy

func (in *PMMSpec) DeepCopy() *PMMSpec

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

func (*PMMSpec) DeepCopyInto

func (in *PMMSpec) DeepCopyInto(out *PMMSpec)

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

func (*PMMSpec) HasSecret

func (pmm *PMMSpec) HasSecret(secret *corev1.Secret) bool

HasSecret determines if the provided secret contains the necessary PMM server key.

type PerconaServerMySQL

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

	Spec PerconaServerMySQLSpec `json:"spec,omitempty"`

	Status PerconaServerMySQLStatus `json:"status,omitempty"` // Make sure that the Status is updated after making changes. See the description of `(*PerconaServerMySQLReconciler) reconcileCRStatus` method for details.
}

PerconaServerMySQL is the Schema for the perconaservermysqls API +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Replication",type=string,JSONPath=".spec.mysql.clusterType" +kubebuilder:printcolumn:name="Endpoint",type=string,JSONPath=".status.host" +kubebuilder:printcolumn:name="State",type=string,JSONPath=".status.state" +kubebuilder:printcolumn:name="MySQL",type=string,JSONPath=".status.mysql.ready" +kubebuilder:printcolumn:name="Orchestrator",type=string,JSONPath=".status.orchestrator.ready" +kubebuilder:printcolumn:name="HAProxy",type=string,JSONPath=".status.haproxy.ready" +kubebuilder:printcolumn:name="Router",type=string,JSONPath=".status.router.ready" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:scope=Namespaced +kubebuilder:resource:shortName=ps

func (*PerconaServerMySQL) BootstrapMode added in v1.2.0

func (cr *PerconaServerMySQL) BootstrapMode() BootstrapMode

func (*PerconaServerMySQL) CanBackup added in v1.1.0

func (cr *PerconaServerMySQL) CanBackup() error

func (*PerconaServerMySQL) CheckNSetDefaults

func (cr *PerconaServerMySQL) CheckNSetDefaults(_ context.Context, serverVersion *platform.ServerVersion) error

CheckNSetDefaults validates and sets default values for the PerconaServerMySQL custom resource.

func (*PerconaServerMySQL) ClusterHash

func (cr *PerconaServerMySQL) ClusterHash() string

ClusterHash returns FNV hash of the CustomResource UID

func (*PerconaServerMySQL) ClusterHint

func (cr *PerconaServerMySQL) ClusterHint() string

ClusterHint generates a unique identifier for the PerconaServerMySQL cluster using its name and namespace.

func (*PerconaServerMySQL) CompareVersion

func (cr *PerconaServerMySQL) CompareVersion(ver string) int

CompareVersion compares given version to current version. Returns -1, 0, or 1 if given version is smaller, equal, or larger than the current version, respectively.

func (*PerconaServerMySQL) DeepCopy

func (in *PerconaServerMySQL) DeepCopy() *PerconaServerMySQL

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

func (*PerconaServerMySQL) DeepCopyInto

func (in *PerconaServerMySQL) DeepCopyInto(out *PerconaServerMySQL)

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

func (*PerconaServerMySQL) DeepCopyObject

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

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

func (*PerconaServerMySQL) DefaultSSLSecretName added in v1.2.0

func (cr *PerconaServerMySQL) DefaultSSLSecretName() string

func (*PerconaServerMySQL) DefaultSecretName added in v1.2.0

func (cr *PerconaServerMySQL) DefaultSecretName() string

func (*PerconaServerMySQL) GlobalAnnotations

func (cr *PerconaServerMySQL) GlobalAnnotations() map[string]string

func (*PerconaServerMySQL) GlobalLabels

func (cr *PerconaServerMySQL) GlobalLabels() map[string]string

func (*PerconaServerMySQL) HAProxyEnabled

func (cr *PerconaServerMySQL) HAProxyEnabled() bool

HAProxyEnabled verifies if HAProxy is enabled based on MySQL configuration and safety settings.

func (*PerconaServerMySQL) InnoDBClusterName

func (cr *PerconaServerMySQL) InnoDBClusterName() string

Generates a cluster name by sanitizing the PerconaServerMySQL name.

func (*PerconaServerMySQL) InternalSecretName

func (cr *PerconaServerMySQL) InternalSecretName() string

InternalSecretName generates a name for the internal secret based on the PerconaServerMySQL name.

func (*PerconaServerMySQL) IsAwaitingExternalBootstrap added in v1.2.0

func (cr *PerconaServerMySQL) IsAwaitingExternalBootstrap() bool

func (*PerconaServerMySQL) IsOrchestratorEnabled added in v1.2.0

func (cr *PerconaServerMySQL) IsOrchestratorEnabled() bool

func (*PerconaServerMySQL) Labels

func (cr *PerconaServerMySQL) Labels(name, component string) map[string]string

Labels returns a standardized set of labels for the PerconaServerMySQL custom resource.

func (*PerconaServerMySQL) MySQLSpec

func (cr *PerconaServerMySQL) MySQLSpec() *MySQLSpec

MySQLSpec returns the MySQL specification from the PerconaServerMySQL custom resource.

func (*PerconaServerMySQL) OrchestratorEnabled

func (cr *PerconaServerMySQL) OrchestratorEnabled() bool

OrchestratorEnabled determines if the orchestrator is enabled, considering the MySQL configuration.

func (*PerconaServerMySQL) OrchestratorSpec

func (cr *PerconaServerMySQL) OrchestratorSpec() *OrchestratorSpec

OrchestratorSpec returns the Orchestrator specification from the PerconaServerMySQL custom resource.

func (*PerconaServerMySQL) PMMEnabled

func (cr *PerconaServerMySQL) PMMEnabled(secret *corev1.Secret) bool

PMMEnabled checks if PMM is enabled and if the provided secret contains PMM-specific data.

func (*PerconaServerMySQL) PMMSpec

func (cr *PerconaServerMySQL) PMMSpec() *PMMSpec

PMMSpec returns the PMM specification from the PerconaServerMySQL custom resource.

func (*PerconaServerMySQL) PVCResizeInProgress

func (cr *PerconaServerMySQL) PVCResizeInProgress() bool

func (*PerconaServerMySQL) PiTREnabled added in v1.2.0

func (cr *PerconaServerMySQL) PiTREnabled() bool

PiTREnabled reports whether point-in-time recovery is fully configured: a backup spec exists, PiTR is enabled, and a binlog server is defined.

func (*PerconaServerMySQL) RouterEnabled

func (cr *PerconaServerMySQL) RouterEnabled() bool

RouterEnabled checks if the router is enabled, considering the MySQL configuration.

func (*PerconaServerMySQL) Version

func (cr *PerconaServerMySQL) Version() *v.Version

type PerconaServerMySQLBackup

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

	Spec   PerconaServerMySQLBackupSpec   `json:"spec,omitempty"`
	Status PerconaServerMySQLBackupStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Type",type=string,JSONPath=".status.type" +kubebuilder:printcolumn:name="Storage",type=string,JSONPath=".spec.storageName" +kubebuilder:printcolumn:name="Destination",type=string,JSONPath=".status.destination" +kubebuilder:printcolumn:name="State",type=string,JSONPath=".status.state" +kubebuilder:printcolumn:name="Completed",type="date",JSONPath=".status.completed" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:scope=Namespaced +kubebuilder:resource:shortName=ps-backup;ps-backups PerconaServerMySQLBackup is the Schema for the perconaservermysqlbackups API

func (*PerconaServerMySQLBackup) DeepCopy

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

func (*PerconaServerMySQLBackup) DeepCopyInto

func (in *PerconaServerMySQLBackup) DeepCopyInto(out *PerconaServerMySQLBackup)

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

func (*PerconaServerMySQLBackup) DeepCopyObject

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

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

func (*PerconaServerMySQLBackup) GetContainerOptions added in v1.0.0

func (b *PerconaServerMySQLBackup) GetContainerOptions(storage *BackupStorageSpec) *BackupContainerOptions

func (*PerconaServerMySQLBackup) GetType added in v1.1.0

func (b *PerconaServerMySQLBackup) GetType() BackupType

func (*PerconaServerMySQLBackup) Hash

func (b *PerconaServerMySQLBackup) Hash() string

Hash returns FNV hash of the PerconaServerMySQLBackup UID

func (*PerconaServerMySQLBackup) IsCompressed added in v1.1.0

func (b *PerconaServerMySQLBackup) IsCompressed(storage *BackupStorageSpec, mysqlConfiguration string) bool

IsCompressed reports whether compression is enabled via xtrabackup args or via the [xtrabackup] section of the MySQL configuration.

func (*PerconaServerMySQLBackup) Labels

func (b *PerconaServerMySQLBackup) Labels(name, component string) map[string]string

Labels returns a standardized set of labels for the PerconaServerMySQLBackup custom resource.

type PerconaServerMySQLBackupList

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

PerconaServerMySQLBackupList contains a list of PerconaServerMySQLBackup

func (*PerconaServerMySQLBackupList) DeepCopy

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

func (*PerconaServerMySQLBackupList) DeepCopyInto

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

func (*PerconaServerMySQLBackupList) DeepCopyObject

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

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

type PerconaServerMySQLBackupSpec

type PerconaServerMySQLBackupSpec struct {
	// +kubebuilder:validation:Enum=full;incremental
	// +kubebuilder:default:=full
	Type             BackupType              `json:"type,omitempty"`
	ClusterName      string                  `json:"clusterName"`
	StorageName      string                  `json:"storageName"`
	SourcePod        string                  `json:"sourcePod,omitempty"`
	ContainerOptions *BackupContainerOptions `json:"containerOptions,omitempty"`

	// Name of the base (full) backup for incremental backups
	// Only used for incremental backups
	// When set, the incremental backup will be deleted if the base backup is deleted
	// If unset, uses the latest full backup as the base.
	IncrementalBaseBackupName *string `json:"incrementalBaseBackupName,omitempty"`
}

PerconaServerMySQLBackupSpec defines the desired state of PerconaServerMySQLBackup +kubebuilder:validation:XValidation:rule="!has(self.incrementalBaseBackupName) || self.incrementalBaseBackupName == \"\" || self.type == 'incremental'",message="Invalid configuration: incrementalBaseBackupName is only allowed for incremental backups"

func (*PerconaServerMySQLBackupSpec) DeepCopy

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

func (*PerconaServerMySQLBackupSpec) DeepCopyInto

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

type PerconaServerMySQLBackupStatus

type PerconaServerMySQLBackupStatus struct {
	Type         BackupType         `json:"type,omitempty"`
	State        BackupState        `json:"state,omitempty"`
	StateDesc    string             `json:"stateDescription,omitempty"`
	Destination  BackupDestination  `json:"destination,omitempty"`
	Storage      *BackupStorageSpec `json:"storage,omitempty"`
	CompletedAt  *metav1.Time       `json:"completed,omitempty"`
	Image        string             `json:"image,omitempty"`
	BackupSource string             `json:"backupSource,omitempty"`
	Compressed   bool               `json:"compressed,omitempty"`
	Conditions   []metav1.Condition `json:"conditions,omitempty"`
}

PerconaServerMySQLBackupStatus defines the observed state of PerconaServerMySQLBackup

func (*PerconaServerMySQLBackupStatus) DeepCopy

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

func (*PerconaServerMySQLBackupStatus) DeepCopyInto

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

func (*PerconaServerMySQLBackupStatus) Equals added in v1.1.0

type PerconaServerMySQLClusterSet added in v1.2.0

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

	Spec   PerconaServerMySQLClusterSetSpec   `json:"spec,omitempty"`
	Status PerconaServerMySQLClusterSetStatus `json:"status,omitempty"`
}

PerconaServerMySQLClusterSet is the Schema for the perconaservermysqlclustersets API +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Namespaced +kubebuilder:resource:shortName=ps-clusterset +kubebuilder:printcolumn:name="Primary",type=string,JSONPath=".status.primaryCluster" +kubebuilder:printcolumn:name="Endpoint",type=string,JSONPath=".status.primaryClusterEndpoint" +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=".status.conditions[?(@.type=='Ready')].status"

func (*PerconaServerMySQLClusterSet) DeepCopy added in v1.2.0

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

func (*PerconaServerMySQLClusterSet) DeepCopyInto added in v1.2.0

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

func (*PerconaServerMySQLClusterSet) DeepCopyObject added in v1.2.0

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

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

func (*PerconaServerMySQLClusterSet) GetCluster added in v1.2.0

func (psc *PerconaServerMySQLClusterSet) GetCluster(name string) *ClusterSetCluster

func (*PerconaServerMySQLClusterSet) PrimaryCluster added in v1.2.0

func (psc *PerconaServerMySQLClusterSet) PrimaryCluster() *ClusterSetCluster

func (*PerconaServerMySQLClusterSet) SetDefaults added in v1.2.0

func (pcs *PerconaServerMySQLClusterSet) SetDefaults()

func (*PerconaServerMySQLClusterSet) UpdateStatus added in v1.2.0

type PerconaServerMySQLClusterSetList added in v1.2.0

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

PerconaServerMySQLClusterSetList contains a list of PerconaServerMySQLClusterSet

func (*PerconaServerMySQLClusterSetList) DeepCopy added in v1.2.0

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

func (*PerconaServerMySQLClusterSetList) DeepCopyInto added in v1.2.0

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

func (*PerconaServerMySQLClusterSetList) DeepCopyObject added in v1.2.0

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

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

type PerconaServerMySQLClusterSetSpec added in v1.2.0

type PerconaServerMySQLClusterSetSpec struct {
	// PrimaryCluster is the desired primary cluster of the ClusterSet.
	// This is the cluster that will serve writes, and replica members will connect to.
	//
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:XValidation:rule="self.matches('^[A-Za-z0-9]+$')",message="primaryCluster must contain only alphanumeric characters"
	PrimaryCluster string `json:"primaryCluster"`

	// UnsafeClusterSetFlags is the configuration for the unsafe cluster set flags.
	// +kubebuilder:validation:Optional
	UnsafeClusterSetFlags *UnsafeClusterSetFlags `json:"unsafeFlags,omitempty"`

	// SSLMode is the desired SSL mode of the ClusterSet.
	//
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Enum=AUTO;DISABLED;REQUIRED;VERIFY_CA;VERIFY_IDENTITY
	// +kubebuilder:default:=AUTO
	SSLMode *ClusterSetSSLMode `json:"sslMode,omitempty"`

	// CredentialsSecret is the secret containing the credentials for the ClusterSet.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:XValidation:rule="has(self.name) && self.name != ”",message="credentialsSecret.name must be set"
	CredentialsSecret corev1.SecretKeySelector `json:"credentialsSecret"`

	// Clusters is the list of member clusters in the ClusterSet.
	// At least one cluster must be specified (the primary).
	//
	// +listType=map
	// +listMapKey=innodbClusterName
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinItems:=1
	// +kubebuilder:validation:MaxItems:=10
	// +kubebuilder:validation:XValidation:rule="self.all(c, self.exists_one(d, d.innodbClusterName == c.innodbClusterName))",message="cluster names must be unique"
	Clusters []ClusterSetCluster `json:"clusters"`

	// CreateReplicaClusterOptions is the configuration for the creation of a replica cluster.
	// +kubebuilder:validation:Optional
	CreateReplicaClusterOptions CreateReplicaClusterOptions `json:"createReplicaClusterOptions"`

	// MysqlShellRunner is the configuration for the MySQL shell runner.
	// +kubebuilder:validation:Required
	MySQLShellRunner MySQLShellRunnerSpec `json:"mysqlshellRunner"`
}

func (*PerconaServerMySQLClusterSetSpec) DeepCopy added in v1.2.0

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

func (*PerconaServerMySQLClusterSetSpec) DeepCopyInto added in v1.2.0

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

type PerconaServerMySQLClusterSetStatus added in v1.2.0

type PerconaServerMySQLClusterSetStatus struct {
	PrimaryCluster         string             `json:"primaryCluster"`
	PrimaryClusterEndpoint string             `json:"primaryClusterEndpoint"`
	Conditions             []metav1.Condition `json:"conditions,omitempty"`
	Clusters               ClusterSetStatus   `json:"clusters,omitempty"`
	ObservedGeneration     int64              `json:"lastObservedGeneration,omitempty"`
	LastObservedAt         metav1.Time        `json:"lastObservedAt,omitempty"`
}

func (*PerconaServerMySQLClusterSetStatus) DeepCopy added in v1.2.0

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

func (*PerconaServerMySQLClusterSetStatus) DeepCopyInto added in v1.2.0

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

type PerconaServerMySQLList

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

PerconaServerMySQLList contains a list of PerconaServerMySQL

func (*PerconaServerMySQLList) DeepCopy

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

func (*PerconaServerMySQLList) DeepCopyInto

func (in *PerconaServerMySQLList) DeepCopyInto(out *PerconaServerMySQLList)

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

func (*PerconaServerMySQLList) DeepCopyObject

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

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

type PerconaServerMySQLRestore

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

	Spec   PerconaServerMySQLRestoreSpec   `json:"spec,omitempty"`
	Status PerconaServerMySQLRestoreStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Namespaced +kubebuilder:resource:shortName=ps-restore +kubebuilder:printcolumn:name="State",type=string,JSONPath=".status.state" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" PerconaServerMySQLRestore is the Schema for the perconaservermysqlrestores API

func (*PerconaServerMySQLRestore) DeepCopy

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

func (*PerconaServerMySQLRestore) DeepCopyInto

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

func (*PerconaServerMySQLRestore) DeepCopyObject

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

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

func (*PerconaServerMySQLRestore) GetContainerOptions added in v1.0.0

func (r *PerconaServerMySQLRestore) GetContainerOptions(storage *BackupStorageSpec) *BackupContainerOptions

func (*PerconaServerMySQLRestore) Labels

func (r *PerconaServerMySQLRestore) Labels(name, component string) map[string]string

Labels returns a standardized set of labels for the PerconaServerMySQLRestore custom resource.

type PerconaServerMySQLRestoreList

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

PerconaServerMySQLRestoreList contains a list of PerconaServerMySQLRestore

func (*PerconaServerMySQLRestoreList) DeepCopy

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

func (*PerconaServerMySQLRestoreList) DeepCopyInto

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

func (*PerconaServerMySQLRestoreList) DeepCopyObject

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

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

type PerconaServerMySQLRestoreSpec

type PerconaServerMySQLRestoreSpec struct {
	ClusterName      string                          `json:"clusterName"`
	BackupName       string                          `json:"backupName,omitempty"`
	BackupSource     *PerconaServerMySQLBackupStatus `json:"backupSource,omitempty"`
	ContainerOptions *BackupContainerOptions         `json:"containerOptions,omitempty"`
	PITR             *RestorePITRSpec                `json:"pitr,omitempty"`
}

PerconaServerMySQLRestoreSpec defines the desired state of PerconaServerMySQLRestore

func (*PerconaServerMySQLRestoreSpec) DeepCopy

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

func (*PerconaServerMySQLRestoreSpec) DeepCopyInto

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

type PerconaServerMySQLRestoreStatus

type PerconaServerMySQLRestoreStatus struct {
	State       RestoreState `json:"state,omitempty"`
	StateDesc   string       `json:"stateDescription,omitempty"`
	CompletedAt *metav1.Time `json:"completed,omitempty"`
}

PerconaServerMySQLRestoreStatus defines the observed state of PerconaServerMySQLRestore

func (*PerconaServerMySQLRestoreStatus) DeepCopy

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

func (*PerconaServerMySQLRestoreStatus) DeepCopyInto

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

type PerconaServerMySQLSpec

type PerconaServerMySQLSpec struct {
	Metadata  *Metadata `json:"metadata,omitempty"`
	CRVersion string    `json:"crVersion,omitempty"`
	Pause     bool      `json:"pause,omitempty"`
	// Deprecated: use `.spec.storageScaling.enableVolumeScaling` instead.
	VolumeExpansionEnabled  bool                                 `json:"enableVolumeExpansion,omitempty"`
	StorageScaling          *StorageScalingSpec                  `json:"storageScaling,omitempty"`
	SecretsName             string                               `json:"secretsName,omitempty"`
	SSLSecretName           string                               `json:"sslSecretName,omitempty"`
	Unsafe                  UnsafeFlags                          `json:"unsafeFlags,omitempty"`
	IgnoreAnnotations       []string                             `json:"ignoreAnnotations,omitempty"`
	IgnoreLabels            []string                             `json:"ignoreLabels,omitempty"`
	MySQL                   MySQLSpec                            `json:"mysql,omitempty"`
	Orchestrator            OrchestratorSpec                     `json:"orchestrator,omitempty"`
	PMM                     *PMMSpec                             `json:"pmm,omitempty"`
	Backup                  *BackupSpec                          `json:"backup,omitempty"`
	Proxy                   ProxySpec                            `json:"proxy,omitempty"`
	TLS                     *TLSSpec                             `json:"tls,omitempty"`
	Toolkit                 *ToolkitSpec                         `json:"toolkit,omitempty"`
	UpgradeOptions          UpgradeOptions                       `json:"upgradeOptions,omitempty"`
	UpdateStrategy          appsv1.StatefulSetUpdateStrategyType `json:"updateStrategy,omitempty"`
	ClusterServiceDNSSuffix string                               `json:"clusterServiceDNSSuffix,omitempty"`

	// Deprecated: not supported since v0.12.0. Use initContainer instead
	InitImage     string            `json:"initImage,omitempty"`
	InitContainer InitContainerSpec `json:"initContainer,omitempty"`
}

PerconaServerMySQLSpec defines the desired state of PerconaServerMySQL +kubebuilder:validation:XValidation:rule="!(self.mysql.clusterType == 'async') || self.unsafeFlags.orchestrator || self.orchestrator.enabled",message="Invalid configuration: When 'mysql.clusterType' is set to 'async', 'orchestrator.enabled' must be true unless 'unsafeFlags.orchestrator' is enabled" +kubebuilder:validation:XValidation:rule="!(self.mysql.clusterType == 'async') || self.unsafeFlags.proxy || self.proxy.haproxy.enabled",message="Invalid configuration: When 'mysql.clusterType' is set to 'async', 'proxy.haproxy.enabled' must be true unless 'unsafeFlags.proxy' is enabled" +kubebuilder:validation:XValidation:rule="!(self.mysql.clusterType == 'async') || self.proxy.router == null || !has(self.proxy.router.enabled) || !self.proxy.router.enabled",message="Invalid configuration: When 'mysql.clusterType' is set to 'async', 'proxy.router.enabled' must be disabled" +kubebuilder:validation:XValidation:rule="!(has(self.mysql.size) && self.mysql.size < 3) || self.unsafeFlags.mysqlSize",message="Invalid configuration: Scaling MySQL replicas below 3 requires 'unsafeFlags.mysqlSize: true'" +kubebuilder:validation:XValidation:rule="!(self.mysql.clusterType == 'group-replication' && has(self.mysql.size) && self.mysql.size >= 9) || self.unsafeFlags.mysqlSize",message="Invalid configuration: For 'group replication', scaling MySQL replicas above 9 requires 'unsafeFlags.mysqlSize: true'" +kubebuilder:validation:XValidation:rule="!(self.mysql.clusterType == 'group-replication' && has(self.mysql.size) && self.mysql.size % 2 == 0) || self.unsafeFlags.mysqlSize",message="Invalid configuration: For 'group replication', using an even number of MySQL replicas requires 'unsafeFlags.mysqlSize: true'" +kubebuilder:validation:XValidation:rule="!(self.mysql.clusterType == 'group-replication') || self.unsafeFlags.proxy || self.proxy.router.enabled || self.proxy.haproxy.enabled",message="Invalid configuration: For 'group replication', MySQL Router or HAProxy must be enabled unless 'unsafeFlags.proxy' is enabled" +kubebuilder:validation:XValidation:rule="!(self.mysql.clusterType == 'group-replication' && self.proxy.router.enabled && has(self.proxy.router.size) && self.proxy.router.size < 2) || self.unsafeFlags.proxySize",message="Invalid configuration: For 'group replication', Router size must be 2 or greater unless 'unsafeFlags.proxySize' is enabled" +kubebuilder:validation:XValidation:rule="!(self.mysql.clusterType == 'group-replication' && has(self.mysql.size) && self.mysql.size < 3) || self.unsafeFlags.mysqlSize",message="Invalid configuration: For 'group replication', MySQL size must be 3 or greater unless 'unsafeFlags.mysqlSize' is enabled" +kubebuilder:validation:XValidation:rule="!(self.mysql.clusterType == 'async' && has(self.orchestrator.size) && (self.orchestrator.size < 3 || self.orchestrator.size % 2 == 0) && self.orchestrator.size > 0) || self.unsafeFlags.orchestratorSize",message="Invalid configuration: For 'async' replication, Orchestrator size must be 3 or greater and odd unless 'unsafeFlags.orchestratorSize' is enabled" +kubebuilder:validation:XValidation:rule="!(self.mysql.clusterType == 'async' && self.updateStrategy == 'SmartUpdate') || self.orchestrator.enabled",message="Invalid configuration: For 'async' replication, SmartUpdate requires Orchestrator to be enabled" +kubebuilder:validation:XValidation:rule="!(self.proxy.router != null && has(self.proxy.router.enabled) && self.proxy.router.enabled && self.proxy.haproxy != null && has(self.proxy.haproxy.enabled) && self.proxy.haproxy.enabled)",message="Invalid configuration: MySQL Router and HAProxy can't be enabled at the same time"

func (*PerconaServerMySQLSpec) DeepCopy

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

func (*PerconaServerMySQLSpec) DeepCopyInto

func (in *PerconaServerMySQLSpec) DeepCopyInto(out *PerconaServerMySQLSpec)

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

func (*PerconaServerMySQLSpec) IsVolumeExpansionEnabled added in v1.2.0

func (spec *PerconaServerMySQLSpec) IsVolumeExpansionEnabled() bool

IsVolumeExpansionEnabled returns whether volume expansion is enabled.

func (*PerconaServerMySQLSpec) StorageAutoscaling added in v1.2.0

func (spec *PerconaServerMySQLSpec) StorageAutoscaling() *AutoscalingSpec

StorageAutoscaling returns the storage autoscaling configuration, if any.

type PerconaServerMySQLStatus

type PerconaServerMySQLStatus struct {
	// Important: Run "make" to regenerate code after modifying this file
	MySQL          StatefulAppStatus  `json:"mysql,omitempty"`
	Orchestrator   StatefulAppStatus  `json:"orchestrator,omitempty"`
	HAProxy        StatefulAppStatus  `json:"haproxy,omitempty"`
	Router         StatefulAppStatus  `json:"router,omitempty"`
	BinlogServer   StatefulAppStatus  `json:"binlogServer,omitempty"`
	State          StatefulAppState   `json:"state,omitempty"`
	BackupVersion  string             `json:"backupVersion,omitempty"`
	PMMVersion     string             `json:"pmmVersion,omitempty"`
	ToolkitVersion string             `json:"toolkitVersion,omitempty"`
	Conditions     []metav1.Condition `json:"conditions,omitempty"`
	// +optional
	Host               string                              `json:"host"`
	InnoDBClusterName  string                              `json:"innodbClusterName,omitempty"`
	StorageAutoscaling map[string]StorageAutoscalingStatus `json:"storageAutoscaling,omitempty"`
}

PerconaServerMySQLStatus defines the observed state of PerconaServerMySQL

func (*PerconaServerMySQLStatus) CompareMySQLVersion

func (s *PerconaServerMySQLStatus) CompareMySQLVersion(ver string) int

func (*PerconaServerMySQLStatus) DeepCopy

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

func (*PerconaServerMySQLStatus) DeepCopyInto

func (in *PerconaServerMySQLStatus) DeepCopyInto(out *PerconaServerMySQLStatus)

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

type PiTRSpec

type PiTRSpec struct {
	Enabled bool `json:"enabled,omitempty"`

	BinlogServer *BinlogServerSpec `json:"binlogServer,omitempty"`
}

func (*PiTRSpec) DeepCopy

func (in *PiTRSpec) DeepCopy() *PiTRSpec

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

func (*PiTRSpec) DeepCopyInto

func (in *PiTRSpec) DeepCopyInto(out *PiTRSpec)

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

type PodAffinity

type PodAffinity struct {
	TopologyKey *string          `json:"antiAffinityTopologyKey,omitempty"`
	Advanced    *corev1.Affinity `json:"advanced,omitempty"`
}

func (*PodAffinity) DeepCopy

func (in *PodAffinity) DeepCopy() *PodAffinity

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

func (*PodAffinity) DeepCopyInto

func (in *PodAffinity) DeepCopyInto(out *PodAffinity)

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

type PodDisruptionBudgetSpec

type PodDisruptionBudgetSpec struct {
	MinAvailable   *intstr.IntOrString `json:"minAvailable,omitempty"`
	MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
}

func (*PodDisruptionBudgetSpec) DeepCopy

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

func (*PodDisruptionBudgetSpec) DeepCopyInto

func (in *PodDisruptionBudgetSpec) DeepCopyInto(out *PodDisruptionBudgetSpec)

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

type PodSpec

type PodSpec struct {
	Size        int32             `json:"size,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`

	// Deprecated: not supported since v0.12.0. Use initContainer instead
	InitImage     string             `json:"initImage,omitempty"`
	InitContainer *InitContainerSpec `json:"initContainer,omitempty"`

	Affinity                      *PodAffinity                      `json:"affinity,omitempty"`
	TopologySpreadConstraints     []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
	NodeSelector                  map[string]string                 `json:"nodeSelector,omitempty"`
	Tolerations                   []corev1.Toleration               `json:"tolerations,omitempty"`
	PriorityClassName             string                            `json:"priorityClassName,omitempty"`
	TerminationGracePeriodSeconds *int64                            `json:"gracePeriod,omitempty"`
	SchedulerName                 string                            `json:"schedulerName,omitempty"`
	RuntimeClassName              *string                           `json:"runtimeClassName,omitempty"`

	PodSecurityContext  *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`
	ServiceAccountName  string                     `json:"serviceAccountName,omitempty"`
	PodDisruptionBudget *PodDisruptionBudgetSpec   `json:"podDisruptionBudget,omitempty"`

	Configuration string `json:"configuration,omitempty"`

	ContainerSpec `json:",inline"`
}

func (*PodSpec) Core added in v1.0.0

func (s *PodSpec) Core(selector map[string]string, volumes []corev1.Volume, initContainers []corev1.Container, containers []corev1.Container) corev1.PodSpec

func (*PodSpec) DeepCopy

func (in *PodSpec) DeepCopy() *PodSpec

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

func (*PodSpec) DeepCopyInto

func (in *PodSpec) DeepCopyInto(out *PodSpec)

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

func (*PodSpec) GetAffinity

func (p *PodSpec) GetAffinity(selector map[string]string) *corev1.Affinity

GetAffinity derives an Affinity configuration based on the provided PodSpec's affinity settings and labels.

func (*PodSpec) GetInitSpec

func (s *PodSpec) GetInitSpec(cr *PerconaServerMySQL) InitContainerSpec

func (PodSpec) GetTerminationGracePeriodSeconds

func (s PodSpec) GetTerminationGracePeriodSeconds() *int64

GetTerminationGracePeriodSeconds returns the configured termination grace period for the Pod. If not explicitly set, it returns the default grace period.

func (*PodSpec) GetTopologySpreadConstraints

func (p *PodSpec) GetTopologySpreadConstraints(selector map[string]string) []corev1.TopologySpreadConstraint

type ProxySpec

type ProxySpec struct {
	Router  *MySQLRouterSpec `json:"router,omitempty"`
	HAProxy *HAProxySpec     `json:"haproxy,omitempty"`
}

func (*ProxySpec) DeepCopy

func (in *ProxySpec) DeepCopy() *ProxySpec

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

func (*ProxySpec) DeepCopyInto

func (in *ProxySpec) DeepCopyInto(out *ProxySpec)

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

func (*ProxySpec) LoadBalancerExposed added in v1.2.0

func (p *ProxySpec) LoadBalancerExposed() bool

type RecoveryMethod added in v1.2.0

type RecoveryMethod string
const (
	RecoveryMethodClone       RecoveryMethod = "clone"
	RecoveryMethodIncremental RecoveryMethod = "incremental"
	RecoveryMethodAuto        RecoveryMethod = "auto"
)

type RestorePITRBackupSource added in v1.2.0

type RestorePITRBackupSource struct {
	BinlogServer *BinlogServerSpec `json:"binlogServer,omitempty"`
}

func (*RestorePITRBackupSource) DeepCopy added in v1.2.0

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

func (*RestorePITRBackupSource) DeepCopyInto added in v1.2.0

func (in *RestorePITRBackupSource) DeepCopyInto(out *RestorePITRBackupSource)

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

type RestorePITRSpec added in v1.1.0

type RestorePITRSpec struct {
	BackupSource *RestorePITRBackupSource `json:"backupSource,omitempty"`
	// +kubebuilder:validation:Enum=gtid;date
	Type  PITRType `json:"type"`
	Date  string   `json:"date,omitempty"`
	GTID  string   `json:"gtid,omitempty"`
	Force bool     `json:"force,omitempty"`
}

func (*RestorePITRSpec) DeepCopy added in v1.1.0

func (in *RestorePITRSpec) DeepCopy() *RestorePITRSpec

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

func (*RestorePITRSpec) DeepCopyInto added in v1.1.0

func (in *RestorePITRSpec) DeepCopyInto(out *RestorePITRSpec)

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

type RestoreState

type RestoreState string
const (
	RestoreNew       RestoreState = ""
	RestoreStarting  RestoreState = "Starting"
	RestoreRunning   RestoreState = "Running"
	RestoreFailed    RestoreState = "Failed"
	RestoreError     RestoreState = "Error"
	RestoreSucceeded RestoreState = "Succeeded"
)

type ServiceExpose

type ServiceExpose struct {
	Type                          corev1.ServiceType                       `json:"type,omitempty"`
	LoadBalancerSourceRanges      []string                                 `json:"loadBalancerSourceRanges,omitempty"`
	AllocateLoadBalancerNodePorts *bool                                    `json:"allocateLoadBalancerNodePorts,omitempty"`
	Annotations                   map[string]string                        `json:"annotations,omitempty"`
	Labels                        map[string]string                        `json:"labels,omitempty"`
	InternalTrafficPolicy         *corev1.ServiceInternalTrafficPolicyType `json:"internalTrafficPolicy,omitempty"` //nolint:staticcheck //FIXME: https://perconadev.atlassian.net/browse/K8SPS-764
	ExternalTrafficPolicy         corev1.ServiceExternalTrafficPolicyType  `json:"externalTrafficPolicy,omitempty"` //nolint:staticcheck //FIXME: https://perconadev.atlassian.net/browse/K8SPS-764
}

func (*ServiceExpose) DeepCopy

func (in *ServiceExpose) DeepCopy() *ServiceExpose

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

func (*ServiceExpose) DeepCopyInto

func (in *ServiceExpose) DeepCopyInto(out *ServiceExpose)

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

func (*ServiceExpose) SaveOldMeta

func (e *ServiceExpose) SaveOldMeta() bool

SaveOldMeta determines if both annotations and labels of the service expose are empty.

type ServiceExposeTogglable

type ServiceExposeTogglable struct {
	Enabled bool `json:"enabled,omitempty"`

	ServiceExpose `json:",inline"`
}

func (*ServiceExposeTogglable) DeepCopy

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

func (*ServiceExposeTogglable) DeepCopyInto

func (in *ServiceExposeTogglable) DeepCopyInto(out *ServiceExposeTogglable)

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

type SidecarPVC

type SidecarPVC struct {
	Name string `json:"name"`

	Spec corev1.PersistentVolumeClaimSpec `json:"spec"`
}

func (*SidecarPVC) DeepCopy

func (in *SidecarPVC) DeepCopy() *SidecarPVC

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

func (*SidecarPVC) DeepCopyInto

func (in *SidecarPVC) DeepCopyInto(out *SidecarPVC)

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

type StatefulAppState

type StatefulAppState string
const (
	StateInitializing StatefulAppState = "initializing"
	StateStopping     StatefulAppState = "stopping"
	StatePaused       StatefulAppState = "paused"
	StateReady        StatefulAppState = "ready"
	StateError        StatefulAppState = "error"
)

func (StatefulAppState) String

func (s StatefulAppState) String() string

type StatefulAppStatus

type StatefulAppStatus struct {
	Size    int32            `json:"size,omitempty"`
	Ready   int32            `json:"ready,omitempty"`
	State   StatefulAppState `json:"state,omitempty"`
	Version string           `json:"version,omitempty"`
	ImageID string           `json:"imageID,omitempty"`
}

func (*StatefulAppStatus) DeepCopy

func (in *StatefulAppStatus) DeepCopy() *StatefulAppStatus

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

func (*StatefulAppStatus) DeepCopyInto

func (in *StatefulAppStatus) DeepCopyInto(out *StatefulAppStatus)

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

type StorageAutoscalingStatus added in v1.2.0

type StorageAutoscalingStatus struct {
	CurrentSize    string      `json:"currentSize,omitempty"`
	LastResizeTime metav1.Time `json:"lastResizeTime,omitempty"`
	ResizeCount    int32       `json:"resizeCount,omitempty"`
	LastError      string      `json:"lastError,omitempty"`
}

StorageAutoscalingStatus tracks the autoscaling state for a specific PVC

func (*StorageAutoscalingStatus) DeepCopy added in v1.2.0

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

func (*StorageAutoscalingStatus) DeepCopyInto added in v1.2.0

func (in *StorageAutoscalingStatus) DeepCopyInto(out *StorageAutoscalingStatus)

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

type StorageScalingSpec added in v1.2.0

type StorageScalingSpec struct {
	// EnableVolumeScaling allows volume expansion/resizing operations
	// When disabled, PVC sizes will not be modified even if storage changes in the spec
	EnableVolumeScaling bool `json:"enableVolumeScaling,omitempty"`

	// Autoscaling configures automatic storage expansion based on disk usage
	Autoscaling *AutoscalingSpec `json:"autoscaling,omitempty"`

	VolumeExternalAutoscaling bool `json:"enableExternalAutoscaling,omitempty"`
}

StorageScalingSpec defines the configuration for storage scaling behavior +kubebuilder:validation:XValidation:rule="!has(self.autoscaling) || !has(self.autoscaling.enabled) || !self.autoscaling.enabled || self.enableVolumeScaling",message="autoscaling cannot be enabled when enableVolumeScaling is disabled"

func (*StorageScalingSpec) DeepCopy added in v1.2.0

func (in *StorageScalingSpec) DeepCopy() *StorageScalingSpec

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

func (*StorageScalingSpec) DeepCopyInto added in v1.2.0

func (in *StorageScalingSpec) DeepCopyInto(out *StorageScalingSpec)

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

type SystemUser

type SystemUser string
const (
	UserHeartbeat      SystemUser = "heartbeat"
	UserMonitor        SystemUser = "monitor"
	UserOperator       SystemUser = "operator"
	UserOrchestrator   SystemUser = "orchestrator"
	UserPMMServerToken SystemUser = "pmmservertoken"
	UserReplication    SystemUser = "replication"
	UserRoot           SystemUser = "root"
	UserXtraBackup     SystemUser = "xtrabackup"
	UserClusterSet     SystemUser = "clusterset"
)

func AllSystemUsers added in v1.2.0

func AllSystemUsers() []SystemUser

AllSystemUsers returns a copy of the canonical SystemUser list.

func (SystemUser) IsKnown added in v1.2.0

func (u SystemUser) IsKnown() bool

type TLSSpec

type TLSSpec struct {
	SANs       []string                `json:"SANs,omitempty"`
	IssuerConf *cmmeta.ObjectReference `json:"issuerConf,omitempty"`
}

func (*TLSSpec) DeepCopy

func (in *TLSSpec) DeepCopy() *TLSSpec

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

func (*TLSSpec) DeepCopyInto

func (in *TLSSpec) DeepCopyInto(out *TLSSpec)

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

type ToolkitSpec

type ToolkitSpec struct {
	ContainerSpec `json:",inline"`
}

+kubebuilder:validation:XValidation:rule="has(self.image) && size(self.image) > 0",message="toolkit.image is required"

func (*ToolkitSpec) DeepCopy

func (in *ToolkitSpec) DeepCopy() *ToolkitSpec

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

func (*ToolkitSpec) DeepCopyInto

func (in *ToolkitSpec) DeepCopyInto(out *ToolkitSpec)

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

type UnsafeClusterSetFlags added in v1.2.0

type UnsafeClusterSetFlags struct {
	// ForcedFailover controls if an emergency failover may be performed if the
	// current primary is unreachable. Enabling it can promote a replica while
	// the old primary may still accept writes, which can cause split-brain,
	// lost transactions, and require manual recovery of the old primary.
	// Set this only when you're absolutely sure that your primary cannot be recovered.
	//
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:=false
	ForcedFailover *bool `json:"forcedFailover,omitempty"`

	// ForcedClusterRemoval controls if a replica cluster can be removed if it is
	// unreachable. Enabling it lets the operator forget an unreachable replica;
	// any transactions not replicated back are abandoned.
	// This can effectively leave the replica cluster unusable, requiring manual cleanup or full rebuild.
	// Set this only if you can afford to discard the replica cluster.
	//
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:=false
	ForcedClusterRemoval *bool `json:"forcedClusterRemoval,omitempty"`
}

func (*UnsafeClusterSetFlags) DeepCopy added in v1.2.0

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

func (*UnsafeClusterSetFlags) DeepCopyInto added in v1.2.0

func (in *UnsafeClusterSetFlags) DeepCopyInto(out *UnsafeClusterSetFlags)

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

func (*UnsafeClusterSetFlags) SetDefaults added in v1.2.0

func (ucs *UnsafeClusterSetFlags) SetDefaults()

type UnsafeFlags

type UnsafeFlags struct {
	// MySQLSize allows to set MySQL size to a value less than the minimum safe size or higher than the maximum safe size.
	MySQLSize bool `json:"mysqlSize,omitempty"`

	// BackupNonReadyCluster allows backups to run even when the cluster is not in ready state.
	BackupNonReadyCluster bool `json:"backupNonReadyCluster,omitempty"`

	// Proxy allows to disable proxy.
	Proxy bool `json:"proxy,omitempty"`
	// ProxySize allows to set proxy (HAProxy / Router) size to a value less than the minimum safe size.
	ProxySize bool `json:"proxySize,omitempty"`

	// Orchestrator allows to disable Orchestrator.
	Orchestrator bool `json:"orchestrator,omitempty"`
	// OrchestratorSize allows to set Orchestrator size to a value less than the minimum safe size.
	OrchestratorSize bool `json:"orchestratorSize,omitempty"`
}

func (*UnsafeFlags) DeepCopy

func (in *UnsafeFlags) DeepCopy() *UnsafeFlags

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

func (*UnsafeFlags) DeepCopyInto

func (in *UnsafeFlags) DeepCopyInto(out *UnsafeFlags)

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

type UpgradeOptions

type UpgradeOptions struct {
	VersionServiceEndpoint string `json:"versionServiceEndpoint,omitempty"`
	Apply                  string `json:"apply,omitempty"`
}

func (*UpgradeOptions) DeepCopy

func (in *UpgradeOptions) DeepCopy() *UpgradeOptions

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

func (*UpgradeOptions) DeepCopyInto

func (in *UpgradeOptions) DeepCopyInto(out *UpgradeOptions)

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

type VolumeSpec

type VolumeSpec struct {
	// EmptyDir to use as data volume for mysql. EmptyDir represents a temporary
	// directory that shares a pod's lifetime.
	// +optional
	EmptyDir *corev1.EmptyDirVolumeSource `json:"emptyDir,omitempty"`

	// HostPath to use as data volume for mysql. HostPath represents a
	// pre-existing file or directory on the host machine that is directly
	// exposed to the container.
	// +optional
	HostPath *corev1.HostPathVolumeSource `json:"hostPath,omitempty"`

	// PersistentVolumeClaim to specify PVC spec for the volume for mysql data.
	// It has the highest level of precedence, followed by HostPath and
	// EmptyDir. And represents the PVC specification.
	// +optional
	PersistentVolumeClaim *corev1.PersistentVolumeClaimSpec `json:"persistentVolumeClaim,omitempty"`
}

func (*VolumeSpec) DeepCopy

func (in *VolumeSpec) DeepCopy() *VolumeSpec

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

func (*VolumeSpec) DeepCopyInto

func (in *VolumeSpec) DeepCopyInto(out *VolumeSpec)

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