Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the dbaas v1 API group +kubebuilder:object:generate=true +groupName=dbaas.percona.com
Index ¶
- Constants
- Variables
- type AppState
- type BackupSpec
- type BackupStorageAzureSpec
- type BackupStorageGCSSpec
- type BackupStorageS3Spec
- type BackupStorageSpec
- type BackupStorageType
- type DBInstanceSpec
- type DatabaseCluster
- type DatabaseClusterList
- type DatabaseClusterStatus
- type DatabaseSpec
- type EngineType
- type LoadBalancerSpec
- type LoadBalancerType
- type MonitoringSpec
- type PMMSpec
- type VolumeSpec
Constants ¶
const ( BackupStorageFilesystem BackupStorageType = "filesystem" BackupStorageS3 BackupStorageType = "s3" BackupStorageGCS BackupStorageType = "gcs" BackupStorageAzure BackupStorageType = "azure" PXCEngine EngineType = "pxc" PSMDBEngine EngineType = "psmdb" LoadBalancerMongos LoadBalancerType = "mongos" LoadBalancerHAProxy LoadBalancerType = "haproxy" LoadBalancerProxySQL LoadBalancerType = "proxysql" AppStateUnknown AppState = "unknown" AppStateInit AppState = "initializing" AppStatePaused AppState = "paused" AppStatePausing AppState = "pausing" AppStateStopping AppState = "stopping" AppStateReady AppState = "ready" AppStateError AppState = "error" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "dbaas.percona.com", Version: "v1"} // 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 BackupSpec ¶
type BackupSpec struct { Enabled bool `json:"enabled,omitempty"` Image string `json:"image,omitempty"` InitImage string `json:"initImage,omitempty"` ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"` ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` ServiceAccountName string `json:"serviceAccountName,omitempty"` ContainerSecurityContext *corev1.SecurityContext `json:"containerSecurityContext,omitempty"` Resources corev1.ResourceRequirements `json:"resources,omitempty"` Storages map[string]*BackupStorageSpec `json:"storages,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 BackupStorageAzureSpec ¶
type BackupStorageAzureSpec struct { // A container name is a valid DNS name that conforms to the Azure naming rules. ContainerName string `json:"containerName"` // A prefix is a sub-folder to the backups inside the container Prefix string `json:"prefix,omitempty"` // A generated key that can be used to authorize access to data in your account using the Shared Key authorization. CredentialsSecret string `json:"credentialsSecret"` // The endpoint allows clients to securely access data EndpointURL string `json:"endpointUrl,omitempty"` // Hot (Frequently accessed or modified data), Cool (Infrequently accessed or modified data), Archive (Rarely accessed or modified data) StorageClass string `json:"storageClass,omitempty"` }
func (*BackupStorageAzureSpec) DeepCopy ¶
func (in *BackupStorageAzureSpec) DeepCopy() *BackupStorageAzureSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupStorageAzureSpec.
func (*BackupStorageAzureSpec) DeepCopyInto ¶
func (in *BackupStorageAzureSpec) DeepCopyInto(out *BackupStorageAzureSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupStorageGCSSpec ¶
type BackupStorageGCSSpec struct { Bucket string `json:"bucket"` Prefix string `json:"prefix,omitempty"` CredentialsSecret string `json:"credentialsSecret"` EndpointURL string `json:"endpointUrl,omitempty"` // STANDARD, NEARLINE, COLDLINE, ARCHIVE StorageClass string `json:"storageClass,omitempty"` }
func (*BackupStorageGCSSpec) DeepCopy ¶
func (in *BackupStorageGCSSpec) DeepCopy() *BackupStorageGCSSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupStorageGCSSpec.
func (*BackupStorageGCSSpec) DeepCopyInto ¶
func (in *BackupStorageGCSSpec) DeepCopyInto(out *BackupStorageGCSSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupStorageS3Spec ¶
type BackupStorageS3Spec struct { Bucket string `json:"bucket"` Prefix string `json:"prefix,omitempty"` CredentialsSecret string `json:"credentialsSecret"` Region string `json:"region,omitempty"` EndpointURL string `json:"endpointUrl,omitempty"` StorageClass string `json:"storageClass,omitempty"` }
func (*BackupStorageS3Spec) DeepCopy ¶
func (in *BackupStorageS3Spec) DeepCopy() *BackupStorageS3Spec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupStorageS3Spec.
func (*BackupStorageS3Spec) DeepCopyInto ¶
func (in *BackupStorageS3Spec) DeepCopyInto(out *BackupStorageS3Spec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupStorageSpec ¶
type BackupStorageSpec struct { Type BackupStorageType `json:"type"` Volume *VolumeSpec `json:"volumeSpec,omitempty"` S3 *BackupStorageS3Spec `json:"s3,omitempty"` GCS *BackupStorageGCSSpec `json:"gcs,omitempty"` Azure *BackupStorageAzureSpec `json:"azure,omitempty"` NodeSelector map[string]string `json:"nodeSelector,omitempty"` Resources corev1.ResourceRequirements `json:"resources,omitempty"` Affinity *corev1.Affinity `json:"affinity,omitempty"` Tolerations []corev1.Toleration `json:"tolerations,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Labels map[string]string `json:"labels,omitempty"` SchedulerName string `json:"schedulerName,omitempty"` PriorityClassName string `json:"priorityClassName,omitempty"` PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"` ContainerSecurityContext *corev1.SecurityContext `json:"containerSecurityContext,omitempty"` RuntimeClassName *string `json:"runtimeClassName,omitempty"` VerifyTLS *bool `json:"verifyTLS,omitempty"` }
func (*BackupStorageSpec) DeepCopy ¶
func (in *BackupStorageSpec) DeepCopy() *BackupStorageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupStorageSpec.
func (*BackupStorageSpec) DeepCopyInto ¶
func (in *BackupStorageSpec) DeepCopyInto(out *BackupStorageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupStorageType ¶
type BackupStorageType string
type DBInstanceSpec ¶
type DBInstanceSpec struct { CPU string `json:"cpu,omitempty"` Memory string `json:"memory,omitempty"` DiskSize string `json:"diskSize,omitempty"` }
func (*DBInstanceSpec) DeepCopy ¶
func (in *DBInstanceSpec) DeepCopy() *DBInstanceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBInstanceSpec.
func (*DBInstanceSpec) DeepCopyInto ¶
func (in *DBInstanceSpec) DeepCopyInto(out *DBInstanceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DatabaseCluster ¶
type DatabaseCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DatabaseSpec `json:"spec,omitempty"` Status DatabaseClusterStatus `json:"status,omitempty"` }
DatabaseCluster is the Schema for the databases API
func (*DatabaseCluster) DeepCopy ¶
func (in *DatabaseCluster) DeepCopy() *DatabaseCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseCluster.
func (*DatabaseCluster) DeepCopyInto ¶
func (in *DatabaseCluster) DeepCopyInto(out *DatabaseCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DatabaseCluster) DeepCopyObject ¶
func (in *DatabaseCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DatabaseClusterList ¶
type DatabaseClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []DatabaseCluster `json:"items"` }
DatabaseClusterList contains a list of Database
func (*DatabaseClusterList) DeepCopy ¶
func (in *DatabaseClusterList) DeepCopy() *DatabaseClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseClusterList.
func (*DatabaseClusterList) DeepCopyInto ¶
func (in *DatabaseClusterList) DeepCopyInto(out *DatabaseClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DatabaseClusterList) DeepCopyObject ¶
func (in *DatabaseClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DatabaseClusterStatus ¶
type DatabaseClusterStatus struct { Ready int32 `json:"ready,omitempty"` Size int32 `json:"size,omitempty"` State AppState `json:"status,omitempty"` Host string `json:"host,omitempty"` }
DatabaseClusterStatus defines the observed state of Database
func (*DatabaseClusterStatus) DeepCopy ¶
func (in *DatabaseClusterStatus) DeepCopy() *DatabaseClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseClusterStatus.
func (*DatabaseClusterStatus) DeepCopyInto ¶
func (in *DatabaseClusterStatus) DeepCopyInto(out *DatabaseClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DatabaseSpec ¶
type DatabaseSpec struct { // Database type stands for supported databases by the PMM API // Now it's pxc or psmdb types but we can extend it Database EngineType `json:"databaseType"` // DatabaseVersion sets from version service and uses the recommended version // by default DatabaseImage string `json:"databaseImage"` // DatabaseConfig contains a config settings for the specified database DatabaseConfig string `json:"databaseConfig"` SecretsName string `json:"secretsName,omitempty"` Pause bool `json:"pause,omitempty"` // ClusterSize is amount of nodes that required for the cluster. // A database starts in cluster mode if clusterSize >= 3. ClusterSize int32 `json:"clusterSize"` // LoadBalancer contains a load balancer settings. For PXC it's haproxy // or proxysql. For PSMDB it's mongos. LoadBalancer LoadBalancerSpec `json:"loadBalancer,omitempty"` Monitoring MonitoringSpec `json:"monitoring,omitempty"` DBInstance DBInstanceSpec `json:"dbInstance"` Backup BackupSpec `json:"backup,omitempty"` }
DatabaseSpec defines the desired state of Database
func (*DatabaseSpec) DeepCopy ¶
func (in *DatabaseSpec) DeepCopy() *DatabaseSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseSpec.
func (*DatabaseSpec) DeepCopyInto ¶
func (in *DatabaseSpec) DeepCopyInto(out *DatabaseSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EngineType ¶
type EngineType string
EngineType stands for the supported database engines. Right now it's only pxc and psmdb. However, it can be ps, pg and any other source
type LoadBalancerSpec ¶
type LoadBalancerSpec struct { Type LoadBalancerType `json:"type,omitempty"` ExposeType corev1.ServiceType `json:"exposeType,omitempty"` Image string `json:"image,omitempty"` Size int32 `json:"size,omitempty"` Configuration string `json:"configuration,omitempty"` LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` TrafficPolicy corev1.ServiceExternalTrafficPolicyType `json:"trafficPolicy,omitempty"` Resources corev1.ResourceRequirements `json:"resources,omitempty"` }
LoadBalancer contains a load balancer settings. For PXC it's haproxy or proxysql. For PSMDB it's mongos.
func (*LoadBalancerSpec) DeepCopy ¶
func (in *LoadBalancerSpec) DeepCopy() *LoadBalancerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerSpec.
func (*LoadBalancerSpec) DeepCopyInto ¶
func (in *LoadBalancerSpec) DeepCopyInto(out *LoadBalancerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LoadBalancerType ¶
type LoadBalancerType string
LoadBalancerType contains supported loadbalancers. It can be proxysql or haproxy for PXC clusters and mongos for PSMDB clusters.
Once PG support will be added, it can be pg-bouncer or something else.
type MonitoringSpec ¶
type MonitoringSpec struct { PMM PMMSpec `json:"pmm,omitempty"` ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` Resources corev1.ResourceRequirements `json:"resources,omitempty"` RuntimeClassName *string `json:"runtimeClassName,omitempty"` ContainerSecurityContext *corev1.SecurityContext `json:"containerSecurityContext,omitempty"` }
func (*MonitoringSpec) DeepCopy ¶
func (in *MonitoringSpec) DeepCopy() *MonitoringSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitoringSpec.
func (*MonitoringSpec) DeepCopyInto ¶
func (in *MonitoringSpec) DeepCopyInto(out *MonitoringSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PMMSpec ¶
type PMMSpec struct { ServerHost string `json:"serverHost,omitempty"` ServerUser string `json:"serverUser,omitempty"` PublicAddress string `json:"publicAddress,omitempty"` Login string `json:"login,omitempty"` Password string `json:"password,omitempty"` }
func (*PMMSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PMMSpec.
func (*PMMSpec) DeepCopyInto ¶
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 *corev1.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 *corev1.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 *corev1.PersistentVolumeClaimSpec `json:"persistentVolumeClaim,omitempty"` }
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.