v1

package
v0.0.0-...-c2ba8ab Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package v1 defines the types for the MySQL Operator v1 API. +groupName=mysql.oracle.com

Index

Constants

View Source
const (
	// BackupCRDResourceSingular defines the singular custom resource name for MySQL backups.
	BackupCRDResourceSingular = "mysqlbackup"

	// BackupCRDResourcePlural defines the plural custom resource name for MySQL backups.
	BackupCRDResourcePlural = "mysqlbackups"
)
View Source
const (
	// MySQLClusterCRDResourceKind is the Kind of a MySQLCluster.
	MySQLClusterCRDResourceKind = "MySQLCluster"
	// MySQLBackupCRDResourceKind is the Kind of a MySQLBackup.
	MySQLBackupCRDResourceKind = "MySQLBackup"
	// MySQLRestoreCRDResourceKind is the Kind of a MySQLRestore.
	MySQLRestoreCRDResourceKind = "MySQLRestore"
	// MySQLBackupScheduleCRDResourceKind is the Kind of a MySQLBackupSchedule.
	MySQLBackupScheduleCRDResourceKind = "MySQLBackupSchedule"
)
View Source
const (
	// RestoreCRDResourceSingular defines the singular custom resource name for
	// MySQLRestores.
	RestoreCRDResourceSingular = "mysqlrestore"

	// RestoreCRDResourcePlural defines the plural custom resource name for
	// MySQLRestores.
	RestoreCRDResourcePlural = "mysqlrestores"
)
View Source
const ClusterCRDResourcePlural = "mysqlclusters"

ClusterCRDResourcePlural defines the custom resource name for mysqlclusters

View Source
const GroupName = "mysql.oracle.com"

GroupName is the group name for the MySQL Operator API.

View Source
const (
	// ProviderS3 denotes S3 compatability backed storage provider.
	ProviderS3 = "s3"
)

Variables

View Source
var (
	// SchemeBuilder collects the scheme builder functions for the MySQL
	// Operator API.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	// AddToScheme applies the SchemeBuilder functions to a specified scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var ExecutorProviders = []string{"mysqldump"}

ExecutorProviders denotes the list of valid backup executor providers.

MySQLClusterValidPhases denote the life-cycle states a cluster can be in.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}

SchemeGroupVersion is the GroupVersion for the MySQL Operator API.

Functions

func GetOperatorVersionLabel

func GetOperatorVersionLabel(labelMap map[string]string) string

GetOperatorVersionLabel get the specified operator version label on the label map.

func Resource

func Resource(resource string) schema.GroupResource

Resource gets a MySQL Operator GroupResource for a specified resource.

func SetOperatorVersionLabel

func SetOperatorVersionLabel(labelMap map[string]string, label string)

SetOperatorVersionLabel sets the specified operator version label on the label map.

Types

type BackupOutcome

type BackupOutcome struct {
	// Location is the Object Storage network location of the MySQLBackup.
	Location string `json:"location"`
}

BackupOutcome describes the location of a MySQL Backup

func (*BackupOutcome) DeepCopy

func (in *BackupOutcome) DeepCopy() *BackupOutcome

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

func (*BackupOutcome) DeepCopyInto

func (in *BackupOutcome) DeepCopyInto(out *BackupOutcome)

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

type BackupPhase

type BackupPhase string

BackupPhase represents the current life-cycle phase of a MySQLBackup.

const (
	// BackupPhaseUnknown means that the backup hasn't yet been processed.
	BackupPhaseUnknown BackupPhase = ""

	// BackupPhaseNew means that the Backup hasn't yet been processed.
	BackupPhaseNew BackupPhase = "New"

	// BackupPhaseScheduled means that the Backup has been scheduled on an
	// appropriate replica.
	BackupPhaseScheduled BackupPhase = "Scheduled"

	// BackupPhaseStarted means the backup is in progress.
	BackupPhaseStarted BackupPhase = "Started"

	// BackupPhaseComplete means the backup has terminated successfully.
	BackupPhaseComplete BackupPhase = "Complete"

	// BackupPhaseFailed means the backup has terminated with an error.
	BackupPhaseFailed BackupPhase = "Failed"
)

type BackupSchedulePhase

type BackupSchedulePhase string

BackupSchedulePhase is a string representation of the lifecycle phase of a backup schedule.

const (
	// BackupSchedulePhaseNew means the backup schedule has been created but not
	// yet processed by the backup schedule controller.
	BackupSchedulePhaseNew BackupSchedulePhase = "New"

	// BackupSchedulePhaseEnabled means the backup schedule has been validated and
	// will now be triggering backups according to the schedule spec.
	BackupSchedulePhaseEnabled BackupSchedulePhase = "Enabled"

	// BackupSchedulePhaseFailedValidation means the backup schedule has failed
	// the controller's validations and therefore will not trigger backups.
	BackupSchedulePhaseFailedValidation BackupSchedulePhase = "FailedValidation"
)

type BackupScheduleSpec

type BackupScheduleSpec struct {
	// Schedule specifies the cron string used for backup scheduling.
	Schedule string `json:"schedule"`

	// BackupTemplate is the specification of the backup structure
	// to get scheduled.
	BackupTemplate BackupSpec `json:"backupTemplate"`
}

BackupScheduleSpec defines the specification for a MySQL backup schedule.

func (*BackupScheduleSpec) DeepCopy

func (in *BackupScheduleSpec) DeepCopy() *BackupScheduleSpec

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

func (*BackupScheduleSpec) DeepCopyInto

func (in *BackupScheduleSpec) DeepCopyInto(out *BackupScheduleSpec)

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

type BackupSpec

type BackupSpec struct {
	// Executor is the configuration of the tool that will produce the backup, and a definition of
	// what databases and tables to backup.
	Executor *Executor `json:"executor"`

	// Storage is the configuration of where and how backups should be stored.
	Storage *Storage `json:"storage"`

	// ClusterRef is a reference to the MySQLCluster to which the MySQLBackup belongs.
	ClusterRef *corev1.LocalObjectReference `json:"clusterRef"`

	// AgentScheduled is the agent hostname to run the backup on
	AgentScheduled string `json:"agentscheduled"`
}

BackupSpec defines the specification for a MySQL backup. This includes what should be backed up, what tool should perform the backup, and, where the backup should be stored.

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.

type BackupStatus

type BackupStatus struct {
	// Phase is the current life-cycle phase of the MySQLBackup.
	Phase BackupPhase `json:"phase"`

	// Outcome holds the results of a successful backup.
	Outcome BackupOutcome `json:"outcome"`

	// TimeStarted is the time at which the backup was started.
	TimeStarted metav1.Time `json:"timeStarted"`

	// TimeCompleted is the time at which the backup completed.
	TimeCompleted metav1.Time `json:"timeCompleted"`
}

BackupStatus captures the current status of a MySQL backup.

func (*BackupStatus) DeepCopy

func (in *BackupStatus) DeepCopy() *BackupStatus

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

func (*BackupStatus) DeepCopyInto

func (in *BackupStatus) DeepCopyInto(out *BackupStatus)

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

type Executor

type Executor struct {
	// The name of the tool performing the backup, e.g. mysqldump.
	Provider string `json:"provider"`
	// The databases to backup.
	Databases []string `json:"databases"`
}

Executor represents the configuration of the tool performing the backup. This includes the tool to use, and, what database and tables should be backed up. The storage of the backup is configured in the relevant Storage configuration.

func (*Executor) DeepCopy

func (in *Executor) DeepCopy() *Executor

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

func (*Executor) DeepCopyInto

func (in *Executor) DeepCopyInto(out *Executor)

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

type MySQLBackup

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

	Spec   BackupSpec   `json:"spec"`
	Status BackupStatus `json:"status"`
}

MySQLBackup is a MySQL Operator resource that represents a backup of a MySQL cluster. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*MySQLBackup) DeepCopy

func (in *MySQLBackup) DeepCopy() *MySQLBackup

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

func (*MySQLBackup) DeepCopyInto

func (in *MySQLBackup) DeepCopyInto(out *MySQLBackup)

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

func (*MySQLBackup) DeepCopyObject

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

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

func (MySQLBackup) EnsureDefaults

func (b MySQLBackup) EnsureDefaults() *MySQLBackup

EnsureDefaults can be invoked to ensure the default values are present.

func (MySQLBackup) Validate

func (b MySQLBackup) Validate() error

Validate checks if the resource spec is valid.

type MySQLBackupList

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

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

MySQLBackupList is a list of MySQLBackups. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*MySQLBackupList) DeepCopy

func (in *MySQLBackupList) DeepCopy() *MySQLBackupList

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

func (*MySQLBackupList) DeepCopyInto

func (in *MySQLBackupList) DeepCopyInto(out *MySQLBackupList)

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

func (*MySQLBackupList) DeepCopyObject

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

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

type MySQLBackupSchedule

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

	Spec   BackupScheduleSpec `json:"spec"`
	Status ScheduleStatus     `json:"status,omitempty"`
}

MySQLBackupSchedule is a MySQL Operator resource that represents a backup schedule of a MySQL cluster. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*MySQLBackupSchedule) DeepCopy

func (in *MySQLBackupSchedule) DeepCopy() *MySQLBackupSchedule

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

func (*MySQLBackupSchedule) DeepCopyInto

func (in *MySQLBackupSchedule) DeepCopyInto(out *MySQLBackupSchedule)

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

func (*MySQLBackupSchedule) DeepCopyObject

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

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

func (MySQLBackupSchedule) EnsureDefaults

func (b MySQLBackupSchedule) EnsureDefaults() *MySQLBackupSchedule

EnsureDefaults can be invoked to ensure the default values are present.

func (MySQLBackupSchedule) Validate

func (b MySQLBackupSchedule) Validate() error

Validate checks if the resource spec is valid.

type MySQLBackupScheduleList

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

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

MySQLBackupScheduleList is a list of MySQLBackupSchedules. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*MySQLBackupScheduleList) DeepCopy

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

func (*MySQLBackupScheduleList) DeepCopyInto

func (in *MySQLBackupScheduleList) DeepCopyInto(out *MySQLBackupScheduleList)

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

func (*MySQLBackupScheduleList) DeepCopyObject

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

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

type MySQLCluster

type MySQLCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              MySQLClusterSpec   `json:"spec"`
	Status            MySQLClusterStatus `json:"status"`
}

MySQLCluster represents a cluster spec and associated metadata +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*MySQLCluster) DeepCopy

func (in *MySQLCluster) DeepCopy() *MySQLCluster

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

func (*MySQLCluster) DeepCopyInto

func (in *MySQLCluster) DeepCopyInto(out *MySQLCluster)

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

func (*MySQLCluster) DeepCopyObject

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

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

func (*MySQLCluster) EnsureDefaults

func (c *MySQLCluster) EnsureDefaults() *MySQLCluster

EnsureDefaults will ensure that if a user omits and fields in the spec that are required, we set some sensible defaults. For example a user can choose to omit the version and number of replics

func (*MySQLCluster) GetObjectKind

func (c *MySQLCluster) GetObjectKind() schema.ObjectKind

GetObjectKind is required for codegen

func (*MySQLCluster) RequiresConfigMount

func (c *MySQLCluster) RequiresConfigMount() bool

RequiresConfigMount will return true if a user has specified a config map for configuring the cluster else false

func (*MySQLCluster) RequiresSecret

func (c *MySQLCluster) RequiresSecret() bool

RequiresSecret returns true if a secret should be generated for a MySQL cluster else false

func (*MySQLCluster) Validate

func (c *MySQLCluster) Validate() error

Validate returns an error if a cluster is invalid

type MySQLClusterList

type MySQLClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []MySQLCluster `json:"items"`
}

MySQLClusterList is a placeholder type for a list of MySQL clusters +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*MySQLClusterList) DeepCopy

func (in *MySQLClusterList) DeepCopy() *MySQLClusterList

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

func (*MySQLClusterList) DeepCopyInto

func (in *MySQLClusterList) DeepCopyInto(out *MySQLClusterList)

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

func (*MySQLClusterList) DeepCopyObject

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

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

func (*MySQLClusterList) GetObjectKind

func (c *MySQLClusterList) GetObjectKind() schema.ObjectKind

GetObjectKind is required for codegen

type MySQLClusterPhase

type MySQLClusterPhase string

MySQLClusterPhase describes the state of the cluster.

const (
	// MySQLClusterPending means the cluster has been accepted by the system,
	// but one or more of the services or statefulsets has not been started.
	// This includes time before being bound to a node, as well as time spent
	// pulling images onto the host.
	MySQLClusterPending MySQLClusterPhase = "Pending"

	// MySQLClusterRunning means the cluster has been created, all of it's
	// required components are present, and there is at least one endpoint that
	// mysql client can connect to.
	MySQLClusterRunning MySQLClusterPhase = "Running"

	// MySQLClusterSucceeded means that all containers in the pod have
	// voluntarily terminated with a container exit code of 0, and the system
	// is not going to restart any of these containers.
	MySQLClusterSucceeded MySQLClusterPhase = "Succeeded"

	// MySQLClusterFailed means that all containers in the pod have terminated,
	// and at least one container has terminated in a failure (exited with a
	// non-zero exit code or was stopped by the system).
	MySQLClusterFailed MySQLClusterPhase = "Failed"

	// MySQLClusterUnknown means that for some reason the state of the cluster
	// could not be obtained, typically due to an error in communicating with
	// the host of the pod.
	MySQLClusterUnknown MySQLClusterPhase = ""
)

type MySQLClusterSpec

type MySQLClusterSpec struct {
	// Version defines the MySQL Docker image version.
	Version string `json:"version"`

	// Replicas defines the number of running MySQL instances in a cluster
	Replicas int32 `json:"replicas,omitempty"`

	// InitDBName defines the init database name of running MySQL instances in a cluster
	InitDBName *string `json:"dbName,omitempty"`

	// MultiMaster defines the mode of the MySQL cluster. If set to true,
	// all instances will be R/W. If false (the default), only a single instance
	// will be R/W and the rest will be R/O.
	MultiMaster bool `json:"multiMaster,omitempty"`

	// NodeSelector is a selector which must be true for the pod to fit on a node.
	// Selector which must match a node's labels for the pod to be scheduled on that node.
	// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// If specified, affinity will define the pod's scheduling constraints
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`

	// VolumeClaimTemplate allows a user to specify how volumes inside a MySQL cluster
	// +optional
	VolumeClaimTemplate *corev1.PersistentVolumeClaim `json:"volumeClaimTemplate,omitempty"`

	// BackupVolumeClaimTemplate allows a user to specify a volume to temporarily store the
	// data for a backup prior to it being shipped to object storage.
	// +optional
	BackupVolumeClaimTemplate *corev1.PersistentVolumeClaim `json:"backupVolumeClaimTemplate,omitempty"`

	// If defined, we use this secret for configuring the MYSQL_ROOT_PASSWORD
	// If it is not set we generate a secret dynamically
	// +optional
	SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`

	// ConfigRef allows a user to specify a custom configuration file for MySQL.
	// +optional
	ConfigRef *corev1.LocalObjectReference `json:"configRef,omitempty"`
}

MySQLClusterSpec defines the attributes a user can specify when creating a cluster

func (*MySQLClusterSpec) DeepCopy

func (in *MySQLClusterSpec) DeepCopy() *MySQLClusterSpec

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

func (*MySQLClusterSpec) DeepCopyInto

func (in *MySQLClusterSpec) DeepCopyInto(out *MySQLClusterSpec)

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

type MySQLClusterStatus

type MySQLClusterStatus struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Phase             MySQLClusterPhase `json:"phase"`
	Errors            []string          `json:"errors"`
}

MySQLClusterStatus defines the current status of a MySQL cluster propagating useful information back to the cluster admin +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*MySQLClusterStatus) DeepCopy

func (in *MySQLClusterStatus) DeepCopy() *MySQLClusterStatus

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

func (*MySQLClusterStatus) DeepCopyInto

func (in *MySQLClusterStatus) DeepCopyInto(out *MySQLClusterStatus)

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

func (*MySQLClusterStatus) DeepCopyObject

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

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

func (*MySQLClusterStatus) GetObjectKind

func (c *MySQLClusterStatus) GetObjectKind() schema.ObjectKind

GetObjectKind is required for codegen

type MySQLRestore

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

	Spec   RestoreSpec   `json:"spec"`
	Status RestoreStatus `json:"status"`
}

MySQLRestore is a MySQL Operator resource that represents the restoration of backup of a MySQL cluster. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*MySQLRestore) DeepCopy

func (in *MySQLRestore) DeepCopy() *MySQLRestore

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

func (*MySQLRestore) DeepCopyInto

func (in *MySQLRestore) DeepCopyInto(out *MySQLRestore)

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

func (*MySQLRestore) DeepCopyObject

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

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

func (MySQLRestore) EnsureDefaults

func (r MySQLRestore) EnsureDefaults() *MySQLRestore

EnsureDefaults can be invoked to ensure the default values are present.

func (MySQLRestore) Validate

func (r MySQLRestore) Validate() error

Validate checks if the resource spec is valid.

type MySQLRestoreList

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

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

MySQLRestoreList is a list of MySQLRestores. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*MySQLRestoreList) DeepCopy

func (in *MySQLRestoreList) DeepCopy() *MySQLRestoreList

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

func (*MySQLRestoreList) DeepCopyInto

func (in *MySQLRestoreList) DeepCopyInto(out *MySQLRestoreList)

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

func (*MySQLRestoreList) DeepCopyObject

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

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

type RestorePhase

type RestorePhase string

RestorePhase represents the current life-cycle phase of a MySQLRestore.

const (
	// RestorePhaseUnknown means that the restore hasn't yet been processed.
	RestorePhaseUnknown RestorePhase = ""

	// RestorePhaseNew means that the restore hasn't yet been processed.
	RestorePhaseNew RestorePhase = "New"

	// RestorePhaseScheduled means that the restore has been scheduled on an
	// appropriate replica.
	RestorePhaseScheduled RestorePhase = "Scheduled"

	// RestorePhaseStarted means the restore is in progress.
	RestorePhaseStarted RestorePhase = "Started"

	// RestorePhaseComplete means the restore has terminated successfully.
	RestorePhaseComplete RestorePhase = "Complete"

	// RestorePhaseFailed means the Restore has terminated with an error.
	RestorePhaseFailed RestorePhase = "Failed"
)

type RestoreSpec

type RestoreSpec struct {
	// ClusterRef is a refeference to the MySQLCluster to which the MySQLRestore
	// belongs.
	ClusterRef *v1.LocalObjectReference `json:"clusterRef"`

	// BackupRef is a reference to the MySQLBackup object to be restored.
	BackupRef *v1.LocalObjectReference `json:"backupRef"`

	// AgentScheduled is the agent hostname to run the backup on
	AgentScheduled string `json:"agentscheduled"`
}

RestoreSpec defines the specification for a restore of a MySQL backup.

func (*RestoreSpec) DeepCopy

func (in *RestoreSpec) DeepCopy() *RestoreSpec

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

func (*RestoreSpec) DeepCopyInto

func (in *RestoreSpec) DeepCopyInto(out *RestoreSpec)

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

type RestoreStatus

type RestoreStatus struct {
	// Phase is the current life-cycle phase of the MySQLRestore.
	Phase RestorePhase `json:"phase"`

	// TimeStarted is the time at which the restore was started.
	TimeStarted metav1.Time `json:"timeStarted"`

	// TimeCompleted is the time at which the restore completed.
	TimeCompleted metav1.Time `json:"timeCompleted"`
}

RestoreStatus captures the current status of a MySQL restore.

func (*RestoreStatus) DeepCopy

func (in *RestoreStatus) DeepCopy() *RestoreStatus

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

func (*RestoreStatus) DeepCopyInto

func (in *RestoreStatus) DeepCopyInto(out *RestoreStatus)

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

type ScheduleStatus

type ScheduleStatus struct {
	// Phase is the current phase of the MySQL backup schedule.
	Phase BackupSchedulePhase `json:"phase"`

	// LastBackup is the last time a MySQLBackup was run for this
	// backup schedule.
	LastBackup metav1.Time `json:"lastBackup"`
}

ScheduleStatus captures the current state of a MySQL backup schedule.

func (*ScheduleStatus) DeepCopy

func (in *ScheduleStatus) DeepCopy() *ScheduleStatus

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

func (*ScheduleStatus) DeepCopyInto

func (in *ScheduleStatus) DeepCopyInto(out *ScheduleStatus)

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

type Storage

type Storage struct {
	// Provider denotes the type of storage provider that will store and retrieve the backups,
	// e.g. s3, oci-s3-compat, aws-s3, gce-s3, etc.
	Provider string `json:"provider"`
	// SecretRef is a reference to the Kubernetes secret containing the configuration for uploading
	// the backup to authenticated storage.
	SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`
	// Config is generic string based key-value map that defines non-secret configuration values for
	// uploading the backup to storage w.r.t the configured storage provider.
	Config map[string]string `json:"config,omitempty"`
}

Storage defines the configuration for storing a MySQL backup to a storage service. The generation of the backup is configured in the Executor configuration.

func (*Storage) DeepCopy

func (in *Storage) DeepCopy() *Storage

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

func (*Storage) DeepCopyInto

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

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

Jump to

Keyboard shortcuts

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