Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the moco v1alpha1 API group +kubebuilder:object:generate=true +groupName=moco.cybozu.com
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "moco.cybozu.com", Version: "v1alpha1"} // 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 MySQLCluster ¶
type MySQLCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec MySQLClusterSpec `json:"spec"` Status MySQLClusterStatus `json:"status,omitempty"` }
MySQLCluster is the Schema for the mysqlclusters API
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 MySQLClusterCondition ¶
type MySQLClusterCondition struct { // Type is the type of the condition. Type MySQLClusterConditionType `json:"type"` // Status is the status of the condition. Status corev1.ConditionStatus `json:"status"` // Reason is a one-word CamelCase reason for the condition's last transition. // +optional Reason string `json:"reason,omitempty"` // Message is a human-readable message indicating details about last transition. // +optional Message string `json:"message,omitempty"` // LastTransitionTime is the last time the condition transits from one status to another. LastTransitionTime metav1.Time `json:"lastTransitionTime"` }
MySQLClusterCondition defines the condition of MySQLCluster.
func (*MySQLClusterCondition) DeepCopy ¶
func (in *MySQLClusterCondition) DeepCopy() *MySQLClusterCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MySQLClusterCondition.
func (*MySQLClusterCondition) DeepCopyInto ¶
func (in *MySQLClusterCondition) DeepCopyInto(out *MySQLClusterCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MySQLClusterConditionType ¶
type MySQLClusterConditionType string
MySQLClusterConditionType is the type of MySQLCluster condition. +kubebuilder:validation:Enum=Initialized;Healthy;Available;OutOfSync;Failure;Violation
const ( ConditionInitialized MySQLClusterConditionType = "Initialized" ConditionHealthy MySQLClusterConditionType = "Healthy" ConditionAvailable MySQLClusterConditionType = "Available" ConditionOutOfSync MySQLClusterConditionType = "OutOfSync" ConditionFailure MySQLClusterConditionType = "Failure" ConditionViolation MySQLClusterConditionType = "Violation" )
Valid values for MySQLClusterConditionType
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 1, 3, and 5. // +kubebuilder:validation:Enum=1;3;5 // +kubebuilder:default=1 // +optional Replicas int32 `json:"replicas,omitempty"` // PodTemplate is a `Pod` template for MySQL server container. PodTemplate PodTemplateSpec `json:"podTemplate"` // DataVolumeClaimTemplateSpec is a `PersistentVolumeClaimSpec` template for the MySQL data volume. DataVolumeClaimTemplateSpec corev1.PersistentVolumeClaimSpec `json:"dataVolumeClaimTemplateSpec"` // VolumeClaimTemplates is a list of `PersistentVolumeClaim` templates for MySQL server container, except for the MySQL data volume. // +optional VolumeClaimTemplates []PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"` // ServiceTemplate is a `Service` template for both primary and replicas. // +optional ServiceTemplate *corev1.ServiceSpec `json:"serviceTemplate,omitempty"` // MySQLConfigMapName is a `ConfigMap` name of MySQL config. // +optional MySQLConfigMapName *string `json:"mysqlConfigMapName,omitempty"` // RootPasswordSecretName is a `Secret` name for root user config. // +optional RootPasswordSecretName *string `json:"rootPasswordSecretName,omitempty"` // ReplicationSourceSecretName is a `Secret` name which contains replication source info. // Keys must appear in https://dev.mysql.com/doc/refman/8.0/en/change-master-to.html. // If this field is given, the `MySQLCluster` works as an intermediate primary. // +optional ReplicationSourceSecretName *string `json:"replicationSourceSecretName,omitempty"` // LogRotationSchedule is a schedule in Cron format for MySQL log rotation // +kubebuilder:default="*/5 * * * *" // +kubebuilder:validation:Pattern=`^(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\d+(ns|us|µs|ms|s|m|h))+)|((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5,7})$` // +optional LogRotationSchedule string `json:"logRotationSchedule,omitempty"` // Restore is the specification to perform Point-in-Time-Recovery from existing cluster. // If this field is filled, start restoring. This field is unable to be updated. // +optional Restore *RestoreSpec `json:"restore,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 []MySQLClusterCondition `json:"conditions,omitempty"` // Ready represents the status of readiness. Ready corev1.ConditionStatus `json:"ready"` // CurrentPrimaryIndex is the ordinal of the current primary in StatefulSet. // +optional CurrentPrimaryIndex *int `json:"currentPrimaryIndex,omitempty"` // SyncedReplicas is the number of synced instances including the primary. SyncedReplicas int `json:"syncedReplicas"` // AgentToken is the token to call API exposed by the agent sidecar AgentToken string `json:"agentToken"` }
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 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 corev1.PersistentVolumeClaimSpec `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.
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 corev1.PodSpec `json:"spec"` }
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 RestoreSpec ¶
type RestoreSpec struct { // SourceClusterName is the name of the source `MySQLCluster`. SourceClusterName string `json:"restore"` // PointInTime is the point-in-time of the state which the cluster is restored to. PointInTime metav1.Time `json:"pointInTime"` }
RestoreSpec defines the desired spec of 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.