Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the ps v1 API group +kubebuilder:object:generate=true +groupName=ps.percona.com
Index ¶
- Constants
- Variables
- func ConditionsEqual(a, b []metav1.Condition) bool
- func FNVHash(p []byte) string
- type AutoConfigLoadType
- type AutoConfigSpec
- type AutoscalingSpec
- type BackupContainerArgs
- type BackupContainerOptions
- type BackupDestination
- func (dest *BackupDestination) BackupName() string
- func (dest *BackupDestination) BucketAndPrefix() (string, string)
- func (dest *BackupDestination) IncrementalBaseDestination() BackupDestination
- func (dest *BackupDestination) IncrementalsDir() string
- func (dest *BackupDestination) IsIncremental() bool
- func (dest *BackupDestination) PathWithoutBucket() string
- func (dest *BackupDestination) SetAzureDestination(container, backupName string)
- func (dest *BackupDestination) SetGCSDestination(bucket, backupName string)
- func (dest *BackupDestination) SetS3Destination(bucket, backupName string)
- func (dest *BackupDestination) StorageTypePrefix() string
- func (dest *BackupDestination) String() string
- type BackupSchedule
- type BackupSpec
- type BackupState
- type BackupStorageAzureSpec
- type BackupStorageGCSSpec
- type BackupStorageS3Spec
- type BackupStorageSpec
- type BackupStorageType
- type BackupType
- type BinlogServerKeyringSecretSelector
- type BinlogServerSpec
- type BinlogServerStorageEncryptionSpec
- type BinlogServerStorageSpec
- type BootstrapConfig
- type BootstrapMode
- type BucketWithPrefix
- type CABundleSecretSelector
- type ClusterSetCluster
- type ClusterSetClusterEndpoint
- type ClusterSetClusterStatus
- type ClusterSetClusterStatuses
- type ClusterSetSSLMode
- type ClusterSetStatusdeprecated
- type ClusterType
- type ContainerSpec
- type CreateReplicaClusterOptions
- type EncryptionKeySecretSelector
- type FailoverPolicy
- type FailoverSpec
- type HAProxySpec
- type InitContainerSpec
- type LogCollectorSpec
- type LogRotateSpec
- type Metadata
- type MySQLRouterSpec
- type MySQLShellRunnerSpec
- type MySQLSpec
- type OrchestratorSpec
- type PITRType
- type PMMSpec
- type PerconaServerMySQL
- func (cr *PerconaServerMySQL) AppliedClusterType() ClusterType
- func (cr *PerconaServerMySQL) AppliedIsAsync() bool
- func (cr *PerconaServerMySQL) AppliedIsGR() bool
- func (cr *PerconaServerMySQL) BackupEnabled() bool
- func (cr *PerconaServerMySQL) BootstrapMode() BootstrapMode
- func (cr *PerconaServerMySQL) CanBackup() error
- func (cr *PerconaServerMySQL) CheckNSetDefaults(_ context.Context, serverVersion *platform.ServerVersion) error
- func (cr *PerconaServerMySQL) ClusterHash() string
- func (cr *PerconaServerMySQL) ClusterHint() string
- func (cr *PerconaServerMySQL) CompareVersion(ver string) int
- func (in *PerconaServerMySQL) DeepCopy() *PerconaServerMySQL
- func (in *PerconaServerMySQL) DeepCopyInto(out *PerconaServerMySQL)
- func (in *PerconaServerMySQL) DeepCopyObject() runtime.Object
- func (cr *PerconaServerMySQL) DefaultCustomUserSecretName(u User) string
- func (cr *PerconaServerMySQL) DefaultSSLSecretName() string
- func (cr *PerconaServerMySQL) DefaultSecretName() string
- func (cr *PerconaServerMySQL) FailoverSpec() *FailoverSpec
- func (cr *PerconaServerMySQL) GlobalAnnotations() map[string]string
- func (cr *PerconaServerMySQL) GlobalLabels() map[string]string
- func (cr *PerconaServerMySQL) HAProxyEnabled() bool
- func (cr *PerconaServerMySQL) InnoDBClusterName() string
- func (cr *PerconaServerMySQL) InternalCustomUserSecretName() string
- func (cr *PerconaServerMySQL) InternalSecretName() string
- func (cr *PerconaServerMySQL) IsAwaitingExternalBootstrap() bool
- func (cr *PerconaServerMySQL) Labels(name, component string) map[string]string
- func (cr *PerconaServerMySQL) LogCollectorEnabled() bool
- func (cr *PerconaServerMySQL) LogRotateExtraConfigMaps() []string
- func (cr *PerconaServerMySQL) MySQLSpec() *MySQLSpec
- func (cr *PerconaServerMySQL) OrchestratorEnabled() bool
- func (cr *PerconaServerMySQL) OrchestratorSpec() *OrchestratorSpec
- func (cr *PerconaServerMySQL) PMMEnabled(secret *corev1.Secret) bool
- func (cr *PerconaServerMySQL) PMMSpec() *PMMSpec
- func (cr *PerconaServerMySQL) PVCResizeInProgress() bool
- func (cr *PerconaServerMySQL) PiTREnabled() bool
- func (cr *PerconaServerMySQL) RouterEnabled() bool
- func (cr *PerconaServerMySQL) Version() *v.Version
- type PerconaServerMySQLBackup
- func (in *PerconaServerMySQLBackup) DeepCopy() *PerconaServerMySQLBackup
- func (in *PerconaServerMySQLBackup) DeepCopyInto(out *PerconaServerMySQLBackup)
- func (in *PerconaServerMySQLBackup) DeepCopyObject() runtime.Object
- func (b *PerconaServerMySQLBackup) GetContainerOptions(storage *BackupStorageSpec) *BackupContainerOptions
- func (b *PerconaServerMySQLBackup) GetType() BackupType
- func (b *PerconaServerMySQLBackup) Hash() string
- func (b *PerconaServerMySQLBackup) IsCompressed(storage *BackupStorageSpec, mysqlConfiguration string) bool
- func (b *PerconaServerMySQLBackup) IsStartingDeadlineExceeded(cluster *PerconaServerMySQL, now time.Time) bool
- func (b *PerconaServerMySQLBackup) IsSuspendedDeadlineExceeded(cluster *PerconaServerMySQL, job *batchv1.Job, now time.Time) bool
- func (b *PerconaServerMySQLBackup) Labels(name, component string) map[string]string
- type PerconaServerMySQLBackupList
- type PerconaServerMySQLBackupSpec
- type PerconaServerMySQLBackupStatus
- type PerconaServerMySQLClusterSet
- func (in *PerconaServerMySQLClusterSet) DeepCopy() *PerconaServerMySQLClusterSet
- func (in *PerconaServerMySQLClusterSet) DeepCopyInto(out *PerconaServerMySQLClusterSet)
- func (in *PerconaServerMySQLClusterSet) DeepCopyObject() runtime.Object
- func (psc *PerconaServerMySQLClusterSet) GetCluster(name string) *ClusterSetCluster
- func (psc *PerconaServerMySQLClusterSet) PrimaryCluster() *ClusterSetCluster
- func (pcs *PerconaServerMySQLClusterSet) SetDefaults()
- func (pcs *PerconaServerMySQLClusterSet) UpdateStatus(ctx context.Context, cl client.Client, ...) error
- type PerconaServerMySQLClusterSetList
- type PerconaServerMySQLClusterSetSpec
- type PerconaServerMySQLClusterSetStatus
- type PerconaServerMySQLList
- type PerconaServerMySQLRestore
- func (in *PerconaServerMySQLRestore) DeepCopy() *PerconaServerMySQLRestore
- func (in *PerconaServerMySQLRestore) DeepCopyInto(out *PerconaServerMySQLRestore)
- func (in *PerconaServerMySQLRestore) DeepCopyObject() runtime.Object
- func (r *PerconaServerMySQLRestore) GetContainerOptions(storage *BackupStorageSpec) *BackupContainerOptions
- func (r *PerconaServerMySQLRestore) Labels(name, component string) map[string]string
- type PerconaServerMySQLRestoreList
- type PerconaServerMySQLRestoreSpec
- type PerconaServerMySQLRestoreStatus
- type PerconaServerMySQLSpec
- type PerconaServerMySQLStatus
- type PiTRSpec
- type PodAffinity
- type PodDisruptionBudgetSpec
- type PodSpec
- func (s *PodSpec) Core(selector map[string]string, volumes []corev1.Volume, ...) corev1.PodSpec
- func (in *PodSpec) DeepCopy() *PodSpec
- func (in *PodSpec) DeepCopyInto(out *PodSpec)
- func (p *PodSpec) GetAffinity(selector map[string]string) *corev1.Affinity
- func (s *PodSpec) GetInitSpec(cr *PerconaServerMySQL) InitContainerSpec
- func (s PodSpec) GetTerminationGracePeriodSeconds() *int64
- func (p *PodSpec) GetTopologySpreadConstraints(selector map[string]string) []corev1.TopologySpreadConstraint
- type ProxySpec
- type RecoveryMethod
- type RestoreBackupSource
- type RestorePITRBackupSource
- type RestorePITRSpec
- type RestoreState
- type ServiceExpose
- type ServiceExposeTogglable
- type SidecarPVC
- type StatefulAppState
- type StatefulAppStatus
- type StorageAutoscalingStatus
- type StorageScalingSpec
- type SystemUser
- type TLSSpec
- type ToolkitSpec
- type UnsafeClusterSetFlags
- type UnsafeFlags
- type UpgradeOptions
- type User
- type UserSecretKeySelector
- type VolumeSpec
Constants ¶
const ( ConditionInnoDBClusterBootstrapped string = "InnoDBClusterBootstrapped" ConditionClusterSetMember string = "ClusterSetMember" ConditionAwaitingExternalBootstrap string = "AwaitingExternalBootstrap" ConditionMySQLConfigSynced = "MySQLConfigSynced" ConditionClusterTypeSwitchInProgress string = "ClusterTypeSwitchInProgress" ConditionAsyncFailoverBlocked string = "AsyncFailoverBlocked" ConditionReplicationLagging string = "ReplicationLagging" // Deprecated, preserved only for backward compatibility ConditionClusterSetReplicationRunning string = "ClusterSetReplicationRunning" )
const ( ClusterSetMemberReasonPrimary = "Primary" ClusterSetMemberReasonReplica = "Replica" )
const ( BinVolumeName = "bin" BinVolumePath = "/opt/percona" )
const ( // LogCollectorContainerName is the name of the Fluent Bit sidecar. LogCollectorContainerName = "logs" // LogRotateContainerName is the name of the logrotate sidecar. LogRotateContainerName = "logrotate" )
const ( UpgradeStrategyDisabled = "disabled" UpgradeStrategyNever = "never" UpgradeStrategyRecommended = "recommended" )
const ( AzureBlobStoragePrefix string = "" AwsBlobStoragePrefix string = "s3://" GCSStoragePrefix string = "gs://" )
const ( EventTypeClusterSetPrimarySwitched string = "ClusterSetPrimarySwitched" EventTypeClusterSetPrimaryForcedSwitched string = "ClusterSetPrimaryForcedSwitched" EventTypeClusterSetBootstrapped string = "ClusterSetBootstrapped" EventTypeClusterSetUnhealthy string = "ClusterSetHealthDegraded" EventTypeClusterSetMemberAdded string = "ClusterSetMemberAdded" EventTypeClusterSetMemberRemoved string = "ClusterSetMemberRemoved" EventTypeClusterSetMemberRejoined string = "ClusterSetMemberRejoined" EventTypeClusterSetMemberRejoinFailed string = "ClusterSetMemberRejoinFailed" )
const ( ConditionMySQLShellRunnerReady string = "MySQLShellRunnerReady" ConditionClusterSetBootstrapped string = "ClusterSetBootstrapped" ConditionClusterSetPrimarySwitchOverInProg string = "SwitchoverInProgress" ConditionReplicaManagementFailure string = "ReplicaManagementFailure" ConditionClusterSetDissolving string = "ClusterSetDissolving" ConditionClusterSetRejoinInProgress string = "RejoinClusterInProgress" ConditionClusterSetReady string = "Ready" ConditionClusterSetErrorReconcile string = "ErrorReconcile" )
const AffinityTopologyKeyNone = "none"
const (
ConditionBackupLeaseAcquired = "BackupLeaseAcquired"
)
const DefaultCABundleKey = "ca.crt"
const IndexFieldLogRotateExtraConfig = "psCluster.logRotateExtraConfig"
const SmartUpdateStatefulSetStrategyType appsv1.StatefulSetUpdateStrategyType = "SmartUpdate"
SmartUpdateStatefulSetStrategyType
Variables ¶
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 )
var LogRotateExtraConfigIndexerFunc client.IndexerFunc = func(obj client.Object) []string { cr, ok := obj.(*PerconaServerMySQL) if !ok { return nil } return cr.LogRotateExtraConfigMaps() }
var NonAlphaNumeric = regexp.MustCompile("[^a-zA-Z0-9_]+")
Functions ¶
func ConditionsEqual ¶ added in v1.1.0
Types ¶
type AutoConfigLoadType ¶ added in v1.3.0
type AutoConfigLoadType string
const ( AutoConfigLoadTypeMostlyReads AutoConfigLoadType = "mostlyReads" AutoConfigLoadTypeSomeWrites AutoConfigLoadType = "someWrites" AutoConfigLoadTypeEqualReadsWrites AutoConfigLoadType = "equalReadsWrites" AutoConfigLoadTypeHeavyWrites AutoConfigLoadType = "heavyWrites" )
type AutoConfigSpec ¶ added in v1.3.0
type AutoConfigSpec struct {
Enabled *bool `json:"enabled,omitempty"`
// +kubebuilder:validation:Enum=mostlyReads;someWrites;equalReadsWrites;heavyWrites
LoadType AutoConfigLoadType `json:"loadType,omitempty"`
// Version is the MySQL version the configuration is calculated for. It does
// not change which server is deployed.
// +kubebuilder:validation:Pattern=`^\d+\.\d+\.\d+$`
Version string `json:"version,omitempty"`
}
func (*AutoConfigSpec) DeepCopy ¶ added in v1.3.0
func (in *AutoConfigSpec) DeepCopy() *AutoConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoConfigSpec.
func (*AutoConfigSpec) DeepCopyInto ¶ added in v1.3.0
func (in *AutoConfigSpec) DeepCopyInto(out *AutoConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (AutoConfigSpec) IsEnabled ¶ added in v1.3.0
func (s AutoConfigSpec) IsEnabled() bool
IsEnabled reports whether autoconfig is turned on.
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 requires --defaults-file to precede every other option.
// +kubebuilder:validation:MaxItems=100
// +kubebuilder:validation:items:MaxLength=1024
// +kubebuilder:validation:XValidation:rule="!self.exists(arg, arg == '--defaults-file' || arg.startsWith('--defaults-file=')) || (self[0].startsWith('--defaults-file=') && self[0] != '--defaults-file=')",message="--defaults-file must use --defaults-file=<path> syntax and be the first xtrabackup argument"
// +kubebuilder:validation:XValidation:rule="!self.exists(arg, arg == '--defaults-extra-file' || arg.startsWith('--defaults-extra-file='))",message="--defaults-extra-file is managed by the operator and cannot be specified"
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 ¶
func (in *BackupContainerOptions) DeepCopy() *BackupContainerOptions
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 (b *BackupContainerOptions) GetArgs() BackupContainerArgs
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"`
// +kubebuilder:validation:MaxProperties=100
Storages map[string]*BackupStorageSpec `json:"storages,omitempty"`
BackoffLimit *int32 `json:"backoffLimit,omitempty"`
// +kubebuilder:validation:Minimum=0
StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"`
// +kubebuilder:validation:Minimum=0
SuspendedDeadlineSeconds *int64 `json:"suspendedDeadlineSeconds,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" BackupSuspended BackupState = "Suspended" 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 ¶
func (in *BackupStorageAzureSpec) DeepCopy() *BackupStorageAzureSpec
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 ¶
func (in *BackupStorageGCSSpec) DeepCopy() *BackupStorageGCSSpec
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"`
// CABundle selects a custom CA certificate bundle for TLS connections to the S3 endpoint.
// +optional
CABundle *CABundleSecretSelector `json:"caBundle,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 BinlogServerKeyringSecretSelector ¶ added in v1.3.0
type BinlogServerKeyringSecretSelector struct {
// Name of the secret containing the keyring file.
// +kubebuilder:validation:Required
Name string `json:"name"`
// Key in the Secret containing the keyring file. Defaults to "keyring.json".
// +kubebuilder:default=keyring.json
Key string `json:"key,omitempty"`
}
func (*BinlogServerKeyringSecretSelector) DeepCopy ¶ added in v1.3.0
func (in *BinlogServerKeyringSecretSelector) DeepCopy() *BinlogServerKeyringSecretSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BinlogServerKeyringSecretSelector.
func (*BinlogServerKeyringSecretSelector) DeepCopyInto ¶ added in v1.3.0
func (in *BinlogServerKeyringSecretSelector) DeepCopyInto(out *BinlogServerKeyringSecretSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BinlogServerSpec ¶
type BinlogServerSpec struct {
Storage BinlogServerStorageSpec `json:"storage,omitempty"`
// KeyringSecret is a reference to a Secret containing the keyring file.
// It is required to encrypt new binlog files and to read already encrypted
// ones, so it must stay configured even after storage encryption is disabled
// if the storage still holds encrypted binlogs.
KeyringSecret *BinlogServerKeyringSecretSelector `json:"keyringSecret,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" +kubebuilder:validation:XValidation:rule="!self.?storage.?encryption.hasValue() || has(self.keyringSecret)",message="binlogServer.keyringSecret is required when binlogServer.storage.encryption is set"
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 BinlogServerStorageEncryptionSpec ¶ added in v1.3.0
type BinlogServerStorageEncryptionSpec struct {
// KekID is the ID of the key encryption key (KEK) used to encrypt the data encryption key (DEK) in the keyring file.
// If unspecified, uses the first key in the file.
// +kubebuilder:validation:Optional
KekID string `json:"kekId,omitempty"`
// +kubebuilder:default=AES-256-CTR
// +kubebuilder:validation:Enum=AES-128-CTR;AES-192-CTR;AES-256-CTR
Cipher string `json:"cipher,omitempty"`
}
func (*BinlogServerStorageEncryptionSpec) DeepCopy ¶ added in v1.3.0
func (in *BinlogServerStorageEncryptionSpec) DeepCopy() *BinlogServerStorageEncryptionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BinlogServerStorageEncryptionSpec.
func (*BinlogServerStorageEncryptionSpec) DeepCopyInto ¶ added in v1.3.0
func (in *BinlogServerStorageEncryptionSpec) DeepCopyInto(out *BinlogServerStorageEncryptionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BinlogServerStorageSpec ¶
type BinlogServerStorageSpec struct {
S3 *BackupStorageS3Spec `json:"s3,omitempty"`
Encryption *BinlogServerStorageEncryptionSpec `json:"encryption,omitempty"`
}
func (*BinlogServerStorageSpec) DeepCopy ¶
func (in *BinlogServerStorageSpec) DeepCopy() *BinlogServerStorageSpec
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 CABundleSecretSelector ¶ added in v1.3.0
type CABundleSecretSelector struct {
// +kubebuilder:validation:Required
Name string `json:"name"`
// +kubebuilder:validation:Optional
// +kubebuilder:default:=ca.crt
Key string `json:"key,omitempty"`
}
func (*CABundleSecretSelector) DeepCopy ¶ added in v1.3.0
func (in *CABundleSecretSelector) DeepCopy() *CABundleSecretSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CABundleSecretSelector.
func (*CABundleSecretSelector) DeepCopyInto ¶ added in v1.3.0
func (in *CABundleSecretSelector) DeepCopyInto(out *CABundleSecretSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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
func (in *ClusterSetClusterEndpoint) DeepCopy() *ClusterSetClusterEndpoint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSetClusterEndpoint.
func (*ClusterSetClusterEndpoint) DeepCopyInto ¶ added in v1.2.0
func (in *ClusterSetClusterEndpoint) DeepCopyInto(out *ClusterSetClusterEndpoint)
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"`
ReplicationLagSeconds *int64 `json:"replicationLagSeconds,omitempty"`
}
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
func (in *ClusterSetClusterStatus) DeepCopy() *ClusterSetClusterStatus
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 ClusterSetClusterStatuses ¶ added in v1.3.0
type ClusterSetClusterStatuses map[string]ClusterSetClusterStatus
func (ClusterSetClusterStatuses) DeepCopy ¶ added in v1.3.0
func (in ClusterSetClusterStatuses) DeepCopy() ClusterSetClusterStatuses
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSetClusterStatuses.
func (ClusterSetClusterStatuses) DeepCopyInto ¶ added in v1.3.0
func (in ClusterSetClusterStatuses) DeepCopyInto(out *ClusterSetClusterStatuses)
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
deprecated
added in
v1.2.0
type ClusterSetStatus = ClusterSetClusterStatuses
Deprecated: use ClusterSetClusterStatuses.
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
func (in *CreateReplicaClusterOptions) DeepCopy() *CreateReplicaClusterOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CreateReplicaClusterOptions.
func (*CreateReplicaClusterOptions) DeepCopyInto ¶ added in v1.2.0
func (in *CreateReplicaClusterOptions) DeepCopyInto(out *CreateReplicaClusterOptions)
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
func (in *EncryptionKeySecretSelector) DeepCopy() *EncryptionKeySecretSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionKeySecretSelector.
func (*EncryptionKeySecretSelector) DeepCopyInto ¶ added in v1.2.0
func (in *EncryptionKeySecretSelector) DeepCopyInto(out *EncryptionKeySecretSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FailoverPolicy ¶ added in v1.3.0
type FailoverPolicy string
FailoverPolicy decides what happens once a failover has spent its whole timeout without recovering the transactions stranded on the dead primary.
const ( // FailoverPolicyAbort leaves the cluster without a writable primary. Nothing // is lost, but nothing is promoted either, until someone intervenes. FailoverPolicyAbort FailoverPolicy = "Abort" // FailoverPolicyForce promotes the best candidate anyway, giving up whatever // the dead primary committed and never delivered. It does not apply when the // old primary is reachable again and holds transactions the candidate does // not have: promoting then would leave two writable primaries. FailoverPolicyForce FailoverPolicy = "ForceWithPossibleDataLoss" )
func (FailoverPolicy) Valid ¶ added in v1.3.0
func (p FailoverPolicy) Valid() bool
type FailoverSpec ¶ added in v1.3.0
type FailoverSpec struct {
// Timeout bounds how long the cluster tries to recover the transactions
// stranded on the dead primary. It is measured from the moment the failure is
// first seen and covers every retry, not a single attempt. The clock restarts
// if the Orchestrator raft leader changes mid-failover, which delays the
// OnTimeout decision rather than bringing it forward.
// +kubebuilder:validation:Pattern=`^([0-9]+(\.[0-9]+)?(ns|us|ms|s|m|h))+$`
// +kubebuilder:default="1h"
Timeout string `json:"timeout,omitempty"`
// OnTimeout decides what happens when Timeout expires.
// +kubebuilder:validation:Enum=Abort;ForceWithPossibleDataLoss
// +kubebuilder:default=Abort
OnTimeout FailoverPolicy `json:"onTimeout,omitempty"`
}
func (*FailoverSpec) DeepCopy ¶ added in v1.3.0
func (in *FailoverSpec) DeepCopy() *FailoverSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailoverSpec.
func (*FailoverSpec) DeepCopyInto ¶ added in v1.3.0
func (in *FailoverSpec) DeepCopyInto(out *FailoverSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FailoverSpec) SetDefaults ¶ added in v1.3.0
func (s *FailoverSpec) SetDefaults()
func (*FailoverSpec) TimeoutDuration ¶ added in v1.3.0
func (s *FailoverSpec) TimeoutDuration() time.Duration
TimeoutDuration returns Timeout, falling back to the default when it is unset or unparsable. CheckNSetDefaults rejects both, so the fallback only covers objects that never went through it.
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 LogCollectorSpec ¶ added in v1.3.0
type LogCollectorSpec struct {
// Enabled turns the log collector on or off. When unset, it is off.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// +kubebuilder:validation:Required
Image string `json:"image"`
// +kubebuilder:validation:Enum={Always,Never,IfNotPresent}
// +optional
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
// Custom Fluent Bit configuration, merged into the log collector pipeline.
// Must be in Fluent Bit's YAML configuration format (the classic ".conf"
// format is not supported); this is what enables YAML-only features such as
// pipeline processors (e.g. opentelemetry_envelope). Invalid configuration
// is ignored by the collector at startup.
// +optional
Configuration string `json:"configuration,omitempty"`
// +optional
Env []corev1.EnvVar `json:"env,omitempty"`
// +optional
EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`
// +optional
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
// +optional
ContainerSecurityContext *corev1.SecurityContext `json:"containerSecurityContext,omitempty"`
// LivenessProbe sets the liveness probe for the fluent-bit log collector
// container. When not set, the container has no liveness probe.
// +optional
LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty"`
// ReadinessProbe sets the readiness probe for the fluent-bit log collector
// container. When not set, the container has no readiness probe.
// +optional
ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty"`
// +optional
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
// +optional
Volumes []corev1.Volume `json:"volumes,omitempty"`
// +optional
LogRotate *LogRotateSpec `json:"logRotate,omitempty"`
}
LogCollectorSpec configures the log collector sidecars that tail, rotate and ship the on-disk logs of the cluster components.
func (*LogCollectorSpec) DeepCopy ¶ added in v1.3.0
func (in *LogCollectorSpec) DeepCopy() *LogCollectorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogCollectorSpec.
func (*LogCollectorSpec) DeepCopyInto ¶ added in v1.3.0
func (in *LogCollectorSpec) DeepCopyInto(out *LogCollectorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LogRotateSpec ¶ added in v1.3.0
type LogRotateSpec struct {
// Configuration allows overriding the default logrotate configuration.
// +optional
Configuration string `json:"configuration,omitempty"`
// ExtraConfig allows specifying logrotate configuration files in addition to
// the main configuration file. This should be a reference to a ConfigMap in
// the same namespace. Keys must contain the .conf extension to be processed
// correctly.
// +optional
ExtraConfig corev1.LocalObjectReference `json:"extraConfig,omitempty"`
// Schedule is the cron schedule on which logrotate runs.
// +kubebuilder:default="0 0 * * *"
// +optional
Schedule string `json:"schedule,omitempty"`
// LivenessProbe sets the liveness probe for the logrotate container.
// When not set, the container has no liveness probe.
// +optional
LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty"`
// ReadinessProbe sets the readiness probe for the logrotate container.
// When not set, the container has no readiness probe.
// +optional
ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty"`
}
LogRotateSpec configures the logrotate sidecar that rotates the on-disk logs.
func (*LogRotateSpec) DeepCopy ¶ added in v1.3.0
func (in *LogRotateSpec) DeepCopy() *LogRotateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogRotateSpec.
func (*LogRotateSpec) DeepCopyInto ¶ added in v1.3.0
func (in *LogRotateSpec) DeepCopyInto(out *LogRotateSpec)
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metadata.
func (*Metadata) DeepCopyInto ¶
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
func (in *MySQLShellRunnerSpec) DeepCopy() *MySQLShellRunnerSpec
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"`
AutoConfig AutoConfigSpec `json:"autoConfig,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" +kubebuilder:validation:XValidation:rule="!(self.?autoConfig.?enabled.orValue(false)) || (has(self.resources) && ((has(self.resources.limits) && 'cpu' in self.resources.limits) || (has(self.resources.requests) && 'cpu' in self.resources.requests)) && ((has(self.resources.limits) && 'memory' in self.resources.limits) || (has(self.resources.requests) && 'memory' in self.resources.requests)))",message="mysql.resources must set cpu and memory (via limits or requests) when mysql.autoConfig.enabled is true" +kubebuilder:validation:XValidation:rule="!(self.?autoConfig.?enabled.orValue(false)) || sign(quantity(string(has(self.resources.limits) && 'cpu' in self.resources.limits ? self.resources.limits['cpu'] : self.resources.requests['cpu']))) == 1",message="mysql.resources cpu must be greater than 0 when mysql.autoConfig.enabled is true" +kubebuilder:validation:XValidation:rule="!(self.?autoConfig.?enabled.orValue(false)) || quantity(string(has(self.resources.limits) && 'memory' in self.resources.limits ? self.resources.limits['memory'] : self.resources.requests['memory'])).compareTo(quantity('12Mi')) >= 0",message="mysql.resources memory must be at least 12Mi when mysql.autoConfig.enabled is true" +kubebuilder:validation:XValidation:rule="!(self.?autoConfig.?enabled.orValue(false)) || (has(self.autoConfig.version) && size(self.autoConfig.version) > 0)",message="mysql.autoConfig.version is required when mysql.autoConfig.enabled is true"
func (*MySQLSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MySQLSpec.
func (*MySQLSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OrchestratorSpec ¶
type OrchestratorSpec struct {
Enabled bool `json:"enabled,omitempty"`
Expose ServiceExpose `json:"expose,omitempty"`
// Failover configures how the cluster recovers from a primary that is gone.
// +kubebuilder:validation:Optional
Failover *FailoverSpec `json:"failover,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 PMMSpec ¶
type PMMSpec struct {
Enabled bool `json:"enabled,omitempty"`
Image string `json:"image,omitempty"`
MySQLParams string `json:"mysqlParams,omitempty"`
HAProxyParams string `json:"haproxyParams,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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PMMSpec.
func (*PMMSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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) AppliedClusterType ¶ added in v1.3.0
func (cr *PerconaServerMySQL) AppliedClusterType() ClusterType
func (*PerconaServerMySQL) AppliedIsAsync ¶ added in v1.3.0
func (cr *PerconaServerMySQL) AppliedIsAsync() bool
func (*PerconaServerMySQL) AppliedIsGR ¶ added in v1.3.0
func (cr *PerconaServerMySQL) AppliedIsGR() bool
func (*PerconaServerMySQL) BackupEnabled ¶ added in v1.3.0
func (cr *PerconaServerMySQL) BackupEnabled() bool
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) DefaultCustomUserSecretName ¶ added in v1.3.0
func (cr *PerconaServerMySQL) DefaultCustomUserSecretName(u User) string
DefaultCustomUserSecretName returns the name of the Secret that stores the auto-generated password for a custom user.
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) FailoverSpec ¶ added in v1.3.0
func (cr *PerconaServerMySQL) FailoverSpec() *FailoverSpec
FailoverSpec returns the failover configuration with every default filled in
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) InternalCustomUserSecretName ¶ added in v1.3.0
func (cr *PerconaServerMySQL) InternalCustomUserSecretName() string
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) 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) LogCollectorEnabled ¶ added in v1.3.0
func (cr *PerconaServerMySQL) LogCollectorEnabled() bool
LogCollectorEnabled reports whether the log collector sidecars should be wired into the cluster's pods.
func (*PerconaServerMySQL) LogRotateExtraConfigMaps ¶ added in v1.3.0
func (cr *PerconaServerMySQL) LogRotateExtraConfigMaps() []string
LogRotateExtraConfigMaps returns the names of the ConfigMaps the log collector references through logRotate.extraConfig.
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 reports whether Orchestrator should be running for this cluster.
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 ¶
func (in *PerconaServerMySQLBackup) DeepCopy() *PerconaServerMySQLBackup
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) IsStartingDeadlineExceeded ¶ added in v1.3.0
func (b *PerconaServerMySQLBackup) IsStartingDeadlineExceeded(cluster *PerconaServerMySQL, now time.Time) bool
func (*PerconaServerMySQLBackup) IsSuspendedDeadlineExceeded ¶ added in v1.3.0
func (b *PerconaServerMySQLBackup) IsSuspendedDeadlineExceeded(cluster *PerconaServerMySQL, job *batchv1.Job, now time.Time) bool
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 ¶
func (in *PerconaServerMySQLBackupList) DeepCopy() *PerconaServerMySQLBackupList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaServerMySQLBackupList.
func (*PerconaServerMySQLBackupList) DeepCopyInto ¶
func (in *PerconaServerMySQLBackupList) DeepCopyInto(out *PerconaServerMySQLBackupList)
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"`
// +kubebuilder:validation:Minimum=0
StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"`
// +kubebuilder:validation:Minimum=0
SuspendedDeadlineSeconds *int64 `json:"suspendedDeadlineSeconds,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 ¶
func (in *PerconaServerMySQLBackupSpec) DeepCopy() *PerconaServerMySQLBackupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaServerMySQLBackupSpec.
func (*PerconaServerMySQLBackupSpec) DeepCopyInto ¶
func (in *PerconaServerMySQLBackupSpec) DeepCopyInto(out *PerconaServerMySQLBackupSpec)
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"`
Size string `json:"size,omitempty"`
UncompressedSize string `json:"uncompressedSize,omitempty"`
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
PerconaServerMySQLBackupStatus defines the observed state of PerconaServerMySQLBackup
func (*PerconaServerMySQLBackupStatus) DeepCopy ¶
func (in *PerconaServerMySQLBackupStatus) DeepCopy() *PerconaServerMySQLBackupStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaServerMySQLBackupStatus.
func (*PerconaServerMySQLBackupStatus) DeepCopyInto ¶
func (in *PerconaServerMySQLBackupStatus) DeepCopyInto(out *PerconaServerMySQLBackupStatus)
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
func (s *PerconaServerMySQLBackupStatus) Equals(other *PerconaServerMySQLBackupStatus) bool
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
func (in *PerconaServerMySQLClusterSet) DeepCopy() *PerconaServerMySQLClusterSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaServerMySQLClusterSet.
func (*PerconaServerMySQLClusterSet) DeepCopyInto ¶ added in v1.2.0
func (in *PerconaServerMySQLClusterSet) DeepCopyInto(out *PerconaServerMySQLClusterSet)
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
func (pcs *PerconaServerMySQLClusterSet) UpdateStatus(ctx context.Context, cl client.Client, mutate func(status *PerconaServerMySQLClusterSetStatus) error) error
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
func (in *PerconaServerMySQLClusterSetList) DeepCopy() *PerconaServerMySQLClusterSetList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaServerMySQLClusterSetList.
func (*PerconaServerMySQLClusterSetList) DeepCopyInto ¶ added in v1.2.0
func (in *PerconaServerMySQLClusterSetList) DeepCopyInto(out *PerconaServerMySQLClusterSetList)
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
func (in *PerconaServerMySQLClusterSetSpec) DeepCopy() *PerconaServerMySQLClusterSetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaServerMySQLClusterSetSpec.
func (*PerconaServerMySQLClusterSetSpec) DeepCopyInto ¶ added in v1.2.0
func (in *PerconaServerMySQLClusterSetSpec) DeepCopyInto(out *PerconaServerMySQLClusterSetSpec)
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 ClusterSetClusterStatuses `json:"clusters,omitempty"`
ObservedGeneration int64 `json:"lastObservedGeneration,omitempty"`
LastObservedAt metav1.Time `json:"lastObservedAt,omitempty"`
}
func (*PerconaServerMySQLClusterSetStatus) DeepCopy ¶ added in v1.2.0
func (in *PerconaServerMySQLClusterSetStatus) DeepCopy() *PerconaServerMySQLClusterSetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaServerMySQLClusterSetStatus.
func (*PerconaServerMySQLClusterSetStatus) DeepCopyInto ¶ added in v1.2.0
func (in *PerconaServerMySQLClusterSetStatus) DeepCopyInto(out *PerconaServerMySQLClusterSetStatus)
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 ¶
func (in *PerconaServerMySQLList) DeepCopy() *PerconaServerMySQLList
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 ¶
func (in *PerconaServerMySQLRestore) DeepCopy() *PerconaServerMySQLRestore
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaServerMySQLRestore.
func (*PerconaServerMySQLRestore) DeepCopyInto ¶
func (in *PerconaServerMySQLRestore) DeepCopyInto(out *PerconaServerMySQLRestore)
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
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 ¶
func (in *PerconaServerMySQLRestoreList) DeepCopy() *PerconaServerMySQLRestoreList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaServerMySQLRestoreList.
func (*PerconaServerMySQLRestoreList) DeepCopyInto ¶
func (in *PerconaServerMySQLRestoreList) DeepCopyInto(out *PerconaServerMySQLRestoreList)
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 *RestoreBackupSource `json:"backupSource,omitempty"`
ContainerOptions *BackupContainerOptions `json:"containerOptions,omitempty"`
PITR *RestorePITRSpec `json:"pitr,omitempty"`
}
PerconaServerMySQLRestoreSpec defines the desired state of PerconaServerMySQLRestore
func (*PerconaServerMySQLRestoreSpec) DeepCopy ¶
func (in *PerconaServerMySQLRestoreSpec) DeepCopy() *PerconaServerMySQLRestoreSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaServerMySQLRestoreSpec.
func (*PerconaServerMySQLRestoreSpec) DeepCopyInto ¶
func (in *PerconaServerMySQLRestoreSpec) DeepCopyInto(out *PerconaServerMySQLRestoreSpec)
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"`
ErroredGeneration int64 `json:"erroredGeneration,omitempty"`
CompletedAt *metav1.Time `json:"completed,omitempty"`
}
PerconaServerMySQLRestoreStatus defines the observed state of PerconaServerMySQLRestore
func (*PerconaServerMySQLRestoreStatus) DeepCopy ¶
func (in *PerconaServerMySQLRestoreStatus) DeepCopy() *PerconaServerMySQLRestoreStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaServerMySQLRestoreStatus.
func (*PerconaServerMySQLRestoreStatus) DeepCopyInto ¶
func (in *PerconaServerMySQLRestoreStatus) DeepCopyInto(out *PerconaServerMySQLRestoreStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (PerconaServerMySQLRestoreStatus) Equals ¶ added in v1.3.0
func (s PerconaServerMySQLRestoreStatus) Equals(o PerconaServerMySQLRestoreStatus) bool
Equals reports whether the restore controller would have to write s to replace o: it compares the fields the controller sets itself.
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"`
LogCollector *LogCollectorSpec `json:"logcollector,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"`
// +listType=map
// +listMapKey=name
Users []User `json:"users,omitempty"`
}
PerconaServerMySQLSpec defines the desired state of PerconaServerMySQL +kubebuilder:validation:XValidation:rule="!(self.mysql.clusterType == 'async') || self.unsafeFlags.orchestrator || (has(self.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.asyncFailoverWithPossibleDataLoss || (has(self.backup) && self.backup.enabled)",message="Invalid configuration: When 'mysql.clusterType' is set to 'async', 'backup.enabled' must be true unless 'unsafeFlags.asyncFailoverWithPossibleDataLoss' is enabled. Without backups a failover cannot recover the transactions stranded on the old primary" +kubebuilder:validation:XValidation:rule="!(self.mysql.clusterType == 'async') || self.unsafeFlags.proxy || (has(self.proxy) && has(self.proxy.haproxy) && 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') || !has(self.proxy) || !has(self.proxy.router) || !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="!(self.mysql.clusterType == 'async' && has(self.mysql.size) && self.mysql.size < 2) || self.unsafeFlags.mysqlSize",message="Invalid configuration: For 'async' replication, MySQL size must be 2 or greater unless 'unsafeFlags.mysqlSize' is enabled" +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 || (has(self.proxy) && ((has(self.proxy.router) && self.proxy.router.enabled) || (has(self.proxy.haproxy) && 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.unsafeFlags.proxySize || !(self.mysql.clusterType == 'group-replication' && has(self.proxy) && has(self.proxy.router) && self.proxy.router.enabled && has(self.proxy.router.size) && self.proxy.router.size < 2)",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.unsafeFlags.orchestratorSize || !(self.mysql.clusterType == 'async' && has(self.orchestrator) && has(self.orchestrator.size) && (self.orchestrator.size < 3 || self.orchestrator.size % 2 == 0) && self.orchestrator.size > 0)",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') || (has(self.orchestrator) && self.orchestrator.enabled)",message="Invalid configuration: For 'async' replication, SmartUpdate requires Orchestrator to be enabled" +kubebuilder:validation:XValidation:rule="!has(self.proxy) || !(has(self.proxy.router) && has(self.proxy.router.enabled) && self.proxy.router.enabled && has(self.proxy.haproxy) && has(self.proxy.haproxy.enabled) && self.proxy.haproxy.enabled)",message="Invalid configuration: MySQL Router and HAProxy can't be enabled at the same time" +kubebuilder:validation:XValidation:rule="(oldSelf.mysql.clusterType == self.mysql.clusterType) || self.mysql.clusterType == 'async' || !self.?orchestrator.?enabled.orValue(false)",message="spec.orchestrator.enabled should be false when switching from async cluster type"
func (*PerconaServerMySQLSpec) DeepCopy ¶
func (in *PerconaServerMySQLSpec) DeepCopy() *PerconaServerMySQLSpec
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"`
ClusterType ClusterType `json:"clusterType,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 ¶
func (in *PerconaServerMySQLStatus) DeepCopy() *PerconaServerMySQLStatus
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PiTRSpec.
func (*PiTRSpec) DeepCopyInto ¶
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"`
}
func (*PodDisruptionBudgetSpec) DeepCopy ¶
func (in *PodDisruptionBudgetSpec) DeepCopy() *PodDisruptionBudgetSpec
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) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpec.
func (*PodSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodSpec) GetAffinity ¶
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 ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxySpec.
func (*ProxySpec) DeepCopyInto ¶
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
type RecoveryMethod ¶ added in v1.2.0
type RecoveryMethod string
const ( RecoveryMethodClone RecoveryMethod = "clone" RecoveryMethodIncremental RecoveryMethod = "incremental" RecoveryMethodAuto RecoveryMethod = "auto" )
type RestoreBackupSource ¶ added in v1.3.0
type RestoreBackupSource struct {
Destination BackupDestination `json:"destination,omitempty"`
Storage *BackupStorageSpec `json:"storage,omitempty"`
}
func (*RestoreBackupSource) DeepCopy ¶ added in v1.3.0
func (in *RestoreBackupSource) DeepCopy() *RestoreBackupSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestoreBackupSource.
func (*RestoreBackupSource) DeepCopyInto ¶ added in v1.3.0
func (in *RestoreBackupSource) DeepCopyInto(out *RestoreBackupSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RestorePITRBackupSource ¶ added in v1.2.0
type RestorePITRBackupSource struct {
BinlogServer *BinlogServerSpec `json:"binlogServer,omitempty"`
}
func (*RestorePITRBackupSource) DeepCopy ¶ added in v1.2.0
func (in *RestorePITRBackupSource) DeepCopy() *RestorePITRBackupSource
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"`
// KeyringSecret is an optional reference to a Secret containing the keyring file for decrypting binlogs.
// By default the operator will attempt to use the keyring specified for the cluster,
// but in case the keys have been rotated, you can specify a different keyring secret to use for the restore.
KeyringSecret *BinlogServerKeyringSecretSelector `json:"keyringSecret,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 ¶
func (in *ServiceExposeTogglable) DeepCopy() *ServiceExposeTogglable
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 ( StateNew StatefulAppState = "" 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
func (in *StorageAutoscalingStatus) DeepCopy() *StorageAutoscalingStatus
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" UserConfigurator SystemUser = "configurator" )
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.IssuerReference `json:"issuerConf,omitempty"`
}
func (*TLSSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSSpec.
func (*TLSSpec) DeepCopyInto ¶
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
func (in *UnsafeClusterSetFlags) DeepCopy() *UnsafeClusterSetFlags
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"`
// AsyncFailoverWithPossibleDataLoss allows to disable backups for async clusters.
// Failover then cannot recover the transactions stranded on the old primary.
AsyncFailoverWithPossibleDataLoss bool `json:"asyncFailoverWithPossibleDataLoss,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 User ¶ added in v1.3.0
type User struct {
// Name of the user to be created.
// +kubebuilder:validation:Required
// +kubebuilder:validation:Pattern="^[^`'\\\\]*$"
Name string `json:"name"`
// PasswordSecretRef is a reference to the Secret that holds this user's password.
// +kubebuilder:validation:Optional
PasswordSecretRef *UserSecretKeySelector `json:"passwordSecretRef,omitempty"`
// DBs is a list of databases that the user has access to. If empty, the user will have access to all databases.
// +kubebuilder:validation:items:Pattern="^[^`'\\\\]*$"
DBs []string `json:"dbs,omitempty"`
// Hosts is a list of hosts that the user can connect from. If empty, the user will be able to connect from any host.
// +kubebuilder:validation:items:Pattern="^[^`'\\\\]*$"
Hosts []string `json:"hosts,omitempty"`
// Grants is a list of grants that the user has. If empty, the user will have all privileges.
Grants []string `json:"grants,omitempty"`
// WithGrantOption grants the user the ability to grant their own privileges to other users.
WithGrantOption bool `json:"withGrantOption,omitempty"`
}
User defines a MySQL user
func (*User) DeepCopy ¶ added in v1.3.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new User.
func (*User) DeepCopyInto ¶ added in v1.3.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UserSecretKeySelector ¶ added in v1.3.0
type UserSecretKeySelector struct {
// +kubebuilder:validation:Required
Name string `json:"name"`
// +kubebuilder:validation:Optional
// +kubebuilder:default:=password
Key string `json:"key"`
}
func (*UserSecretKeySelector) DeepCopy ¶ added in v1.3.0
func (in *UserSecretKeySelector) DeepCopy() *UserSecretKeySelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserSecretKeySelector.
func (*UserSecretKeySelector) DeepCopyInto ¶ added in v1.3.0
func (in *UserSecretKeySelector) DeepCopyInto(out *UserSecretKeySelector)
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.