Documentation ¶
Overview ¶
Package v1alpha1 is the v1alpha1 version of the API. +groupName=mysql.presslabs.org
Index ¶
- Constants
- Variables
- func GetNameForResource(name ResourceName, clusterName string) string
- func Resource(resource string) schema.GroupResource
- type BackupCondition
- type BackupConditionType
- type BackupSpec
- type BackupStatus
- type ClusterCondition
- type ClusterConditionType
- type ClusterSpec
- func (in *ClusterSpec) DeepCopy() *ClusterSpec
- func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)
- func (c *ClusterSpec) GetHelperImage() string
- func (c *ClusterSpec) GetMetricsExporterImage() string
- func (c *ClusterSpec) GetMysqlImage() string
- func (c *ClusterSpec) GetOrcUri() string
- func (c *ClusterSpec) UpdateDefaults(opt *options.Options, cluster *MysqlCluster) error
- type ClusterStatus
- type MysqlBackup
- func (c *MysqlBackup) AsOwnerReference() metav1.OwnerReference
- func (in *MysqlBackup) DeepCopy() *MysqlBackup
- func (in *MysqlBackup) DeepCopyInto(out *MysqlBackup)
- func (in *MysqlBackup) DeepCopyObject() runtime.Object
- func (b *MysqlBackup) GetCondition(ty BackupConditionType) *BackupCondition
- func (c *MysqlBackup) GetHelperImage() string
- func (c *MysqlBackup) UpdateStatusCondition(condType BackupConditionType, status core.ConditionStatus, reason, msg string)
- type MysqlBackupList
- type MysqlCluster
- func (c *MysqlCluster) AsOwnerReference() metav1.OwnerReference
- func (in *MysqlCluster) DeepCopy() *MysqlCluster
- func (in *MysqlCluster) DeepCopyInto(out *MysqlCluster)
- func (in *MysqlCluster) DeepCopyObject() runtime.Object
- func (c *MysqlCluster) GetBackupCandidate() string
- func (c *MysqlCluster) GetLabels() map[string]string
- func (c *MysqlCluster) GetNameForResource(name ResourceName) string
- func (c *MysqlCluster) GetPodHostname(p int) string
- func (c *MysqlCluster) UpdateDefaults(opt *options.Options) error
- func (c *MysqlCluster) UpdateStatusCondition(condType ClusterConditionType, status core.ConditionStatus, reason, msg string)
- type MysqlClusterList
- type MysqlConf
- type NodeCondition
- type NodeConditionType
- type NodeStatus
- type PodSpec
- type QueryLimits
- type ResourceName
- type VolumeSpec
Constants ¶
const ( KB int64 = 1 << (10 * iota) MB GB )
const ( ResourceKindMysqlCluster = "MysqlCluster" ResourceKindMysqlBackup = "MysqlBackup" )
const ( EventReasonInitDefaults = "InitDefaults" EventReasonInitDefaultsFailed = "InitDefaultsFailed" EventReasonDbSecretUpdated = "DbSecretUpdated" EventReasonDbSecretFailed = "DbSecretFailed" EventReasonUtilitySecretFailed = "UtilitySecretFailed" EventReasonUtilitySecretUpdated = "UtilitySecretUpdated" EventReasonConfigMapFailed = "MysqlConfigMapFailed" EventReasonConfigMapUpdated = "MysqlConfigMapUpdated" EventReasonServiceFailed = "HLServiceFailed" EventReasonServiceUpdated = "HLServiceUpdated" EventReasonSFSFailed = "StatefulSetFailed" EventReasonSFSUpdated = "StatefulSetUpdated" EventReasonMasterServiceFailed = "MasterServiceFailed" EventReasonMasterServiceUpdated = "MasterServiceUpdated" EventReasonHealthyNodesServiceFailed = "HealthyNodesServiceFailed" EventReasonHealthyNodesServiceUpdated = "HealthyNodesServiceUpdated" EventReasonPDBFailed = "PodDisruptionBudgetFailed" EventReasonPDBUpdated = "PodDisruptionBudgetUpdated" )
Mysql events reason
const ( EventNormal = core.EventTypeNormal EventWarning = core.EventTypeWarning )
Event types
const ( ClusterConditionReady ClusterConditionType = "Ready" ClusterConditionConfig = "ConfigReady" ClusterConditionFailoverAck = "PendingFailoverAck" )
const ( NodeConditionLagged NodeConditionType = "Lagged" NodeConditionReplicating = "Replicating" NodeConditionMaster = "Master" )
Variables ¶
var ( // ResourceMysqlCluster contains the definition bits for Mysql Cluster CRD ResourceMysqlCluster = kutil.Config{ Group: SchemeGroupVersion.Group, Version: SchemeGroupVersion.Version, Kind: ResourceKindMysqlCluster, Plural: "mysqlclusters", Singular: "mysqlcluster", ShortNames: []string{"mysql", "cluster"}, SpecDefinitionName: fmt.Sprintf("%s/%s.%s", myapiPkg, SchemeGroupVersion.Version, ResourceKindMysqlCluster), ResourceScope: string(apiextensions.NamespaceScoped), GetOpenAPIDefinitions: myopenapi.GetOpenAPIDefinitions, EnableValidation: true, EnableStatusSubresource: true, } // ResourceMysqlClusterCRDName is the fully qualified MysqlCluster CRD name (ie. mysqlclusters.mysql.presslabs.org) ResourceMysqlClusterCRDName = fmt.Sprintf("%s.%s", ResourceMysqlCluster.Plural, ResourceMysqlCluster.Group) // ResourceMysqlClusterCRD is the Custrom Resource Definition object for MysqlCluster ResourceMysqlClusterCRD = kutil.NewCustomResourceDefinition(ResourceMysqlCluster) ResourceMysqlBackup = kutil.Config{ Group: SchemeGroupVersion.Group, Version: SchemeGroupVersion.Version, Kind: ResourceKindMysqlBackup, Plural: "mysqlbackups", Singular: "mysqlbackup", ShortNames: []string{"backup"}, SpecDefinitionName: fmt.Sprintf("%s/%s.%s", myapiPkg, SchemeGroupVersion.Version, ResourceKindMysqlBackup), ResourceScope: string(apiextensions.NamespaceScoped), GetOpenAPIDefinitions: myopenapi.GetOpenAPIDefinitions, EnableValidation: true, EnableStatusSubresource: true, } // ResourceMysqlBackupCRDName is the fully qualified MysqlBackup CRD name (ie. mysqlbackups.mysql.presslabs.org) ResourceMysqlBackupCRDName = fmt.Sprintf("%s.%s", ResourceMysqlBackup.Plural, ResourceMysqlBackup.Group) // ResourceMysqlBackupCRD is the Custrom Resource Definition object for MysqlBackup ResourceMysqlBackupCRD = kutil.NewCustomResourceDefinition(ResourceMysqlBackup) )
Mysql Operator Custom Resource Definition
var ( // SchemeBuilder the scheme builder SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme function AddToScheme = SchemeBuilder.AddToScheme // SchemeGroupVersion .. SchemeGroupVersion = schema.GroupVersion{Group: mysql.GroupName, Version: "v1alpha1"} )
var CRDs = map[string]kutil.Config{ ResourceMysqlClusterCRDName: ResourceMysqlCluster, ResourceMysqlBackupCRDName: ResourceMysqlBackup, }
var (
DefaultMinAvailable intstr.IntOrString = intstr.FromString("50%")
)
Functions ¶
func GetNameForResource ¶ added in v0.1.1
func GetNameForResource(name ResourceName, clusterName string) string
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource gets an MysqlCluster GroupResource for a specified resource
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"` }
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
const ( // BackupComplete means the backup has finished his execution BackupComplete BackupConditionType = "Complete" // BackupFailed means backup has failed BackupFailed BackupConditionType = "Failed" )
type BackupSpec ¶
type BackupSpec struct { // ClustterName represents the cluster for which to take backup ClusterName string `json:"clusterName"` // BucketUri a fully specified bucket URI where to put backup. // Default is used the one specified in cluster. // optional BackupUri string `json:"backupUri,omitempty"` // BackupSecretName the name of secrets that contains the credentials to // access the bucket. Default is used the secret specified in cluster. // optinal BackupSecretName string `json:"backupSecretName,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.
type BackupStatus ¶
type BackupStatus struct { // Complete marks the backup in final state Completed bool `json:"completed"` // BackupUri represent the fully uri to the backup location BackupUri string `json:"backupUri,omitempty"` Conditions []BackupCondition `json:"conditions"` }
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 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"` }
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
type ClusterSpec ¶
type ClusterSpec struct { // The number of pods. This updates replicas filed // Defaults to 0 // +optional Replicas int32 `json:"replicas"` // 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 // Defaults is <name>-db-credentials (with random values) // +optional SecretName string `json:"secretName"` // Represents the percona image tag. // Defaults to 5.7 // +optional MysqlVersion string `json:"mysqlVersion"` // A bucket URI that contains a xtrabackup to initialize the mysql database. // +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 *intstr.IntOrString `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"` BackupUri string `json:"backupUri,omitempty"` 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"` // 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"` }
func (*ClusterSpec) DeepCopy ¶
func (in *ClusterSpec) DeepCopy() *ClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec.
func (*ClusterSpec) DeepCopyInto ¶
func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterSpec) GetHelperImage ¶
func (c *ClusterSpec) GetHelperImage() string
GetHelperImage return helper image from options
func (*ClusterSpec) GetMetricsExporterImage ¶
func (c *ClusterSpec) GetMetricsExporterImage() string
GetMetricsExporterImage return helper image from options
func (*ClusterSpec) GetMysqlImage ¶
func (c *ClusterSpec) GetMysqlImage() string
GetMysqlImage returns mysql image, composed from oprions and Spec.MysqlVersion
func (*ClusterSpec) GetOrcUri ¶
func (c *ClusterSpec) GetOrcUri() string
GetOrcUri return the orchestrator uri
func (*ClusterSpec) UpdateDefaults ¶
func (c *ClusterSpec) UpdateDefaults(opt *options.Options, cluster *MysqlCluster) error
UpdateDefaults updates Spec defaults
type ClusterStatus ¶
type ClusterStatus 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"` }
func (*ClusterStatus) DeepCopy ¶
func (in *ClusterStatus) DeepCopy() *ClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus.
func (*ClusterStatus) DeepCopyInto ¶
func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterStatus) GetNodeStatusIndex ¶ added in v0.1.4
func (s *ClusterStatus) GetNodeStatusIndex(name string) int
type MysqlBackup ¶
type MysqlBackup struct { // +k8s:openapi-gen=false metav1.TypeMeta `json:",inline"` // +k8s:openapi-gen=false metav1.ObjectMeta `json:"metadata,omitempty"` Spec BackupSpec `json:"spec"` // +k8s:openapi-gen=false Status BackupStatus `json:"status,omitempty"` }
func (*MysqlBackup) AsOwnerReference ¶
func (c *MysqlBackup) AsOwnerReference() metav1.OwnerReference
AsOwnerReference returns the MysqlCluster owner references.
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) GetCondition ¶
func (b *MysqlBackup) GetCondition(ty BackupConditionType) *BackupCondition
func (*MysqlBackup) GetHelperImage ¶
func (c *MysqlBackup) GetHelperImage() string
func (*MysqlBackup) UpdateStatusCondition ¶
func (c *MysqlBackup) UpdateStatusCondition(condType BackupConditionType, status core.ConditionStatus, reason, msg string)
UpdateStatusCondition sets the condition to a status. for example Ready condition to True, or False
type MysqlBackupList ¶
type MysqlBackupList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []MysqlBackup `json:"items"` }
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 MysqlCluster ¶
type MysqlCluster struct { // +k8s:openapi-gen=false metav1.TypeMeta `json:",inline"` // +k8s:openapi-gen=false metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterSpec `json:"spec"` // +k8s:openapi-gen=false Status ClusterStatus `json:"status,omitempty"` }
func (*MysqlCluster) AsOwnerReference ¶
func (c *MysqlCluster) AsOwnerReference() metav1.OwnerReference
AsOwnerReference returns the MysqlCluster owner references.
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) GetBackupCandidate ¶ added in v0.1.4
func (c *MysqlCluster) GetBackupCandidate() string
GetBackupCandidate returns the hostname of the first not-lagged and replicating slave node, else returns the master node.
func (*MysqlCluster) GetLabels ¶
func (c *MysqlCluster) GetLabels() map[string]string
func (*MysqlCluster) GetNameForResource ¶
func (c *MysqlCluster) GetNameForResource(name ResourceName) string
func (*MysqlCluster) GetPodHostname ¶ added in v0.1.4
func (c *MysqlCluster) GetPodHostname(p int) string
func (*MysqlCluster) UpdateDefaults ¶
func (c *MysqlCluster) UpdateDefaults(opt *options.Options) error
UpdateDefaults sets the defaults for Spec and Status
func (*MysqlCluster) UpdateStatusCondition ¶
func (c *MysqlCluster) UpdateStatusCondition(condType ClusterConditionType, status core.ConditionStatus, reason, msg string)
UpdateStatusCondition sets the condition to a status. for example Ready condition to True, or False
type MysqlClusterList ¶
type MysqlClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []MysqlCluster `json:"items"` }
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 NodeCondition ¶ added in v0.1.4
type NodeCondition struct { Type NodeConditionType `json:"type"` Status core.ConditionStatus `json:"status"` LastTransitionTime metav1.Time `json:"lastTransitionTime"` }
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
type NodeStatus ¶ added in v0.1.4
type NodeStatus struct { Name string `json:"name"` Conditions []NodeCondition `json:"conditions,omitempty"` }
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.
func (*NodeStatus) GetCondition ¶ added in v0.1.4
func (ns *NodeStatus) GetCondition(cType NodeConditionType) *NodeCondition
func (*NodeStatus) UpdateNodeCondition ¶ added in v0.1.4
func (ns *NodeStatus) UpdateNodeCondition(cType NodeConditionType, cStatus core.ConditionStatus) bool
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"` NodeSelector map[string]string `json:"nodeSelector,omitempty"` }
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) UpdateDefaults ¶
func (ps *PodSpec) UpdateDefaults(opt *options.Options, cluster *MysqlCluster) error
UpdateDefaults for PodSpec
type QueryLimits ¶ added in v0.1.11
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.11
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.11
func (in *QueryLimits) DeepCopyInto(out *QueryLimits)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*QueryLimits) GetOptions ¶ added in v0.1.11
func (ql *QueryLimits) GetOptions() []string
type ResourceName ¶
type ResourceName string
ResourceName is the type for aliasing resources that will be created.
const ( // HeadlessSVC is the alias of the headless service resource HeadlessSVC ResourceName = "headless" // StatefulSet is the alias of the statefulset resource StatefulSet ResourceName = "mysql" // ConfigMap is the alias for mysql configs, the config map resource ConfigMap ResourceName = "config-files" // BackupCronJob is the name of cron job BackupCronJob ResourceName = "backup-cron" // MasterService is the name of the service that points to master node MasterService ResourceName = "master-service" // HealthyNodes is the name of a service that continas all healthy nodes HealthyNodesService ResourceName = "healthy-nodes-service" // PodDisruptionBudget is the name of pod disruption budget for the stateful set PodDisruptionBudget ResourceName = "pdb" )
type VolumeSpec ¶
type VolumeSpec struct {
core.PersistentVolumeClaimSpec `json:",inline"`
}
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.
func (*VolumeSpec) UpdateDefaults ¶
func (vs *VolumeSpec) UpdateDefaults() error
UpdateDefaults for VolumeSpec