Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the mysql v1alpha1 API group +kubebuilder:object:generate:=true +groupName=mysql.presslabs.org
Index ¶
- Constants
- Variables
- func DeletionPolicyRetain(obj client.Object) bool
- func RegisterDefaults(scheme *runtime.Scheme) error
- func SetDefaults_MysqlBackup(b *MysqlBackup)
- func SetDefaults_MysqlCluster(c *MysqlCluster)
- func SetObjectDefaults_MysqlBackup(in *MysqlBackup)
- func SetObjectDefaults_MysqlBackupList(in *MysqlBackupList)
- func SetObjectDefaults_MysqlCluster(in *MysqlCluster)
- func SetObjectDefaults_MysqlClusterList(in *MysqlClusterList)
- type BackupCondition
- type BackupConditionType
- type ClusterCondition
- type ClusterConditionType
- type ClusterReference
- type DeletePolicy
- type MySQLUserCondition
- type MysqlBackup
- type MysqlBackupList
- type MysqlBackupSpec
- type MysqlBackupStatus
- type MysqlCluster
- type MysqlClusterList
- type MysqlClusterSpec
- type MysqlClusterStatus
- type MysqlConf
- type MysqlDatabase
- type MysqlDatabaseCondition
- type MysqlDatabaseConditionType
- type MysqlDatabaseList
- type MysqlDatabaseSpec
- type MysqlDatabaseStatus
- type MysqlPermission
- type MysqlResourceDeletionPolicy
- type MysqlUser
- type MysqlUserConditionType
- type MysqlUserList
- type MysqlUserSpec
- type MysqlUserStatus
- type NodeCondition
- type NodeConditionType
- type NodeStatus
- type PodSpec
- type QueryLimits
- type VolumeSpec
Constants ¶
const ( // MysqlResourceDeletionPolicyAnnotationKey delete policy key defined MysqlResourceDeletionPolicyAnnotationKey = "mysql-operator.presslabs.org/resourceDeletionPolicy" // MysqlResourceDeletionPolicyDelete delete policy delete MysqlResourceDeletionPolicyDelete = MysqlResourceDeletionPolicy("delete") // MysqlResourceDeletionPolicyRetain delete policy retain MysqlResourceDeletionPolicyRetain = MysqlResourceDeletionPolicy("retain") )
const ( // AccountResourceMaxUserConnections it restricts the maximum number of simultaneous connections to the server // by each account AccountResourceMaxUserConnections corev1.ResourceName = "MAX_USER_CONNECTIONS" // AccountResourceMaxQueriesPerHour it restricts how many queries to the server // are permitted to each account during any given one-hour period. AccountResourceMaxQueriesPerHour corev1.ResourceName = "MAX_QUERIES_PER_HOUR" // AccountResourceMaxUpdatesPerHour it restricts how many updates to the server // are permitted to each account during any given one-hour period. AccountResourceMaxUpdatesPerHour corev1.ResourceName = "MAX_UPDATES_PER_HOUR" // AccountResourceMaxConnectionsPerHour it restricts how many connections to the server // are permitted to each account during any given one-hour period. AccountResourceMaxConnectionsPerHour corev1.ResourceName = "MAX_CONNECTIONS_PER_HOUR" )
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "mysql.presslabs.org", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} )
Functions ¶
func DeletionPolicyRetain ¶ added in v0.6.3
DeletionPolicyRetain parse obj is need to retain
func RegisterDefaults ¶ added in v0.2.2
RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.
func SetDefaults_MysqlBackup ¶ added in v0.2.8
func SetDefaults_MysqlBackup(b *MysqlBackup)
SetDefaults_MysqlBackup sets the defaults for a mysqlbackup object nolint: golint
func SetDefaults_MysqlCluster ¶ added in v0.2.2
func SetDefaults_MysqlCluster(c *MysqlCluster)
SetDefaults_MysqlCluster sets the defaults for a MySQLCLuster object nolint
func SetObjectDefaults_MysqlBackup ¶ added in v0.2.8
func SetObjectDefaults_MysqlBackup(in *MysqlBackup)
func SetObjectDefaults_MysqlBackupList ¶ added in v0.2.8
func SetObjectDefaults_MysqlBackupList(in *MysqlBackupList)
func SetObjectDefaults_MysqlCluster ¶ added in v0.2.2
func SetObjectDefaults_MysqlCluster(in *MysqlCluster)
func SetObjectDefaults_MysqlClusterList ¶ added in v0.2.2
func SetObjectDefaults_MysqlClusterList(in *MysqlClusterList)
Types ¶
type BackupCondition ¶
type BackupCondition struct {
// type of cluster condition, values in (\"Ready\")
Type BackupConditionType `json:"type"`
// Status of the condition, one of (\"True\", \"False\", \"Unknown\")
Status core.ConditionStatus `json:"status"`
// LastTransitionTime
LastTransitionTime metav1.Time `json:"lastTransitionTime"`
// Reason
Reason string `json:"reason"`
// Message
Message string `json:"message"`
}
BackupCondition defines condition struct for backup resource
func (*BackupCondition) DeepCopy ¶
func (in *BackupCondition) DeepCopy() *BackupCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupCondition.
func (*BackupCondition) DeepCopyInto ¶
func (in *BackupCondition) DeepCopyInto(out *BackupCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupConditionType ¶
type BackupConditionType string
BackupConditionType defines condition types of a backup resources
const ( // BackupComplete means the backup has finished his execution BackupComplete BackupConditionType = "Complete" // BackupFailed means backup has failed BackupFailed BackupConditionType = "Failed" )
type ClusterCondition ¶
type ClusterCondition struct {
// type of cluster condition, values in (\"Ready\")
Type ClusterConditionType `json:"type"`
// Status of the condition, one of (\"True\", \"False\", \"Unknown\")
Status core.ConditionStatus `json:"status"`
// LastTransitionTime
LastTransitionTime metav1.Time `json:"lastTransitionTime"`
// Reason
Reason string `json:"reason"`
// Message
Message string `json:"message"`
}
ClusterCondition defines type for cluster conditions.
func (*ClusterCondition) DeepCopy ¶
func (in *ClusterCondition) DeepCopy() *ClusterCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCondition.
func (*ClusterCondition) DeepCopyInto ¶
func (in *ClusterCondition) DeepCopyInto(out *ClusterCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterConditionType ¶
type ClusterConditionType string
ClusterConditionType defines type for cluster condition type.
const ( // ClusterConditionReady represents the readiness of the cluster. This // condition is the same sa statefulset Ready condition. ClusterConditionReady ClusterConditionType = "Ready" // ClusterConditionFailoverAck represents if the cluster has pending ack in // orchestrator or not. ClusterConditionFailoverAck ClusterConditionType = "PendingFailoverAck" // ClusterConditionReadOnly describe cluster state if it's in read only or // writable. ClusterConditionReadOnly ClusterConditionType = "ReadOnly" // ClusterConditionFailoverInProgress indicates if there is a current failover in progress // done by the Orchestrator ClusterConditionFailoverInProgress ClusterConditionType = "FailoverInProgress" )
type ClusterReference ¶ added in v0.5.0
type ClusterReference struct {
corev1.LocalObjectReference `json:",inline"`
// Namespace the MySQL cluster namespace
Namespace string `json:"namespace,omitempty"`
}
ClusterReference represents a cross namespace object reference
func (*ClusterReference) DeepCopy ¶ added in v0.5.0
func (in *ClusterReference) DeepCopy() *ClusterReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterReference.
func (*ClusterReference) DeepCopyInto ¶ added in v0.5.0
func (in *ClusterReference) DeepCopyInto(out *ClusterReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeletePolicy ¶ added in v0.2.8
type DeletePolicy string
DeletePolicy defines the types of policies for backup deletions are
const ( // Delete when used it will try to delete the backup from remote storage then will remove the // MysqlBackup resource from Kubernetes. The remote deletion is not guaranteed that will succeed. Delete DeletePolicy = "delete" // Retain when used it will delete only the MysqlBackup resource from Kuberentes and will keep the backup // on remote storage. Retain DeletePolicy = "retain" )
type MySQLUserCondition ¶ added in v0.5.0
type MySQLUserCondition struct {
// Type of MysqlUser condition.
Type MysqlUserConditionType `json:"type"`
// Status of the condition, one of True, False, Unknown.
Status corev1.ConditionStatus `json:"status"`
// The last time this condition was updated.
LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
// Last time the condition transitioned from one status to another.
LastTransitionTime metav1.Time `json:"lastTransitionTime"`
// The reason for the condition's last transition.
Reason string `json:"reason"`
// A human readable message indicating details about the transition.
Message string `json:"message"`
}
MySQLUserCondition defines the condition struct for a MysqlUser resource
func (*MySQLUserCondition) DeepCopy ¶ added in v0.5.0
func (in *MySQLUserCondition) DeepCopy() *MySQLUserCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MySQLUserCondition.
func (*MySQLUserCondition) DeepCopyInto ¶ added in v0.5.0
func (in *MySQLUserCondition) DeepCopyInto(out *MySQLUserCondition)
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,omitempty"`
Spec MysqlBackupSpec `json:"spec,omitempty"`
Status MysqlBackupStatus `json:"status,omitempty"`
}
MysqlBackup is the Schema for the mysqlbackups API +kubebuilder:object:root=true
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.
type MysqlBackupList ¶
type MysqlBackupList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []MysqlBackup `json:"items"`
}
MysqlBackupList contains a list of MysqlBackup +kubebuilder:object:root=true
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 MysqlBackupSpec ¶ added in v0.2.2
type MysqlBackupSpec struct {
// ClustterName represents the cluster for which to take backup
ClusterName string `json:"clusterName"`
// BackupURL represents the URL to the backup location, this can be
// partially specifyied. Default is used the one specified in the cluster.
// +optional
BackupURL string `json:"backupURL,omitempty"`
// BackupSecretName the name of secrets that contains the credentials to
// access the bucket. Default is used the secret specified in cluster.
// +optional
BackupSecretName string `json:"backupSecretName,omitempty"`
// RemoteDeletePolicy the deletion policy that specify how to treat the data from remote storage. By
// default it's used softDelete.
// +optional
RemoteDeletePolicy DeletePolicy `json:"remoteDeletePolicy,omitempty"`
}
MysqlBackupSpec defines the desired state of MysqlBackup
func (*MysqlBackupSpec) DeepCopy ¶ added in v0.2.2
func (in *MysqlBackupSpec) DeepCopy() *MysqlBackupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MysqlBackupSpec.
func (*MysqlBackupSpec) DeepCopyInto ¶ added in v0.2.2
func (in *MysqlBackupSpec) DeepCopyInto(out *MysqlBackupSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MysqlBackupStatus ¶ added in v0.2.2
type MysqlBackupStatus struct {
// Completed indicates whether the backup is in a final state,
// no matter whether its' corresponding job failed or succeeded
Completed bool `json:"completed,omitempty"`
// Conditions represents the backup resource conditions list.
Conditions []BackupCondition `json:"conditions,omitempty"`
}
MysqlBackupStatus defines the observed state of MysqlBackup
func (*MysqlBackupStatus) DeepCopy ¶ added in v0.2.2
func (in *MysqlBackupStatus) DeepCopy() *MysqlBackupStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MysqlBackupStatus.
func (*MysqlBackupStatus) DeepCopyInto ¶ added in v0.2.2
func (in *MysqlBackupStatus) DeepCopyInto(out *MysqlBackupStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MysqlCluster ¶
type MysqlCluster struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec MysqlClusterSpec `json:"spec,omitempty"`
Status MysqlClusterStatus `json:"status,omitempty"`
}
MysqlCluster is the Schema for the mysqlclusters API +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.readyNodes +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type == 'Ready')].status",description="The cluster status" +kubebuilder:printcolumn:name="Replicas",type="integer",JSONPath=".spec.replicas",description="The number of desired nodes" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:shortName=mysql
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.
type MysqlClusterList ¶
type MysqlClusterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []MysqlCluster `json:"items"`
}
MysqlClusterList contains a list of MysqlCluster +kubebuilder:object:root=true
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.
type MysqlClusterSpec ¶ added in v0.2.2
type MysqlClusterSpec struct {
// The number of pods. This updates replicas filed
// Defaults to 0
// +optional
Replicas *int32 `json:"replicas,omitempty"`
// The secret name that contains connection information to initialize database, like
// USER, PASSWORD, ROOT_PASSWORD and so on
// This secret will be updated with DB_CONNECT_URL and some more configs.
// Can be specified partially
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=63
SecretName string `json:"secretName"`
// Represents the MySQL version that will be run. The available version can be found here:
// https://github.com/bitpoke/mysql-operator/blob/0fd4641ce4f756a0aab9d31c8b1f1c44ee10fcb2/pkg/util/constants/constants.go#L87
// This field should be set even if the Image is set to let the operator know which mysql version is running.
// Based on this version the operator can take decisions which features can be used.
// Defaults to 5.7
// +optional
MysqlVersion string `json:"mysqlVersion,omitempty"`
// To specify the image that will be used for mysql server container.
// If this is specified then the mysqlVersion is used as source for MySQL server version.
// +optional
Image string `json:"image,omitempty"`
// A bucket URL that contains a xtrabackup to initialize the mysql database.
// +optional
InitBucketURL string `json:"initBucketURL,omitempty"`
// Same as InitBucketURL but is DEPRECATED
// +optional
InitBucketURI string `json:"initBucketURI,omitempty"`
InitBucketSecretName string `json:"initBucketSecretName,omitempty"`
// The number of pods from that set that must still be available after the
// eviction, even in the absence of the evicted pod
// Defaults to 50%
// +optional
MinAvailable string `json:"minAvailable,omitempty"`
// Specify under crontab format interval to take backups
// leave it empty to deactivate the backup process
// Defaults to ""
// +optional
BackupSchedule string `json:"backupSchedule,omitempty"`
// Represents an URL to the location where to put backups.
// +optional
BackupURL string `json:"backupURL,omitempty"`
// BackupRemoteDeletePolicy the deletion policy that specify how to treat the data from remote storage. By
// default it's used softDelete.
// +optional
BackupRemoteDeletePolicy DeletePolicy `json:"backupRemoteDeletePolicy,omitempty"`
// Represents the name of the secret that contains credentials to connect to
// the storage provider to store backups.
// +optional
BackupSecretName string `json:"backupSecretName,omitempty"`
// If set keeps last BackupScheduleJobsHistoryLimit Backups
// +optional
BackupScheduleJobsHistoryLimit *int `json:"backupScheduleJobsHistoryLimit,omitempty"`
// A map[string]string that will be passed to my.cnf file.
// +optional
MysqlConf MysqlConf `json:"mysqlConf,omitempty"`
// Pod extra specification
// +optional
PodSpec PodSpec `json:"podSpec,omitempty"`
// PVC extra specifiaction
// +optional
VolumeSpec VolumeSpec `json:"volumeSpec,omitempty"`
// TmpfsSize if specified, mounts a tmpfs of this size into /tmp
// DEPRECATED: use instead PodSpec.Volumes and PodSpec.VolumeMounts
// +optional
TmpfsSize *resource.Quantity `json:"tmpfsSize,omitempty"`
// MaxSlaveLatency represents the allowed latency for a slave node in
// seconds. If set then the node with a latency grater than this is removed
// from service.
// +optional
MaxSlaveLatency *int64 `json:"maxSlaveLatency,omitempty"`
// QueryLimits represents limits for a query
// +optional
QueryLimits *QueryLimits `json:"queryLimits,omitempty"`
// Makes the cluster READ ONLY. This has not a strong guarantee, in case of a failover the cluster will be writable
// for at least a few seconds.
// +optional
ReadOnly bool `json:"readOnly,omitempty"`
// Set a custom offset for Server IDs. ServerID for each node will be the index of the statefulset, plus offset
// +optional
ServerIDOffset *int `json:"serverIDOffset,omitempty"`
// BackupCompressCommand is a command to use for compressing the backup.
// +optional
BackupCompressCommand []string `json:"backupCompressCommand,omitempty"`
// BackupDecompressCommand is a command to use for decompressing the backup.
// +optional
BackupDecompressCommand []string `json:"backupDecompressCommand,omitempty"`
// MetricsExporterExtraArgs is a list of extra command line arguments to pass to MySQL metrics exporter.
// See https://github.com/prometheus/mysqld_exporter for the list of available flags.
// +optional
MetricsExporterExtraArgs []string `json:"metricsExporterExtraArgs,omitempty"`
// RcloneExtraArgs is a list of extra command line arguments to pass to rclone.
// +optional
RcloneExtraArgs []string `json:"rcloneExtraArgs,omitempty"`
// XbstreamExtraArgs is a list of extra command line arguments to pass to xbstream.
// +optional
XbstreamExtraArgs []string `json:"xbstreamExtraArgs,omitempty"`
// XtrabackupExtraArgs is a list of extra command line arguments to pass to xtrabackup.
// +optional
XtrabackupExtraArgs []string `json:"xtrabackupExtraArgs,omitempty"`
// XtrabackupPrepareExtraArgs is a list of extra command line arguments to pass to xtrabackup
// during --prepare.
// +optional
XtrabackupPrepareExtraArgs []string `json:"xtrabackupPrepareExtraArgs,omitempty"`
// XtrabackupTargetDir is a backup destination directory for xtrabackup.
// +optional
XtrabackupTargetDir string `json:"xtrabackupTargetDir,omitempty"`
// InitFileExtraSQL is a list of extra sql commands to append to init_file.
// +optional
InitFileExtraSQL []string `json:"initFileExtraSQL,omitempty"`
}
MysqlClusterSpec defines the desired state of MysqlCluster nolint: maligned
func (*MysqlClusterSpec) DeepCopy ¶ added in v0.2.2
func (in *MysqlClusterSpec) DeepCopy() *MysqlClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MysqlClusterSpec.
func (*MysqlClusterSpec) DeepCopyInto ¶ added in v0.2.2
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 ¶ added in v0.2.2
type MysqlClusterStatus struct {
// ReadyNodes represents number of the nodes that are in ready state
ReadyNodes int `json:"readyNodes,omitempty"`
// Conditions contains the list of the cluster conditions fulfilled
Conditions []ClusterCondition `json:"conditions,omitempty"`
// Nodes contains informations from orchestrator
Nodes []NodeStatus `json:"nodes,omitempty"`
}
MysqlClusterStatus defines the observed state of MysqlCluster
func (*MysqlClusterStatus) DeepCopy ¶ added in v0.2.2
func (in *MysqlClusterStatus) DeepCopy() *MysqlClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MysqlClusterStatus.
func (*MysqlClusterStatus) DeepCopyInto ¶ added in v0.2.2
func (in *MysqlClusterStatus) DeepCopyInto(out *MysqlClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MysqlConf ¶
type MysqlConf map[string]intstr.IntOrString
MysqlConf defines type for extra cluster configs. It's a simple map between string and string.
func (MysqlConf) DeepCopy ¶ added in v0.2.2
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MysqlConf.
func (MysqlConf) DeepCopyInto ¶ added in v0.2.2
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MysqlDatabase ¶ added in v0.5.0
type MysqlDatabase struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec MysqlDatabaseSpec `json:"spec,omitempty"`
Status MysqlDatabaseStatus `json:"status,omitempty"`
}
MysqlDatabase is the Schema for the MySQL database API
func (*MysqlDatabase) DeepCopy ¶ added in v0.5.0
func (in *MysqlDatabase) DeepCopy() *MysqlDatabase
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MysqlDatabase.
func (*MysqlDatabase) DeepCopyInto ¶ added in v0.5.0
func (in *MysqlDatabase) DeepCopyInto(out *MysqlDatabase)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MysqlDatabase) DeepCopyObject ¶ added in v0.5.0
func (in *MysqlDatabase) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MysqlDatabaseCondition ¶ added in v0.5.0
type MysqlDatabaseCondition struct {
// Type of MysqlDatabase condition.
Type MysqlDatabaseConditionType `json:"type"`
// Status of the condition, one of True, False, Unknown.
Status corev1.ConditionStatus `json:"status"`
// The last time this condition was updated.
LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
// Last time the condition transitioned from one status to another.
LastTransitionTime metav1.Time `json:"lastTransitionTime"`
// The reason for the condition's last transition.
Reason string `json:"reason"`
// A human readable message indicating details about the transition.
Message string `json:"message"`
}
MysqlDatabaseCondition defines the condition struct for a MysqlDatabase resource
func (*MysqlDatabaseCondition) DeepCopy ¶ added in v0.5.0
func (in *MysqlDatabaseCondition) DeepCopy() *MysqlDatabaseCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MysqlDatabaseCondition.
func (*MysqlDatabaseCondition) DeepCopyInto ¶ added in v0.5.0
func (in *MysqlDatabaseCondition) DeepCopyInto(out *MysqlDatabaseCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MysqlDatabaseConditionType ¶ added in v0.5.0
type MysqlDatabaseConditionType string
MysqlDatabaseConditionType defines the condition types of a MysqlDatabase resource
const ( // MysqlDatabaseReady means the MySQL database is ready when database exists. MysqlDatabaseReady MysqlDatabaseConditionType = "Ready" )
type MysqlDatabaseList ¶ added in v0.5.0
type MysqlDatabaseList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []MysqlDatabase `json:"items"`
}
MysqlDatabaseList contains a list of MysqlDatabase
func (*MysqlDatabaseList) DeepCopy ¶ added in v0.5.0
func (in *MysqlDatabaseList) DeepCopy() *MysqlDatabaseList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MysqlDatabaseList.
func (*MysqlDatabaseList) DeepCopyInto ¶ added in v0.5.0
func (in *MysqlDatabaseList) DeepCopyInto(out *MysqlDatabaseList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MysqlDatabaseList) DeepCopyObject ¶ added in v0.5.0
func (in *MysqlDatabaseList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MysqlDatabaseSpec ¶ added in v0.5.0
type MysqlDatabaseSpec struct {
// ClusterRef represents a reference to the MySQL cluster.
// This field should be immutable.
ClusterRef ClusterReference `json:"clusterRef"`
// Database represents the database name which will be created.
// This field should be immutable.
Database string `json:"database"`
// CharacterSet represents the charset name used when database is created
CharacterSet string `json:"characterSet,omitempty"`
// Collation represents the collation name used as default database collation
Collation string `json:"collation,omitempty"`
}
MysqlDatabaseSpec defines the desired state of MysqlDatabaseSpec
func (*MysqlDatabaseSpec) DeepCopy ¶ added in v0.5.0
func (in *MysqlDatabaseSpec) DeepCopy() *MysqlDatabaseSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MysqlDatabaseSpec.
func (*MysqlDatabaseSpec) DeepCopyInto ¶ added in v0.5.0
func (in *MysqlDatabaseSpec) DeepCopyInto(out *MysqlDatabaseSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MysqlDatabaseStatus ¶ added in v0.5.0
type MysqlDatabaseStatus struct {
// Conditions represents the MysqlDatabase resource conditions list.
Conditions []MysqlDatabaseCondition `json:"conditions,omitempty"`
}
MysqlDatabaseStatus defines the observed state of MysqlDatabase
func (*MysqlDatabaseStatus) DeepCopy ¶ added in v0.5.0
func (in *MysqlDatabaseStatus) DeepCopy() *MysqlDatabaseStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MysqlDatabaseStatus.
func (*MysqlDatabaseStatus) DeepCopyInto ¶ added in v0.5.0
func (in *MysqlDatabaseStatus) DeepCopyInto(out *MysqlDatabaseStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MysqlPermission ¶ added in v0.5.0
type MysqlPermission struct {
// Schema represents the schema to which the permission applies
Schema string `json:"schema"`
// Tables represents the tables inside the schema to which the permission applies
Tables []string `json:"tables"`
// Permissions represents the permissions granted on the schema/tables
Permissions []string `json:"permissions"`
}
MysqlPermission defines a MySQL schema permission
func (*MysqlPermission) DeepCopy ¶ added in v0.5.0
func (in *MysqlPermission) DeepCopy() *MysqlPermission
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MysqlPermission.
func (*MysqlPermission) DeepCopyInto ¶ added in v0.5.0
func (in *MysqlPermission) DeepCopyInto(out *MysqlPermission)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MysqlResourceDeletionPolicy ¶ added in v0.6.3
type MysqlResourceDeletionPolicy string
MysqlResourceDeletionPolicy delete policy defined
type MysqlUser ¶ added in v0.5.0
type MysqlUser struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec MysqlUserSpec `json:"spec,omitempty"`
Status MysqlUserStatus `json:"status,omitempty"`
}
MysqlUser is the Schema for the MySQL User API
func (*MysqlUser) DeepCopy ¶ added in v0.5.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MysqlUser.
func (*MysqlUser) DeepCopyInto ¶ added in v0.5.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MysqlUser) DeepCopyObject ¶ added in v0.5.0
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MysqlUserConditionType ¶ added in v0.5.0
type MysqlUserConditionType string
MysqlUserConditionType defines the condition types of a MysqlUser resource
const ( // MySQLUserReady means the MySQL user is ready when database exists. MySQLUserReady MysqlUserConditionType = "Ready" )
type MysqlUserList ¶ added in v0.5.0
type MysqlUserList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []MysqlUser `json:"items,omitempty"`
}
MysqlUserList contains a list of MysqlUser
func (*MysqlUserList) DeepCopy ¶ added in v0.5.0
func (in *MysqlUserList) DeepCopy() *MysqlUserList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MysqlUserList.
func (*MysqlUserList) DeepCopyInto ¶ added in v0.5.0
func (in *MysqlUserList) DeepCopyInto(out *MysqlUserList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MysqlUserList) DeepCopyObject ¶ added in v0.5.0
func (in *MysqlUserList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MysqlUserSpec ¶ added in v0.5.0
type MysqlUserSpec struct {
// ClusterRef represents a reference to the MySQL cluster.
// This field should be immutable.
ClusterRef ClusterReference `json:"clusterRef"`
// User is the name of the user that will be created with will access the specified database.
// This field should be immutable.
User string `json:"user"`
// Password is the password for the user.
Password corev1.SecretKeySelector `json:"password"`
// AllowedHosts is the allowed host to connect from.
AllowedHosts []string `json:"allowedHosts"`
// Permissions is the list of roles that user has in the specified database.
Permissions []MysqlPermission `json:"permissions,omitempty"`
// ResourceLimits allow settings limit per mysql user as defined here:
// https://dev.mysql.com/doc/refman/5.7/en/user-resources.html
// +optional
ResourceLimits corev1.ResourceList `json:"resourceLimits,omitempty"`
}
MysqlUserSpec defines the desired state of MysqlUserSpec
func (*MysqlUserSpec) DeepCopy ¶ added in v0.5.0
func (in *MysqlUserSpec) DeepCopy() *MysqlUserSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MysqlUserSpec.
func (*MysqlUserSpec) DeepCopyInto ¶ added in v0.5.0
func (in *MysqlUserSpec) DeepCopyInto(out *MysqlUserSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MysqlUserStatus ¶ added in v0.5.0
type MysqlUserStatus struct {
// Conditions represents the MysqlUser resource conditions list.
// +optional
Conditions []MySQLUserCondition `json:"conditions,omitempty"`
// AllowedHosts contains the list of hosts that the user is allowed to connect from.
AllowedHosts []string `json:"allowedHosts,omitempty"`
}
MysqlUserStatus defines the observed state of MysqlUser
func (*MysqlUserStatus) DeepCopy ¶ added in v0.5.0
func (in *MysqlUserStatus) DeepCopy() *MysqlUserStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MysqlUserStatus.
func (*MysqlUserStatus) DeepCopyInto ¶ added in v0.5.0
func (in *MysqlUserStatus) DeepCopyInto(out *MysqlUserStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeCondition ¶ added in v0.1.4
type NodeCondition struct {
Type NodeConditionType `json:"type"`
Status core.ConditionStatus `json:"status"`
LastTransitionTime metav1.Time `json:"lastTransitionTime"`
}
NodeCondition defines type for representing node conditions.
func (*NodeCondition) DeepCopy ¶ added in v0.1.4
func (in *NodeCondition) DeepCopy() *NodeCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeCondition.
func (*NodeCondition) DeepCopyInto ¶ added in v0.1.4
func (in *NodeCondition) DeepCopyInto(out *NodeCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeConditionType ¶ added in v0.1.4
type NodeConditionType string
NodeConditionType defines type for node condition type.
const ( // NodeConditionLagged represents if the node is marked as lagged by // orchestrator. NodeConditionLagged NodeConditionType = "Lagged" // NodeConditionReplicating represents if the node is replicating or not. NodeConditionReplicating NodeConditionType = "Replicating" // NodeConditionMaster represents if the node is master or not. NodeConditionMaster NodeConditionType = "Master" // NodeConditionReadOnly repesents if the node is read only or not NodeConditionReadOnly NodeConditionType = "ReadOnly" )
type NodeStatus ¶ added in v0.1.4
type NodeStatus struct {
Name string `json:"name"`
Conditions []NodeCondition `json:"conditions,omitempty"`
}
NodeStatus defines type for status of a node into cluster.
func (*NodeStatus) DeepCopy ¶ added in v0.1.4
func (in *NodeStatus) DeepCopy() *NodeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStatus.
func (*NodeStatus) DeepCopyInto ¶ added in v0.1.4
func (in *NodeStatus) DeepCopyInto(out *NodeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodSpec ¶
type PodSpec struct {
ImagePullPolicy core.PullPolicy `json:"imagePullPolicy,omitempty"`
ImagePullSecrets []core.LocalObjectReference `json:"imagePullSecrets,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
Resources core.ResourceRequirements `json:"resources,omitempty"`
Affinity *core.Affinity `json:"affinity,omitempty"`
MysqlLifecycle *core.Lifecycle `json:"mysqlLifecycle,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
PriorityClassName string `json:"priorityClassName,omitempty"`
Tolerations []core.Toleration `json:"tolerations,omitempty"`
ServiceAccountName string `json:"serviceAccountName,omitempty"`
BackupAffinity *core.Affinity `json:"backupAffinity,omitempty"`
BackupNodeSelector map[string]string `json:"backupNodeSelector,omitempty"`
BackupPriorityClassName string `json:"backupPriorityClassName,omitempty"`
BackupTolerations []core.Toleration `json:"backupTolerations,omitempty"`
// Volumes allows adding extra volumes to the statefulset
// +optional
Volumes []core.Volume `json:"volumes,omitempty"`
// VolumesMounts allows mounting extra volumes to the mysql container
// +optional
VolumeMounts []core.VolumeMount `json:"volumeMounts,omitempty"`
// InitContainers allows the user to specify extra init containers
// +optional
InitContainers []core.Container `json:"initContainers,omitempty"`
// Containers allows for user to specify extra sidecar containers to run along with mysql
// +optional
Containers []core.Container `json:"containers,omitempty"`
// MetricsExporterResources allows you to specify resources for metrics exporter container
// +optional
MetricsExporterResources core.ResourceRequirements `json:"metricsExporterResources,omitempty"`
// MySQLOperatorSidecarResources allows you to specify resources for sidecar container
// used to take backups with xtrabackup
// +optional
MySQLOperatorSidecarResources core.ResourceRequirements `json:"mysqlOperatorSidecarResources,omitempty"`
// PtHeartbeatResources allows you to specify resources for pt-heartbeat container
// +optional
PtHeartbeatResources core.ResourceRequirements `json:"ptHeartbeatResources,omitempty"`
}
PodSpec defines type for configure cluster pod spec.
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.
type QueryLimits ¶ added in v0.1.12
type QueryLimits struct {
// MaxIdleTime match queries that have been idle for longer then this time,
// in seconds. (--idle-time flag)
// + optional
MaxIdleTime *int `json:"maxIdleTime,omitempty"`
// MaxQueryTime match queries that have been running for longer then this
// time, in seconds. This field is required. (--busy-time flag)
MaxQueryTime int `json:"maxQueryTime"`
// Kill represents the mode of which the matching queries in each class will
// be killed, (the --victims flag). Can be one of oldest|all|all-but-oldest.
// By default, the matching query with the highest Time value is killed (the
// oldest query.
// +optional
Kill string `json:"kill,omitempty"`
// KillMode can be: `connection` or `query`, when it's used `connection`
// means that when a query is matched the connection is killed (using --kill
// flag) and if it's used `query` means that the query is killed (using
// --kill-query flag)
// +optional
KillMode string `json:"killMode,omitempty"`
// IgnoreDb is the list of database that are ignored by pt-kill (--ignore-db
// flag).
// +optional
IgnoreDb []string `json:"ignoreDb,omitempty"`
// IgnoreCommands the list of commands to be ignored.
// +optional
IgnoreCommand []string `json:"ignoreCommands,omitempty"`
// IgnoreUser the list of users to be ignored.
// +optional
IgnoreUser []string `json:"ignoreUser,omitempty"`
}
QueryLimits represents the pt-kill parameters, more info can be found here: https://www.percona.com/doc/percona-toolkit/LATEST/pt-kill.html
func (*QueryLimits) DeepCopy ¶ added in v0.1.12
func (in *QueryLimits) DeepCopy() *QueryLimits
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryLimits.
func (*QueryLimits) DeepCopyInto ¶ added in v0.1.12
func (in *QueryLimits) DeepCopyInto(out *QueryLimits)
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 *core.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 *core.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 *core.PersistentVolumeClaimSpec `json:"persistentVolumeClaim,omitempty"`
}
VolumeSpec is the desired spec for storing mysql data. Only one of its members may be specified.
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.