v1alpha1

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the everest v1alpha1 API group +kubebuilder:object:generate=true +groupName=everest.percona.com

Index

Constants

View Source
const (
	// LoadBalancerMongos represents mongos load balancer.
	LoadBalancerMongos LoadBalancerType = "mongos"
	// LoadBalancerHAProxy represents haproxy load balancer.
	LoadBalancerHAProxy LoadBalancerType = "haproxy"
	// LoadBalancerProxySQL represents proxySQL load balancer.
	LoadBalancerProxySQL LoadBalancerType = "proxysql"
	// LoadBalancerPGBouncer represents PGBouncer load balancer.
	LoadBalancerPGBouncer LoadBalancerType = "pgbouncer"
	// AppStateUnknown is an unknown state.
	AppStateUnknown AppState = "unknown"
	// AppStateInit is a initializing state.
	AppStateInit AppState = "initializing"
	// AppStatePaused is a paused state.
	AppStatePaused AppState = "paused"
	// AppStatePausing is a pausing state.
	AppStatePausing AppState = "pausing"
	// AppStateStopping is a stopping state.
	AppStateStopping AppState = "stopping"
	// AppStateReady is a ready state.
	AppStateReady AppState = "ready"
	// AppStateError is an error state.
	AppStateError AppState = "error"
)
View Source
const (
	// DBEngineStateNotInstalled represents the state of engine when underlying operator is not installed.
	DBEngineStateNotInstalled EngineState = "not installed"
	// DBEngineStateInstalling represents the state of engine when underlying operator is installing.
	DBEngineStateInstalling EngineState = "installing"
	// DBEngineStateInstalled represents the state of engine when underlying operator is installed.
	DBEngineStateInstalled EngineState = "installed"
	// DatabaseEnginePXC represents engine type for PXC clusters.
	DatabaseEnginePXC EngineType = "pxc"
	// DatabaseEnginePSMDB represents engine type for PSMDB clusters.
	DatabaseEnginePSMDB EngineType = "psmdb"
	// DatabaseEnginePostgresql represents engine type for Postgresql clusters.
	DatabaseEnginePostgresql EngineType = "postgresql"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "everest.percona.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 AppState

type AppState string

AppState is used to represent cluster's state.

type BackupSchedule

type BackupSchedule struct {
	Name             string                   `json:"name,omitempty"`
	Enabled          bool                     `json:"enabled,omitempty"`
	Schedule         string                   `json:"schedule,omitempty"`
	Keep             int                      `json:"keep,omitempty"`
	StorageName      string                   `json:"storageName,omitempty"`
	CompressionType  compress.CompressionType `json:"compressionType,omitempty"`
	CompressionLevel *int                     `json:"compressionLevel,omitempty"`
}

BackupSchedule represents set of settings to configure backup schedule.

func (*BackupSchedule) DeepCopy

func (in *BackupSchedule) DeepCopy() *BackupSchedule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupSchedule.

func (*BackupSchedule) DeepCopyInto

func (in *BackupSchedule) DeepCopyInto(out *BackupSchedule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BackupSource

type BackupSource struct {
	Destination           string                     `json:"destination,omitempty"`
	StorageName           string                     `json:"storageName,omitempty"`
	S3                    *BackupStorageProviderSpec `json:"s3,omitempty"`
	Azure                 *BackupStorageProviderSpec `json:"azure,omitempty"`
	StorageType           BackupStorageType          `json:"storage_type"`
	Image                 string                     `json:"image,omitempty"`
	SSLSecretName         string                     `json:"sslSecretName,omitempty"`
	SSLInternalSecretName string                     `json:"sslInternalSecretName,omitempty"`
	VaultSecretName       string                     `json:"vaultSecretName,omitempty"`
}

BackupSource represents settings of a source where to get a backup to run restoration.

func (*BackupSource) DeepCopy

func (in *BackupSource) DeepCopy() *BackupSource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupSource.

func (*BackupSource) DeepCopyInto

func (in *BackupSource) DeepCopyInto(out *BackupSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

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"`
	Schedule                 []BackupSchedule              `json:"schedule,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"`
	Annotations              map[string]string             `json:"annotations,omitempty"`
	Labels                   map[string]string             `json:"labels,omitempty"`
}

BackupSpec contains backup settings.

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 BackupState

type BackupState string

BackupState is used to represent cluster's state.

type BackupStorageProviderSpec

type BackupStorageProviderSpec struct {
	// A container name is a valid DNS name that conforms to the Azure naming rules.
	ContainerName string `json:"containerName,omitempty"`

	Bucket            string `json:"bucket,omitempty"`
	Prefix            string `json:"prefix,omitempty"`
	CredentialsSecret string `json:"credentialsSecret"`
	Region            string `json:"region,omitempty"`
	EndpointURL       string `json:"endpointUrl,omitempty"`

	// STANDARD, NEARLINE, COLDLINE, ARCHIVE for GCP
	// Hot (Frequently accessed or modified data), Cool (Infrequently accessed or modified data), Archive (Rarely accessed or modified data) for Azure.
	StorageClass string `json:"storageClass,omitempty"`
}

BackupStorageProviderSpec represents set of settings to configure cloud provider.

func (*BackupStorageProviderSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupStorageProviderSpec.

func (*BackupStorageProviderSpec) DeepCopyInto

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"`
	StorageProvider          *BackupStorageProviderSpec  `json:"storageProvider,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"`
}

BackupStorageSpec represents set of settings to configure backup storage.

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

BackupStorageType represents backup storage type.

const (
	// BackupStorageFilesystem represents file system storage type.
	BackupStorageFilesystem BackupStorageType = "filesystem"
	// BackupStorageS3 represents s3 storage.
	BackupStorageS3 BackupStorageType = "s3"
	// BackupStorageGCS represents Google Cloud storage.
	BackupStorageGCS BackupStorageType = "gcs"
	// BackupStorageAzure represents azure storage.
	BackupStorageAzure BackupStorageType = "azure"
)

type Component

type Component struct {
	Critical  bool   `json:"critical,omitempty"`
	ImageHash string `json:"imageHash,omitempty"`
	ImagePath string `json:"imagePath,omitempty"`
	Status    string `json:"status,omitempty"`
}

Component contains information of the database engine component. Database Engine component can be database engine, database proxy or tools image path.

func (*Component) DeepCopy

func (in *Component) DeepCopy() *Component

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Component.

func (*Component) DeepCopyInto

func (in *Component) DeepCopyInto(out *Component)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DBInstanceSpec

type DBInstanceSpec struct {
	CPU              resource.Quantity `json:"cpu,omitempty"`
	Memory           resource.Quantity `json:"memory,omitempty"`
	DiskSize         resource.Quantity `json:"diskSize,omitempty"`
	StorageClassName *string           `json:"storageClassName,omitempty"`
}

DBInstanceSpec represents resource requests for database cluster.

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 DatabaseClusterBackup

type DatabaseClusterBackup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   DatabaseClusterBackupSpec   `json:"spec,omitempty"`
	Status DatabaseClusterBackupStatus `json:"status,omitempty"`
}

DatabaseClusterBackup is the Schema for the databaseclusterbackups API.

func (*DatabaseClusterBackup) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseClusterBackup.

func (*DatabaseClusterBackup) DeepCopyInto

func (in *DatabaseClusterBackup) DeepCopyInto(out *DatabaseClusterBackup)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DatabaseClusterBackup) DeepCopyObject

func (in *DatabaseClusterBackup) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DatabaseClusterBackupList

type DatabaseClusterBackupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []DatabaseClusterBackup `json:"items"`
}

DatabaseClusterBackupList contains a list of DatabaseClusterBackup.

func (*DatabaseClusterBackupList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseClusterBackupList.

func (*DatabaseClusterBackupList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DatabaseClusterBackupList) DeepCopyObject

func (in *DatabaseClusterBackupList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DatabaseClusterBackupSpec

type DatabaseClusterBackupSpec struct {
	// Name is the backup name.
	Name string `json:"name"`
	// DBClusterName is the original database cluster name.
	DBClusterName string `json:"dbClusterName"`
	// Destination is the full path to the backup.
	Destination string `json:"destination"`
	// BackupSource is the object with the storage location info.
	BackupSource BackupSource `json:"backupSource"`
}

DatabaseClusterBackupSpec defines the desired state of DatabaseClusterBackup.

func (*DatabaseClusterBackupSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseClusterBackupSpec.

func (*DatabaseClusterBackupSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DatabaseClusterBackupStatus

type DatabaseClusterBackupStatus struct {
	// Completed is the time when the job was completed.
	Completed *metav1.Time `json:"completed"`
	// State is the DatabaseBackup state.
	State BackupState `json:"state"`
}

DatabaseClusterBackupStatus defines the observed state of DatabaseClusterBackup.

func (*DatabaseClusterBackupStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseClusterBackupStatus.

func (*DatabaseClusterBackupStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

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 DatabaseClusterRestore

type DatabaseClusterRestore struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   DatabaseClusterRestoreSpec   `json:"spec,omitempty"`
	Status DatabaseClusterRestoreStatus `json:"status,omitempty"`
}

DatabaseClusterRestore is the Schema for the databaseclusterrestores API.

func (*DatabaseClusterRestore) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseClusterRestore.

func (*DatabaseClusterRestore) DeepCopyInto

func (in *DatabaseClusterRestore) DeepCopyInto(out *DatabaseClusterRestore)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DatabaseClusterRestore) DeepCopyObject

func (in *DatabaseClusterRestore) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DatabaseClusterRestoreList

type DatabaseClusterRestoreList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []DatabaseClusterRestore `json:"items"`
}

DatabaseClusterRestoreList contains a list of DatabaseClusterRestore.

func (*DatabaseClusterRestoreList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseClusterRestoreList.

func (*DatabaseClusterRestoreList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DatabaseClusterRestoreList) DeepCopyObject

func (in *DatabaseClusterRestoreList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DatabaseClusterRestoreSpec

type DatabaseClusterRestoreSpec struct {
	DatabaseCluster string        `json:"databaseCluster"`
	DatabaseType    EngineType    `json:"databaseType"`
	BackupName      string        `json:"backupName,omitempty"`
	BackupSource    *BackupSource `json:"backupSource,omitempty"`
}

DatabaseClusterRestoreSpec defines the desired state of DatabaseClusterRestore.

func (*DatabaseClusterRestoreSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseClusterRestoreSpec.

func (*DatabaseClusterRestoreSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DatabaseClusterRestoreStatus

type DatabaseClusterRestoreStatus struct {
	State         RestoreState       `json:"state,omitempty"`
	CompletedAt   *metav1.Time       `json:"completed,omitempty"`
	LastScheduled *metav1.Time       `json:"lastscheduled,omitempty"`
	Conditions    []metav1.Condition `json:"conditions,omitempty"`
	Message       string             `json:"message,omitempty"`
	Destination   string             `json:"destination,omitempty"`
	StorageName   string             `json:"storageName,omitempty"`
}

DatabaseClusterRestoreStatus defines the observed state of DatabaseClusterRestore.

func (*DatabaseClusterRestoreStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseClusterRestoreStatus.

func (*DatabaseClusterRestoreStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

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"`
	Message string   `json:"message,omitempty"`
}

DatabaseClusterStatus defines the observed state of Database.

func (*DatabaseClusterStatus) DeepCopy

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 DatabaseEngine

type DatabaseEngine struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   DatabaseEngineSpec   `json:"spec,omitempty"`
	Status DatabaseEngineStatus `json:"status,omitempty"`
}

DatabaseEngine is the Schema for the databaseengines API.

func (*DatabaseEngine) DeepCopy

func (in *DatabaseEngine) DeepCopy() *DatabaseEngine

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseEngine.

func (*DatabaseEngine) DeepCopyInto

func (in *DatabaseEngine) DeepCopyInto(out *DatabaseEngine)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DatabaseEngine) DeepCopyObject

func (in *DatabaseEngine) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (DatabaseEngine) RecommendedBackupImage

func (d DatabaseEngine) RecommendedBackupImage() string

RecommendedBackupImage returns the recommended image for a backup component.

type DatabaseEngineList

type DatabaseEngineList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []DatabaseEngine `json:"items"`
}

DatabaseEngineList contains a list of DatabaseEngine.

func (*DatabaseEngineList) DeepCopy

func (in *DatabaseEngineList) DeepCopy() *DatabaseEngineList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseEngineList.

func (*DatabaseEngineList) DeepCopyInto

func (in *DatabaseEngineList) DeepCopyInto(out *DatabaseEngineList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DatabaseEngineList) DeepCopyObject

func (in *DatabaseEngineList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DatabaseEngineSpec

type DatabaseEngineSpec struct {
	Type            EngineType `json:"type"`
	AllowedVersions []string   `json:"allowedVersions,omitempty"`
}

DatabaseEngineSpec is a spec for a database engine.

func (*DatabaseEngineSpec) DeepCopy

func (in *DatabaseEngineSpec) DeepCopy() *DatabaseEngineSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseEngineSpec.

func (*DatabaseEngineSpec) DeepCopyInto

func (in *DatabaseEngineSpec) DeepCopyInto(out *DatabaseEngineSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DatabaseEngineStatus

type DatabaseEngineStatus struct {
	State             EngineState `json:"status,omitempty"`
	OperatorVersion   string      `json:"operatorVersion,omitempty"`
	AvailableVersions Versions    `json:"availableVersions,omitempty"`
}

DatabaseEngineStatus defines the observed state of DatabaseEngine.

func (*DatabaseEngineStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseEngineStatus.

func (*DatabaseEngineStatus) DeepCopyInto

func (in *DatabaseEngineStatus) DeepCopyInto(out *DatabaseEngineStatus)

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 contains name of a secrets file for a database cluster.
	SecretsName string `json:"secretsName,omitempty"`
	// Pause represents is a cluster paused or not.
	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 contains a monitoring settings.
	Monitoring MonitoringSpec `json:"monitoring,omitempty"`
	// DBInstance represents resource requests for a database cluster.
	DBInstance DBInstanceSpec `json:"dbInstance"`
	// Backup contains backup settings.
	Backup *BackupSpec `json:"backup,omitempty"`
	// DataSource defines a data source for a new cluster
	DataSource *BackupSource `json:"dataSource,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 EngineState

type EngineState string

EngineState represents state of engine in a k8s cluster.

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"`
}

LoadBalancerSpec 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, mongos for PSMDB clusters or pgbouncer for Postgresql clusters.

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"`
}

MonitoringSpec contains monitoring settings.

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 {
	Image         string `json:"image,omitempty"`
	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"`
}

PMMSpec contains PMM settings.

func (*PMMSpec) DeepCopy

func (in *PMMSpec) DeepCopy() *PMMSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PMMSpec.

func (*PMMSpec) DeepCopyInto

func (in *PMMSpec) DeepCopyInto(out *PMMSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RestoreState

type RestoreState string

RestoreState represents state of restoration.

type Versions

type Versions struct {
	Engine map[string]*Component            `json:"engine,omitempty"`
	Backup map[string]*Component            `json:"backup,omitempty"`
	Proxy  map[string]map[string]*Component `json:"proxy,omitempty"`
	Tools  map[string]map[string]*Component `json:"tools,omitempty"`
}

Versions struct represents available versions of database engine components.

func (*Versions) DeepCopy

func (in *Versions) DeepCopy() *Versions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Versions.

func (*Versions) DeepCopyInto

func (in *Versions) DeepCopyInto(out *Versions)

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"`
}

VolumeSpec represents a specification to configure volume for underlying database.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL