Documentation ¶
Overview ¶
Package v1beta2 contains API Schema definitions for the moco.cybozu.com v1beta2 API group +kubebuilder:object:generate=true +groupName=moco.cybozu.com
Index ¶
- Constants
- Variables
- type AffinityApplyConfiguration
- type BackupPolicy
- type BackupPolicyList
- type BackupPolicySpec
- type BackupStatus
- type BucketConfig
- type EnvFromSourceApplyConfiguration
- type EnvVarApplyConfiguration
- type JobConfig
- type MySQLCluster
- func (r *MySQLCluster) BackupCronJobName() string
- func (r *MySQLCluster) BackupRoleName() string
- func (r *MySQLCluster) CertificateName() string
- func (r *MySQLCluster) ControllerSecretName() string
- func (in *MySQLCluster) DeepCopy() *MySQLCluster
- func (in *MySQLCluster) DeepCopyInto(out *MySQLCluster)
- func (in *MySQLCluster) DeepCopyObject() runtime.Object
- func (r *MySQLCluster) GRPCSecretName() string
- func (r *MySQLCluster) HeadlessServiceName() string
- func (*MySQLCluster) Hub()
- func (r *MySQLCluster) MyCnfSecretName() string
- func (r *MySQLCluster) PodHostname(index int) string
- func (r *MySQLCluster) PodName(index int) string
- func (r *MySQLCluster) PrefixedName() string
- func (r *MySQLCluster) PrimaryServiceName() string
- func (r *MySQLCluster) ReplicaServiceName() string
- func (r *MySQLCluster) RestoreJobName() string
- func (r *MySQLCluster) RestoreRoleName() string
- func (r *MySQLCluster) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *MySQLCluster) SlowQueryLogAgentConfigMapName() string
- func (r *MySQLCluster) UserSecretName() string
- type MySQLClusterList
- type MySQLClusterSpec
- type MySQLClusterStatus
- type ObjectMeta
- type OverwriteContainer
- type OverwriteableContainerName
- type PersistentVolumeClaim
- type PersistentVolumeClaimSpecApplyConfiguration
- type PodSpecApplyConfiguration
- type PodTemplateSpec
- type ReconcileInfo
- type ResourceRequirementsApplyConfiguration
- type RestoreSpec
- type ServiceSpecApplyConfiguration
- type ServiceTemplate
- type VolumeApplyConfiguration
- type VolumeMountApplyConfiguration
- type VolumeSourceApplyConfiguration
Constants ¶
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "moco.cybozu.com", Version: "v1beta2"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type AffinityApplyConfiguration ¶ added in v0.15.0
type AffinityApplyConfiguration corev1ac.AffinityApplyConfiguration
AffinityApplyConfiguration is the type defined to implement the DeepCopy method.
func (*AffinityApplyConfiguration) DeepCopy ¶ added in v0.15.0
func (in *AffinityApplyConfiguration) DeepCopy() *AffinityApplyConfiguration
DeepCopy is copying the receiver, creating a new EnvVarApplyConfiguration.
func (*AffinityApplyConfiguration) DeepCopyInto ¶ added in v0.15.0
func (in *AffinityApplyConfiguration) DeepCopyInto(out *AffinityApplyConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupPolicy ¶
type BackupPolicy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec BackupPolicySpec `json:"spec"` }
BackupPolicy is a namespaced resource that should be referenced from MySQLCluster.
func (*BackupPolicy) DeepCopy ¶
func (in *BackupPolicy) DeepCopy() *BackupPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupPolicy.
func (*BackupPolicy) DeepCopyInto ¶
func (in *BackupPolicy) DeepCopyInto(out *BackupPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BackupPolicy) DeepCopyObject ¶
func (in *BackupPolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*BackupPolicy) SetupWebhookWithManager ¶
func (r *BackupPolicy) SetupWebhookWithManager(mgr ctrl.Manager) error
type BackupPolicyList ¶
type BackupPolicyList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []BackupPolicy `json:"items"` }
BackupPolicyList contains a list of BackupPolicy
func (*BackupPolicyList) DeepCopy ¶
func (in *BackupPolicyList) DeepCopy() *BackupPolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupPolicyList.
func (*BackupPolicyList) DeepCopyInto ¶
func (in *BackupPolicyList) DeepCopyInto(out *BackupPolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BackupPolicyList) DeepCopyObject ¶
func (in *BackupPolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BackupPolicySpec ¶
type BackupPolicySpec struct { // The schedule in Cron format for periodic backups. // See https://en.wikipedia.org/wiki/Cron Schedule string `json:"schedule"` // Specifies parameters for backup Pod. JobConfig JobConfig `json:"jobConfig"` // Optional deadline in seconds for starting the job if it misses scheduled // time for any reason. Missed jobs executions will be counted as failed ones. // +nullable // +optional StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"` // Specifies how to treat concurrent executions of a Job. // Valid values are: // - "Allow" (default): allows CronJobs to run concurrently; // - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; // - "Replace": cancels currently running job and replaces it with a new one // +kubebuilder:validation:Enum=Allow;Forbid;Replace // +kubebuilder:default=Allow // +optional ConcurrencyPolicy batchv1.ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"` // Specifies the duration in seconds relative to the startTime that the job // may be continuously active before the system tries to terminate it; value // must be positive integer. If a Job is suspended (at creation or through an // update), this timer will effectively be stopped and reset when the Job is // resumed again. // +nullable // +optional ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"` // Specifies the number of retries before marking this job failed. // Defaults to 6 // +kubebuilder:validation:Minimum=0 // +nullable // +optional BackoffLimit *int32 `json:"backoffLimit,omitempty"` // The number of successful finished jobs to retain. // This is a pointer to distinguish between explicit zero and not specified. // Defaults to 3. // +kubebuilder:validation:Minimum=0 // +nullable // +optional SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty"` // The number of failed finished jobs to retain. // This is a pointer to distinguish between explicit zero and not specified. // Defaults to 1. // +kubebuilder:validation:Minimum=0 // +nullable // +optional FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty"` }
BackupPolicySpec defines the configuration items for MySQLCluster backup.
The following fields will be copied to CronJob.spec:
- Schedule - StartingDeadlineSeconds - ConcurrencyPolicy - SuccessfulJobsHistoryLimit - FailedJobsHistoryLimit
The following fields will be copied to CronJob.spec.jobTemplate.
- ActiveDeadlineSeconds - BackoffLimit
func (*BackupPolicySpec) DeepCopy ¶
func (in *BackupPolicySpec) DeepCopy() *BackupPolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupPolicySpec.
func (*BackupPolicySpec) DeepCopyInto ¶
func (in *BackupPolicySpec) DeepCopyInto(out *BackupPolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupStatus ¶
type BackupStatus struct { // The time of the backup. This is used to generate object keys of backup files in a bucket. // +nullable Time metav1.Time `json:"time"` // Elapsed is the time spent on the backup. Elapsed metav1.Duration `json:"elapsed"` // SourceIndex is the ordinal of the backup source instance. SourceIndex int `json:"sourceIndex"` // SourceUUID is the `server_uuid` of the backup source instance. SourceUUID string `json:"sourceUUID"` // BinlogFilename is the binlog filename that the backup source instance was writing to // at the backup. BinlogFilename string `json:"binlogFilename"` // GTIDSet is the GTID set of the full dump of database. GTIDSet string `json:"gtidSet"` // DumpSize is the size in bytes of a full dump of database stored in an object storage bucket. DumpSize int64 `json:"dumpSize"` // BinlogSize is the size in bytes of a tarball of binlog files stored in an object storage bucket. BinlogSize int64 `json:"binlogSize"` // WorkDirUsage is the max usage in bytes of the woking directory. WorkDirUsage int64 `json:"workDirUsage"` // Warnings are list of warnings from the last backup, if any. // +nullable Warnings []string `json:"warnings"` }
BackupStatus represents the status of the last successful 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 BucketConfig ¶
type BucketConfig struct { // The name of the bucket // +kubebuilder:validation:MinLength=1 BucketName string `json:"bucketName"` // The region of the bucket. // This can also be set through `AWS_REGION` environment variable. // +optional Region string `json:"region,omitempty"` // The API endpoint URL. Set this for non-S3 object storages. // +kubebuilder:validation:Pattern="^https?://.*" // +optional EndpointURL string `json:"endpointURL,omitempty"` // Allows you to enable the client to use path-style addressing, i.e., // https?://ENDPOINT/BUCKET/KEY. By default, a virtual-host addressing // is used (https?://BUCKET.ENDPOINT/KEY). // +optional UsePathStyle bool `json:"usePathStyle,omitempty"` // BackendType is an identifier for the object storage to be used. // // +kubebuilder:validation:Enum=s3;gcs // +kubebuilder:default=s3 // +optional BackendType string `json:"backendType,omitempty"` }
BucketConfig is a set of parameter to access an object storage bucket.
func (*BucketConfig) DeepCopy ¶
func (in *BucketConfig) DeepCopy() *BucketConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketConfig.
func (*BucketConfig) DeepCopyInto ¶
func (in *BucketConfig) DeepCopyInto(out *BucketConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvFromSourceApplyConfiguration ¶
type EnvFromSourceApplyConfiguration corev1ac.EnvFromSourceApplyConfiguration
EnvFromSourceApplyConfiguration is the type defined to implement the DeepCopy method.
func (*EnvFromSourceApplyConfiguration) DeepCopy ¶
func (in *EnvFromSourceApplyConfiguration) DeepCopy() *EnvFromSourceApplyConfiguration
DeepCopy is copying the receiver, creating a new EnvFromSourceApplyConfiguration.
func (*EnvFromSourceApplyConfiguration) DeepCopyInto ¶
func (in *EnvFromSourceApplyConfiguration) DeepCopyInto(out *EnvFromSourceApplyConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvVarApplyConfiguration ¶
type EnvVarApplyConfiguration corev1ac.EnvVarApplyConfiguration
EnvVarApplyConfiguration is the type defined to implement the DeepCopy method.
func (*EnvVarApplyConfiguration) DeepCopy ¶
func (in *EnvVarApplyConfiguration) DeepCopy() *EnvVarApplyConfiguration
DeepCopy is copying the receiver, creating a new EnvVarApplyConfiguration.
func (*EnvVarApplyConfiguration) DeepCopyInto ¶
func (in *EnvVarApplyConfiguration) DeepCopyInto(out *EnvVarApplyConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JobConfig ¶
type JobConfig struct { // ServiceAccountName specifies the ServiceAccount to run the Pod. // +kubebuilder:validation:MinLength=1 ServiceAccountName string `json:"serviceAccountName"` // Specifies how to access an object storage bucket. BucketConfig BucketConfig `json:"bucketConfig"` // WorkVolume is the volume source for the working directory. // Since the backup or restore task can use a lot of bytes in the working directory, // You should always give a volume with enough capacity. // // The recommended volume source is a generic ephemeral volume. // https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes WorkVolume VolumeSourceApplyConfiguration `json:"workVolume"` // Threads is the number of threads used for backup or restoration. // +kubebuilder:validation:Minimum=1 // +kubebuilder:default=4 // +optional Threads int `json:"threads,omitempty"` // Memory is the amount of memory requested for the Pod. // +kubebuilder:default="4Gi" // +nullable // +optional Memory *resource.Quantity `json:"memory,omitempty"` // MaxMemory is the amount of maximum memory for the Pod. // +nullable // +optional MaxMemory *resource.Quantity `json:"maxMemory,omitempty"` // List of sources to populate environment variables in the container. // The keys defined within a source must be a C_IDENTIFIER. All invalid keys // will be reported as an event when the container is starting. When a key exists in multiple // sources, the value associated with the last source will take precedence. // Values defined by an Env with a duplicate key will take precedence. // // You can configure S3 bucket access parameters through environment variables. // See https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config#EnvConfig // // +optional EnvFrom []EnvFromSourceApplyConfiguration `json:"envFrom,omitempty"` // List of environment variables to set in the container. // // You can configure S3 bucket access parameters through environment variables. // See https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config#EnvConfig // // +optional Env []EnvVarApplyConfiguration `json:"env,omitempty"` // If specified, the pod's scheduling constraints. // // +optional Affinity *AffinityApplyConfiguration `json:"affinity,omitempty"` // Volumes defines the list of volumes that can be mounted by containers in the Pod. // // +optional Volumes []VolumeApplyConfiguration `json:"volumes,omitempty"` // VolumeMounts describes a list of volume mounts that are to be mounted in a container. // // +optional VolumeMounts []VolumeMountApplyConfiguration `json:"volumeMounts,omitempty"` }
JobConfig is a set of parameters for backup and restore job Pods.
func (*JobConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobConfig.
func (*JobConfig) DeepCopyInto ¶
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
func (*MySQLCluster) BackupCronJobName ¶
func (r *MySQLCluster) BackupCronJobName() string
BackupCronJobName returns the name of CronJob for backup.
func (*MySQLCluster) BackupRoleName ¶
func (r *MySQLCluster) BackupRoleName() string
BackupRoleName returns the name of Role/RoleBinding for backup.
func (*MySQLCluster) CertificateName ¶
func (r *MySQLCluster) CertificateName() string
CertificateName returns the name of Certificate issued for moco-agent gRPC server. The Certificate will be created in the namespace of the controller.
This is also the Secret name created from the Certificate.
func (*MySQLCluster) ControllerSecretName ¶
func (r *MySQLCluster) ControllerSecretName() string
ControllerSecretName returns the name of the Secret for MOCO controller. This Secret is placed in the namespace of the controller.
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) GRPCSecretName ¶
func (r *MySQLCluster) GRPCSecretName() string
GRPCSecretName returns the name of Secret of TLS server certificate for moco-agent. The Secret will be created in the MySQLCluster namespace.
func (*MySQLCluster) HeadlessServiceName ¶
func (r *MySQLCluster) HeadlessServiceName() string
HeadlessServiceName returns the name of Service for StatefulSet.
func (*MySQLCluster) MyCnfSecretName ¶
func (r *MySQLCluster) MyCnfSecretName() string
MyCnfSecretName returns the name of the Secret for users. The contents are formatted for mysql commands (as my.cnf).
func (*MySQLCluster) PodHostname ¶
func (r *MySQLCluster) PodHostname(index int) string
PodHostname returns the hostname of a Pod with the given index.
func (*MySQLCluster) PodName ¶
func (r *MySQLCluster) PodName(index int) string
PodName returns PrefixedName() + "-" + index
func (*MySQLCluster) PrefixedName ¶
func (r *MySQLCluster) PrefixedName() string
PrefixedName returns "moco-<<metadata.name>>"
func (*MySQLCluster) PrimaryServiceName ¶
func (r *MySQLCluster) PrimaryServiceName() string
PrimaryServiceName returns the name of Service for the primary mysqld instance.
func (*MySQLCluster) ReplicaServiceName ¶
func (r *MySQLCluster) ReplicaServiceName() string
ReplicaServiceName returns the name of Service for replica mysqld instances.
func (*MySQLCluster) RestoreJobName ¶
func (r *MySQLCluster) RestoreJobName() string
RestoreJobName returns the name of Job for restoration.
func (*MySQLCluster) RestoreRoleName ¶
func (r *MySQLCluster) RestoreRoleName() string
RestoreRoleName returns the name of Role/RoleBinding for restoration.
func (*MySQLCluster) SetupWebhookWithManager ¶
func (r *MySQLCluster) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*MySQLCluster) SlowQueryLogAgentConfigMapName ¶
func (r *MySQLCluster) SlowQueryLogAgentConfigMapName() string
SlowQueryLogAgentConfigMapName returns the name of the slow query log agent config name.
func (*MySQLCluster) UserSecretName ¶
func (r *MySQLCluster) UserSecretName() string
UserSecretName returns the name of the Secret for users. This Secret is placed in the same namespace as r.
type MySQLClusterList ¶
type MySQLClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []MySQLCluster `json:"items"` }
MySQLClusterList contains a list of MySQLCluster
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 ¶
type MySQLClusterSpec struct { // Replicas is the number of instances. Available values are positive odd numbers. // +kubebuilder:default=1 // +optional Replicas int32 `json:"replicas,omitempty"` // PodTemplate is a `Pod` template for MySQL server container. PodTemplate PodTemplateSpec `json:"podTemplate"` // VolumeClaimTemplates is a list of `PersistentVolumeClaim` templates for MySQL server container. // A claim named "mysql-data" must be included in the list. // +kubebuilder:validation:MinItems=1 VolumeClaimTemplates []PersistentVolumeClaim `json:"volumeClaimTemplates"` // PrimaryServiceTemplate is a `Service` template for primary. // +optional PrimaryServiceTemplate *ServiceTemplate `json:"primaryServiceTemplate,omitempty"` // ReplicaServiceTemplate is a `Service` template for replica. // +optional ReplicaServiceTemplate *ServiceTemplate `json:"replicaServiceTemplate,omitempty"` // MySQLConfigMapName is a `ConfigMap` name of MySQL config. // +nullable // +optional MySQLConfigMapName *string `json:"mysqlConfigMapName,omitempty"` // ReplicationSourceSecretName is a `Secret` name which contains replication source info. // If this field is given, the `MySQLCluster` works as an intermediate primary. // +nullable // +optional ReplicationSourceSecretName *string `json:"replicationSourceSecretName,omitempty"` // Collectors is the list of collector flag names of mysqld_exporter. // If this field is not empty, MOCO adds mysqld_exporter as a sidecar to collect // and export mysqld metrics in Prometheus format. // // See https://github.com/prometheus/mysqld_exporter/blob/master/README.md#collector-flags for flag names. // // Example: ["engine_innodb_status", "info_schema.innodb_metrics"] // +optional Collectors []string `json:"collectors,omitempty"` // ServerIDBase, if set, will become the base number of server-id of each MySQL // instance of this cluster. For example, if this is 100, the server-ids will be // 100, 101, 102, and so on. // If the field is not given or zero, MOCO automatically sets a random positive integer. // +optional ServerIDBase int32 `json:"serverIDBase,omitempty"` // MaxDelaySeconds configures the readiness probe of mysqld container. // For a replica mysqld instance, if it is delayed to apply transactions over this threshold, // the mysqld instance will be marked as non-ready. // The default is 60 seconds. // Setting this field to 0 disables the delay check in the probe. // +kubebuilder:validation:Minimum=0 // +kubebuilder:default=60 // +optional MaxDelaySeconds *int `json:"maxDelaySeconds,omitempty"` // StartupWaitSeconds is the maximum duration to wait for `mysqld` container to start working. // The default is 3600 seconds. // +kubebuilder:validation:Minimum=0 // +kubebuilder:default=3600 // +optional StartupWaitSeconds int32 `json:"startupWaitSeconds,omitempty"` // LogRotationSchedule specifies the schedule to rotate MySQL logs. // If not set, the default is to rotate logs every 5 minutes. // See https://pkg.go.dev/github.com/robfig/cron/v3#hdr-CRON_Expression_Format for the field format. // +optional LogRotationSchedule string `json:"logRotationSchedule,omitempty"` // The name of BackupPolicy custom resource in the same namespace. // If this is set, MOCO creates a CronJob to take backup of this MySQL cluster periodically. // +nullable // +optional BackupPolicyName *string `json:"backupPolicyName,omitempty"` // Restore is the specification to perform Point-in-Time-Recovery from existing cluster. // If this field is not null, MOCO restores the data as specified and create a new // cluster with the data. This field is not editable. // +optional Restore *RestoreSpec `json:"restore,omitempty"` // DisableSlowQueryLogContainer controls whether to add a sidecar container named "slow-log" // to output slow logs as the containers output. // If set to true, the sidecar container is not added. The default is false. // +optional DisableSlowQueryLogContainer bool `json:"disableSlowQueryLogContainer,omitempty"` }
MySQLClusterSpec defines the desired state of MySQLCluster
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 { // Conditions is an array of conditions. // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` // CurrentPrimaryIndex is the index of the current primary Pod in StatefulSet. // Initially, this is zero. CurrentPrimaryIndex int `json:"currentPrimaryIndex"` // SyncedReplicas is the number of synced instances including the primary. // +optional SyncedReplicas int `json:"syncedReplicas,omitempty"` // ErrantReplicas is the number of instances that have errant transactions. // +optional ErrantReplicas int `json:"errantReplicas,omitempty"` // ErrantReplicaList is the list of indices of errant replicas. // +optional ErrantReplicaList []int `json:"errantReplicaList,omitempty"` // Backup is the status of the last successful backup. // +optional Backup BackupStatus `json:"backup"` // RestoredTime is the time when the cluster data is restored. // +optional RestoredTime *metav1.Time `json:"restoredTime,omitempty"` // Cloned indicates if the initial cloning from an external source has been completed. // +optional Cloned bool `json:"cloned,omitempty"` // ReconcileInfo represents version information for reconciler. // +optional ReconcileInfo ReconcileInfo `json:"reconcileInfo"` }
MySQLClusterStatus defines the observed state of MySQLCluster
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.
type ObjectMeta ¶
type ObjectMeta struct { // Name is the name of the object. // +optional Name string `json:"name,omitempty"` // Labels is a map of string keys and values. // +optional Labels map[string]string `json:"labels,omitempty"` // Annotations is a map of string keys and values. // +optional Annotations map[string]string `json:"annotations,omitempty"` }
ObjectMeta is metadata of objects. This is partially copied from metav1.ObjectMeta.
func (*ObjectMeta) DeepCopy ¶
func (in *ObjectMeta) DeepCopy() *ObjectMeta
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectMeta.
func (*ObjectMeta) DeepCopyInto ¶
func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OverwriteContainer ¶ added in v0.12.0
type OverwriteContainer struct { // Name of the container to overwrite. // +kubebuilder:validation:Required Name OverwriteableContainerName `json:"name"` // Resources is the container resource to be overwritten. // +optional Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"` }
OverwriteContainer defines the container spec used for overwriting.
func (*OverwriteContainer) DeepCopy ¶ added in v0.12.0
func (in *OverwriteContainer) DeepCopy() *OverwriteContainer
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OverwriteContainer.
func (*OverwriteContainer) DeepCopyInto ¶ added in v0.12.0
func (in *OverwriteContainer) DeepCopyInto(out *OverwriteContainer)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OverwriteableContainerName ¶ added in v0.12.0
type OverwriteableContainerName string
OverwriteableContainerName is the name of the container. +kubebuilder:validation:Enum=agent;moco-init;slow-log;mysqld-exporter
const ( AgentContainerName OverwriteableContainerName = constants.AgentContainerName InitContainerName OverwriteableContainerName = constants.InitContainerName SlowQueryLogAgentContainerName OverwriteableContainerName = constants.SlowQueryLogAgentContainerName ExporterContainerName OverwriteableContainerName = constants.ExporterContainerName )
func (OverwriteableContainerName) String ¶ added in v0.12.0
func (c OverwriteableContainerName) String() string
String implements the fmt.Stringer interface.
type PersistentVolumeClaim ¶
type PersistentVolumeClaim struct { // Standard object's metadata. ObjectMeta `json:"metadata"` // Spec defines the desired characteristics of a volume requested by a pod author. Spec PersistentVolumeClaimSpecApplyConfiguration `json:"spec"` }
PersistentVolumeClaim is a user's request for and claim to a persistent volume. This is slightly modified from corev1.PersistentVolumeClaim.
func (*PersistentVolumeClaim) DeepCopy ¶
func (in *PersistentVolumeClaim) DeepCopy() *PersistentVolumeClaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaim.
func (*PersistentVolumeClaim) DeepCopyInto ¶
func (in *PersistentVolumeClaim) DeepCopyInto(out *PersistentVolumeClaim)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (PersistentVolumeClaim) StorageSize ¶ added in v0.13.0
func (in PersistentVolumeClaim) StorageSize() resource.Quantity
func (PersistentVolumeClaim) ToCoreV1 ¶
func (in PersistentVolumeClaim) ToCoreV1() *corev1ac.PersistentVolumeClaimApplyConfiguration
ToCoreV1 converts the PersistentVolumeClaim to a PersistentVolumeClaimApplyConfiguration.
type PersistentVolumeClaimSpecApplyConfiguration ¶
type PersistentVolumeClaimSpecApplyConfiguration corev1ac.PersistentVolumeClaimSpecApplyConfiguration
PersistentVolumeClaimSpecApplyConfiguration is the type defined to implement the DeepCopy method.
func (*PersistentVolumeClaimSpecApplyConfiguration) DeepCopy ¶
func (in *PersistentVolumeClaimSpecApplyConfiguration) DeepCopy() *PersistentVolumeClaimSpecApplyConfiguration
DeepCopy is copying the receiver, creating a new PersistentVolumeClaimSpecApplyConfiguration.
func (*PersistentVolumeClaimSpecApplyConfiguration) DeepCopyInto ¶
func (in *PersistentVolumeClaimSpecApplyConfiguration) DeepCopyInto(out *PersistentVolumeClaimSpecApplyConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodSpecApplyConfiguration ¶
type PodSpecApplyConfiguration corev1ac.PodSpecApplyConfiguration
PodSpecApplyConfiguration is the type defined to implement the DeepCopy method.
func (*PodSpecApplyConfiguration) DeepCopy ¶
func (in *PodSpecApplyConfiguration) DeepCopy() *PodSpecApplyConfiguration
DeepCopy is copying the receiver, creating a new PodSpecApplyConfiguration.
func (*PodSpecApplyConfiguration) DeepCopyInto ¶
func (in *PodSpecApplyConfiguration) DeepCopyInto(out *PodSpecApplyConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodTemplateSpec ¶
type PodTemplateSpec struct { // Standard object's metadata. The name in this metadata is ignored. // +optional ObjectMeta `json:"metadata,omitempty"` // Specification of the desired behavior of the pod. // The name of the MySQL server container in this spec must be `mysqld`. Spec PodSpecApplyConfiguration `json:"spec"` // OverwriteContainers overwrites the container definitions provided by default by the system. // +optional OverwriteContainers []OverwriteContainer `json:"overwriteContainers,omitempty"` }
PodTemplateSpec describes the data a pod should have when created from a template. This is slightly modified from corev1.PodTemplateSpec.
func (*PodTemplateSpec) DeepCopy ¶
func (in *PodTemplateSpec) DeepCopy() *PodTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodTemplateSpec.
func (*PodTemplateSpec) DeepCopyInto ¶
func (in *PodTemplateSpec) DeepCopyInto(out *PodTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReconcileInfo ¶
type ReconcileInfo struct { // Generation is the `metadata.generation` value of the last reconciliation. // See also https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#status-subresource // +optional Generation int64 `json:"generation,omitempty"` // ReconcileVersion is the version of the operator reconciler. // +optional ReconcileVersion int `json:"reconcileVersion"` }
ReconcileInfo is the type to record the last reconciliation information.
func (*ReconcileInfo) DeepCopy ¶
func (in *ReconcileInfo) DeepCopy() *ReconcileInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReconcileInfo.
func (*ReconcileInfo) DeepCopyInto ¶
func (in *ReconcileInfo) DeepCopyInto(out *ReconcileInfo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceRequirementsApplyConfiguration ¶ added in v0.12.0
type ResourceRequirementsApplyConfiguration corev1ac.ResourceRequirementsApplyConfiguration
ResourceRequirementsApplyConfiguration is the type defined to implement the DeepCopy method.
func (*ResourceRequirementsApplyConfiguration) DeepCopy ¶ added in v0.12.0
func (in *ResourceRequirementsApplyConfiguration) DeepCopy() *ResourceRequirementsApplyConfiguration
DeepCopy is copying the receiver, creating a new OverwriteContainer.
func (*ResourceRequirementsApplyConfiguration) DeepCopyInto ¶ added in v0.12.0
func (in *ResourceRequirementsApplyConfiguration) DeepCopyInto(out *ResourceRequirementsApplyConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RestoreSpec ¶
type RestoreSpec struct { // SourceName is the name of the source `MySQLCluster`. // +kubebuilder:validation:MinLength=1 SourceName string `json:"sourceName"` // SourceNamespace is the namespace of the source `MySQLCluster`. // +kubebuilder:validation:MinLength=1 SourceNamespace string `json:"sourceNamespace"` // RestorePoint is the target date and time to restore data. // The format is RFC3339. e.g. "2006-01-02T15:04:05Z" RestorePoint metav1.Time `json:"restorePoint"` // Specifies parameters for restore Pod. JobConfig `json:"jobConfig"` }
RestoreSpec represents a set of parameters for Point-in-Time Recovery.
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 ServiceSpecApplyConfiguration ¶
type ServiceSpecApplyConfiguration corev1ac.ServiceSpecApplyConfiguration
ServiceSpecApplyConfiguration is the type defined to implement the DeepCopy method.
func (*ServiceSpecApplyConfiguration) DeepCopy ¶
func (in *ServiceSpecApplyConfiguration) DeepCopy() *ServiceSpecApplyConfiguration
DeepCopy is copying the receiver, creating a new ServiceSpecApplyConfiguration.
func (*ServiceSpecApplyConfiguration) DeepCopyInto ¶
func (in *ServiceSpecApplyConfiguration) DeepCopyInto(out *ServiceSpecApplyConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceTemplate ¶
type ServiceTemplate struct { // Standard object's metadata. Only `annotations` and `labels` are valid. // +optional ObjectMeta `json:"metadata,omitempty"` // Spec is the ServiceSpec // +optional Spec *ServiceSpecApplyConfiguration `json:"spec,omitempty"` }
ServiceTemplate defines the desired spec and annotations of Service
func (*ServiceTemplate) DeepCopy ¶
func (in *ServiceTemplate) DeepCopy() *ServiceTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceTemplate.
func (*ServiceTemplate) DeepCopyInto ¶
func (in *ServiceTemplate) DeepCopyInto(out *ServiceTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeApplyConfiguration ¶ added in v0.16.0
type VolumeApplyConfiguration corev1ac.VolumeApplyConfiguration
VolumeApplyConfiguration is the type defined to implement the DeepCopy method.
func (*VolumeApplyConfiguration) DeepCopy ¶ added in v0.16.0
func (in *VolumeApplyConfiguration) DeepCopy() *VolumeApplyConfiguration
DeepCopy is copying the receiver, creating a new VolumeSourceApplyConfiguration.
func (*VolumeApplyConfiguration) DeepCopyInto ¶ added in v0.16.0
func (in *VolumeApplyConfiguration) DeepCopyInto(out *VolumeApplyConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeMountApplyConfiguration ¶ added in v0.16.0
type VolumeMountApplyConfiguration corev1ac.VolumeMountApplyConfiguration
VolumeMountApplyConfiguration is the type defined to implement the DeepCopy method.
func (*VolumeMountApplyConfiguration) DeepCopy ¶ added in v0.16.0
func (in *VolumeMountApplyConfiguration) DeepCopy() *VolumeMountApplyConfiguration
DeepCopy is copying the receiver, creating a new VolumeSourceApplyConfiguration.
func (*VolumeMountApplyConfiguration) DeepCopyInto ¶ added in v0.16.0
func (in *VolumeMountApplyConfiguration) DeepCopyInto(out *VolumeMountApplyConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeSourceApplyConfiguration ¶
type VolumeSourceApplyConfiguration corev1ac.VolumeSourceApplyConfiguration
VolumeSourceApplyConfiguration is the type defined to implement the DeepCopy method.
func (*VolumeSourceApplyConfiguration) DeepCopy ¶
func (in *VolumeSourceApplyConfiguration) DeepCopy() *VolumeSourceApplyConfiguration
DeepCopy is copying the receiver, creating a new VolumeSourceApplyConfiguration.
func (*VolumeSourceApplyConfiguration) DeepCopyInto ¶
func (in *VolumeSourceApplyConfiguration) DeepCopyInto(out *VolumeSourceApplyConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.