v1alpha1

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 14 Imported by: 15

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 (
	// 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"
	// AppStateRestoring is a restoring state.
	AppStateRestoring AppState = "restoring"

	// ExposeTypeInternal is an internal expose type.
	ExposeTypeInternal ExposeType = "internal"
	// ExposeTypeExternal is an external expose type.
	ExposeTypeExternal ExposeType = "external"

	// ProxyTypeMongos is a mongos proxy type.
	ProxyTypeMongos ProxyType = "mongos"
	// ProxyTypeHAProxy is a HAProxy proxy type.
	ProxyTypeHAProxy ProxyType = "haproxy"
	// ProxyTypeProxySQL is a ProxySQL proxy type.
	ProxyTypeProxySQL ProxyType = "proxysql"
	// ProxyTypePGBouncer is a PGBouncer proxy type.
	ProxyTypePGBouncer ProxyType = "pgbouncer"
)
View Source
const (
	DateFormat      = "2006-01-02T15:04:05Z"
	DateFormatSpace = "2006-01-02 15:04:05"
)

DateFormat is the date format used in the user input.

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"

	// DBEngineComponentRecommended represents recommended component status.
	DBEngineComponentRecommended ComponentStatus = "recommended"
	// DBEngineComponentAvailable represents available component status.
	DBEngineComponentAvailable ComponentStatus = "available"
	// DBEngineComponentUnavailable represents unavailable component status.
	DBEngineComponentUnavailable ComponentStatus = "unavailable"
	// DBEngineComponentUnsupported represents unsupported component status.
	DBEngineComponentUnsupported ComponentStatus = "unsupported"
)
View Source
const (
	// PMMMonitoringType represents monitoring via PMM.
	PMMMonitoringType MonitoringType = "pmm"
	// MonitoringConfigCredentialsSecretUsernameKey is the credentials secret's key that contains the username.
	MonitoringConfigCredentialsSecretUsernameKey = "username"
	// MonitoringConfigCredentialsSecretAPIKeyKey is the credentials secret's key that contains the API key.
	MonitoringConfigCredentialsSecretAPIKeyKey = "apiKey"
)

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 Backup added in v0.0.3

type Backup struct {
	// Enabled is a flag to enable backups
	Enabled bool `json:"enabled"`
	// Schedules is a list of backup schedules
	Schedules []BackupSchedule `json:"schedules,omitempty"`
	// PITR is the configuration of the point in time recovery
	PITR PITRSpec `json:"pitr,omitempty"`
}

Backup is the backup configuration.

func (*Backup) DeepCopy added in v0.0.3

func (in *Backup) DeepCopy() *Backup

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

func (*Backup) DeepCopyInto added in v0.0.3

func (in *Backup) DeepCopyInto(out *Backup)

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

type BackupSchedule

type BackupSchedule struct {
	// Enabled is a flag to enable the schedule
	Enabled bool `json:"enabled"`
	// Name is the name of the schedule
	Name string `json:"name"`
	// RetentionCopies is the number of backup copies to retain
	RetentionCopies int32 `json:"retentionCopies,omitempty"`
	// Schedule is the cron schedule
	Schedule string `json:"schedule"`
	// BackupStorageName is the name of the BackupStorage CR that defines the
	// storage location
	BackupStorageName string `json:"backupStorageName"`
}

BackupSchedule is the backup schedule configuration.

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 {
	// Path is the path to the backup file/directory.
	Path string `json:"path"`
	// BackupStorageName is the name of the BackupStorage used for backups.
	BackupStorageName string `json:"backupStorageName"`
}

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 BackupState

type BackupState string

BackupState is used to represent the backup's state.

type BackupStorage added in v0.0.8

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

	Spec   BackupStorageSpec   `json:"spec,omitempty"`
	Status BackupStorageStatus `json:"status,omitempty"`
}

BackupStorage is the Schema for the backupstorages API.

func (*BackupStorage) DeepCopy added in v0.0.8

func (in *BackupStorage) DeepCopy() *BackupStorage

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

func (*BackupStorage) DeepCopyInto added in v0.0.8

func (in *BackupStorage) DeepCopyInto(out *BackupStorage)

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

func (*BackupStorage) DeepCopyObject added in v0.0.8

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

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

func (*BackupStorage) DeleteUsedNamespace added in v0.6.0

func (b *BackupStorage) DeleteUsedNamespace(namespace string) bool

DeleteUsedNamespace deletes the namespace from the usedNamespaces list.

func (*BackupStorage) IsNamespaceAllowed added in v0.6.0

func (b *BackupStorage) IsNamespaceAllowed(namespace string) bool

IsNamespaceAllowed checks the namespace against allowedNamespaces and returns if it's allowed to use.

func (*BackupStorage) UpdateNamespacesList added in v0.6.0

func (b *BackupStorage) UpdateNamespacesList(namespace string) bool

UpdateNamespacesList updates the list of namespaces that use the backupStorage.

type BackupStorageList added in v0.0.8

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

BackupStorageList contains a list of BackupStorage.

func (*BackupStorageList) DeepCopy added in v0.0.8

func (in *BackupStorageList) DeepCopy() *BackupStorageList

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

func (*BackupStorageList) DeepCopyInto added in v0.0.8

func (in *BackupStorageList) DeepCopyInto(out *BackupStorageList)

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

func (*BackupStorageList) DeepCopyObject added in v0.0.8

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

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

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 is a type of backup storage.
	// +kubebuilder:validation:Enum=s3;azure
	Type BackupStorageType `json:"type"`
	// Bucket is a name of bucket.
	Bucket string `json:"bucket"`
	// Region is a region where the bucket is located.
	Region string `json:"region,omitempty"`
	// EndpointURL is an endpoint URL of backup storage.
	EndpointURL string `json:"endpointURL,omitempty"`
	// VerifyTLS is set to ensure TLS/SSL verification.
	// If unspecified, the default value is true.
	//
	// +kubebuilder:default:=true
	VerifyTLS *bool `json:"verifyTLS,omitempty"`

	// Description stores description of a backup storage.
	Description string `json:"description,omitempty"`
	// CredentialsSecretName is the name of the secret with credentials.
	CredentialsSecretName string `json:"credentialsSecretName"`
	// AllowedNamespaces is the list of namespaces where the operator will copy secrets provided in the CredentialsSecretsName.
	AllowedNamespaces []string `json:"allowedNamespaces,omitempty"`
}

BackupStorageSpec defines the desired state of BackupStorage.

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 BackupStorageStatus added in v0.0.8

type BackupStorageStatus struct {
	UsedNamespaces map[string]bool `json:"usedNamespaces"`
}

BackupStorageStatus defines the observed state of BackupStorage.

func (*BackupStorageStatus) DeepCopy added in v0.0.8

func (in *BackupStorageStatus) DeepCopy() *BackupStorageStatus

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

func (*BackupStorageStatus) DeepCopyInto added in v0.0.8

func (in *BackupStorageStatus) DeepCopyInto(out *BackupStorageStatus)

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

type BackupStorageType

type BackupStorageType string

BackupStorageType is a type of backup storage.

const (
	// BackupStorageTypeS3 is a type of S3 object storage.
	BackupStorageTypeS3 BackupStorageType = "s3"
	// BackupStorageTypeAzure is a type of azure blob storage.
	BackupStorageTypeAzure BackupStorageType = "azure"
)

type Component

type Component struct {
	Critical  bool            `json:"critical,omitempty"`
	ImageHash string          `json:"imageHash,omitempty"`
	ImagePath string          `json:"imagePath,omitempty"`
	Status    ComponentStatus `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 ComponentStatus added in v0.0.3

type ComponentStatus string

ComponentStatus represents status of the database engine component.

type ComponentsMap added in v0.0.3

type ComponentsMap map[string]*Component

ComponentsMap is a map of database engine components.

func (ComponentsMap) BestVersion added in v0.0.3

func (c ComponentsMap) BestVersion() string

BestVersion returns the best version for the components map. In case no versions are found, it returns an empty string.

func (ComponentsMap) DeepCopy added in v0.0.3

func (in ComponentsMap) DeepCopy() ComponentsMap

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

func (ComponentsMap) DeepCopyInto added in v0.0.3

func (in ComponentsMap) DeepCopyInto(out *ComponentsMap)

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

func (ComponentsMap) FilterStatus added in v0.0.3

func (c ComponentsMap) FilterStatus(statuses ...ComponentStatus) ComponentsMap

FilterStatus returns a new ComponentsMap with components filtered by status.

func (ComponentsMap) GetAllowedVersionsSorted added in v0.0.3

func (c ComponentsMap) GetAllowedVersionsSorted() []string

GetAllowedVersionsSorted returns a sorted slice of allowed versions. An allowed version is a version whose status is either recommended or available. Allowed versions are sorted by status, with recommended versions first, followed by available versions. Versions with the same status are sorted by version in descending order. Most recent version is first.

func (ComponentsMap) GetSortedVersions added in v0.0.3

func (c ComponentsMap) GetSortedVersions() []string

GetSortedVersions returns a sorted slice of versions. Versions are sorted in descending order. Most recent version is first.

type DataSource added in v0.0.3

type DataSource struct {
	// DBClusterBackupName is the name of the DB cluster backup to restore from
	DBClusterBackupName string `json:"dbClusterBackupName,omitempty"`
	// BackupSource is the backup source to restore from
	BackupSource *BackupSource `json:"backupSource,omitempty"`
	// PITR is the point-in-time recovery configuration
	PITR *PITR `json:"pitr,omitempty"`
}

DataSource is the data source configuration.

func (*DataSource) DeepCopy added in v0.0.3

func (in *DataSource) DeepCopy() *DataSource

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

func (*DataSource) DeepCopyInto added in v0.0.3

func (in *DataSource) DeepCopyInto(out *DataSource)

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   DatabaseClusterSpec   `json:"spec,omitempty"`
	Status DatabaseClusterStatus `json:"status,omitempty"`
}

DatabaseCluster is the Schema for the databaseclusters 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 {
	// DBClusterName is the original database cluster name.
	DBClusterName string `json:"dbClusterName"`
	// BackupStorageName is the name of the BackupStorage used for backups.
	BackupStorageName string `json:"backupStorageName"`
}

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 {
	// Created is the timestamp of the upstream backup's creation.
	CreatedAt *metav1.Time `json:"created,omitempty"`
	// Completed is the time when the job was completed.
	CompletedAt *metav1.Time `json:"completed,omitempty"`
	// State is the DatabaseBackup state.
	State BackupState `json:"state,omitempty"`
	// Destination is the full path to the backup.
	Destination *string `json:"destination,omitempty"`
	// Gaps identifies if there are gaps detected in the PITR logs
	Gaps bool `json:"gaps"`
}

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 DatabaseCluster.

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.

func (*DatabaseClusterRestore) IsComplete added in v0.6.0

func (r *DatabaseClusterRestore) IsComplete(engineType EngineType) bool

IsComplete indicates if the restoration process is complete (regardless successful or not).

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 {
	// DBClusterName defines the cluster name to restore.
	DBClusterName string `json:"dbClusterName"`
	// DataSource defines a data source for restoration.
	DataSource DataSource `json:"dataSource"`
}

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"`
	Message     string       `json:"message,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 DatabaseClusterSpec added in v0.0.3

type DatabaseClusterSpec struct {
	// Paused is a flag to stop the cluster
	Paused bool `json:"paused,omitempty"`
	// AllowUnsafeConfiguration field used to ensure that the user can create configurations unfit for production use.
	AllowUnsafeConfiguration bool `json:"allowUnsafeConfiguration,omitempty"`
	// Engine is the database engine specification
	Engine Engine `json:"engine"`
	// Proxy is the proxy specification. If not set, an appropriate
	// proxy specification will be applied for the given engine. A
	// common use case for setting this field is to control the
	// external access to the database cluster.
	Proxy Proxy `json:"proxy,omitempty"`
	// DataSource defines a data source for bootstraping a new cluster
	DataSource *DataSource `json:"dataSource,omitempty"`
	// Backup is the backup specification
	Backup Backup `json:"backup,omitempty"`
	// Monitoring is the monitoring configuration
	Monitoring *Monitoring `json:"monitoring,omitempty"`
}

DatabaseClusterSpec defines the desired state of DatabaseCluster.

func (*DatabaseClusterSpec) DeepCopy added in v0.0.3

func (in *DatabaseClusterSpec) DeepCopy() *DatabaseClusterSpec

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

func (*DatabaseClusterSpec) DeepCopyInto added in v0.0.3

func (in *DatabaseClusterSpec) DeepCopyInto(out *DatabaseClusterSpec)

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

type DatabaseClusterStatus

type DatabaseClusterStatus struct {
	// Status is the status of the cluster
	Status AppState `json:"status,omitempty"`
	// Hostname is the hostname where the cluster can be reached
	Hostname string `json:"hostname,omitempty"`
	// Port is the port where the cluster can be reached
	Port int32 `json:"port,omitempty"`
	// Ready is the number of ready pods
	Ready int32 `json:"ready,omitempty"`
	// Size is the total number of pods
	Size int32 `json:"size,omitempty"`
	// Message is extra information about the cluster
	Message string `json:"message,omitempty"`
	// ActiveStorage is the storage used in cluster (psmdb only)
	ActiveStorage string `json:"activeStorage,omitempty"`
}

DatabaseClusterStatus defines the observed state of DatabaseCluster.

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) BestBackupVersion added in v0.0.3

func (d DatabaseEngine) BestBackupVersion(engineVersion string) string

BestBackupVersion returns the best backup version for a given engine version.

func (DatabaseEngine) BestEngineVersion added in v0.0.3

func (d DatabaseEngine) BestEngineVersion() string

BestEngineVersion returns the best engine version for the database engine.

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.

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 Engine added in v0.0.3

type Engine struct {
	// Type is the engine type
	// +kubebuilder:validation:Enum:=pxc;postgresql;psmdb
	Type EngineType `json:"type"`
	// Version is the engine version
	Version string `json:"version,omitempty"`
	// Replicas is the number of engine replicas
	// +kubebuilder:validation:Minimum:=1
	Replicas int32 `json:"replicas,omitempty"`
	// Storage is the engine storage configuration
	Storage Storage `json:"storage"`
	// Resources are the resource limits for each engine replica.
	// If not set, resource limits are not imposed
	Resources Resources `json:"resources,omitempty"`
	// Config is the engine configuration
	Config string `json:"config,omitempty"`
	// UserSecretsName is the name of the secret containing the user secrets
	UserSecretsName string `json:"userSecretsName,omitempty"`
}

Engine is the engine configuration.

func (*Engine) DeepCopy added in v0.0.3

func (in *Engine) DeepCopy() *Engine

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

func (*Engine) DeepCopyInto added in v0.0.3

func (in *Engine) DeepCopyInto(out *Engine)

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 Expose added in v0.0.3

type Expose struct {
	// Type is the expose type, can be internal or external
	// +kubebuilder:validation:Enum:=internal;external
	// +kubebuilder:default:=internal
	Type ExposeType `json:"type,omitempty"`
	// IPSourceRanges is the list of IP source ranges (CIDR notation)
	// to allow access from. If not set, there is no limitations
	IPSourceRanges []IPSourceRange `json:"ipSourceRanges,omitempty"`
}

Expose is the expose configuration.

func (*Expose) DeepCopy added in v0.0.3

func (in *Expose) DeepCopy() *Expose

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

func (*Expose) DeepCopyInto added in v0.0.3

func (in *Expose) DeepCopyInto(out *Expose)

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

func (Expose) IPSourceRangesStringArray added in v0.0.21

func (e Expose) IPSourceRangesStringArray() []string

IPSourceRangesStringArray returns []string of IPSource ranges. It also calls toCIDR function to convert IP addresses to the correct CIDR notation.

type ExposeType added in v0.0.3

type ExposeType string

ExposeType is the expose type.

type IPSourceRange added in v0.0.21

type IPSourceRange string

IPSourceRange represents IP addresses in CIDR notation or without a netmask.

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 Monitoring added in v0.0.3

type Monitoring struct {
	// MonitoringConfigName is the name of a monitoringConfig CR.
	MonitoringConfigName string `json:"monitoringConfigName,omitempty"`
	// Resources defines resource limitations for the monitoring.
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
}

Monitoring is the monitoring configuration.

func (*Monitoring) DeepCopy added in v0.0.3

func (in *Monitoring) DeepCopy() *Monitoring

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

func (*Monitoring) DeepCopyInto added in v0.0.3

func (in *Monitoring) DeepCopyInto(out *Monitoring)

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

type MonitoringConfig added in v0.0.8

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

	Spec   MonitoringConfigSpec   `json:"spec,omitempty"`
	Status MonitoringConfigStatus `json:"status,omitempty"`
}

MonitoringConfig is the Schema for the monitoringconfigs API.

func (*MonitoringConfig) DeepCopy added in v0.0.8

func (in *MonitoringConfig) DeepCopy() *MonitoringConfig

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

func (*MonitoringConfig) DeepCopyInto added in v0.0.8

func (in *MonitoringConfig) DeepCopyInto(out *MonitoringConfig)

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

func (*MonitoringConfig) DeepCopyObject added in v0.0.8

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

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

func (*MonitoringConfig) IsNamespaceAllowed added in v0.6.0

func (m *MonitoringConfig) IsNamespaceAllowed(namespace string) bool

IsNamespaceAllowed checks the namespace against allowedNamespaces and returns if it's allowed to use.

type MonitoringConfigList added in v0.0.8

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

MonitoringConfigList contains a list of MonitoringConfig.

func (*MonitoringConfigList) DeepCopy added in v0.0.8

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

func (*MonitoringConfigList) DeepCopyInto added in v0.0.8

func (in *MonitoringConfigList) DeepCopyInto(out *MonitoringConfigList)

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

func (*MonitoringConfigList) DeepCopyObject added in v0.0.8

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

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

type MonitoringConfigSpec added in v0.0.8

type MonitoringConfigSpec struct {
	// Type is type of monitoring.
	// +kubebuilder:validation:Enum=pmm
	Type MonitoringType `json:"type"`
	// CredentialsSecretName is the name of the secret with credentials.
	CredentialsSecretName string `json:"credentialsSecretName"`
	// AllowedNamespaces is the list of namespaces where the operator will copy secrets provided in the CredentialsSecretsName.
	AllowedNamespaces []string `json:"allowedNamespaces,omitempty"`
	// PMM is configuration for the PMM monitoring type.
	PMM PMMConfig `json:"pmm,omitempty"`
}

MonitoringConfigSpec defines the desired state of MonitoringConfig.

func (*MonitoringConfigSpec) DeepCopy added in v0.0.8

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

func (*MonitoringConfigSpec) DeepCopyInto added in v0.0.8

func (in *MonitoringConfigSpec) DeepCopyInto(out *MonitoringConfigSpec)

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

type MonitoringConfigStatus added in v0.0.8

type MonitoringConfigStatus struct{}

MonitoringConfigStatus defines the observed state of MonitoringConfig.

func (*MonitoringConfigStatus) DeepCopy added in v0.0.8

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

func (*MonitoringConfigStatus) DeepCopyInto added in v0.0.8

func (in *MonitoringConfigStatus) DeepCopyInto(out *MonitoringConfigStatus)

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

type MonitoringType added in v0.0.8

type MonitoringType string

MonitoringType is a type of monitoring.

type PITR added in v0.6.0

type PITR struct {
	// Type is the type of recovery.
	// +kubebuilder:validation:Enum:=date;latest
	// +kubebuilder:default:=date
	Type PITRType `json:"type,omitempty"`
	// Date is the UTC date to recover to. The accepted format: "2006-01-02T15:04:05Z".
	Date *RestoreDate `json:"date,omitempty"`
}

PITR represents a specification to configure point in time recovery for a database backup/restore.

func (*PITR) DeepCopy added in v0.6.0

func (in *PITR) DeepCopy() *PITR

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

func (*PITR) DeepCopyInto added in v0.6.0

func (in *PITR) DeepCopyInto(out *PITR)

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

type PITRSpec added in v0.6.0

type PITRSpec struct {
	// Enabled is a flag to enable PITR
	Enabled bool `json:"enabled"`
	// BackupStorageName is the name of the BackupStorage where the PITR is enabled
	BackupStorageName *string `json:"backupStorageName,omitempty"`
	// UploadIntervalSec number of seconds between the binlogs uploads
	UploadIntervalSec *int `json:"uploadIntervalSec,omitempty"`
}

PITRSpec represents a specification to configure point in time recovery for a database backup/restore.

func (*PITRSpec) DeepCopy added in v0.6.0

func (in *PITRSpec) DeepCopy() *PITRSpec

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

func (*PITRSpec) DeepCopyInto added in v0.6.0

func (in *PITRSpec) DeepCopyInto(out *PITRSpec)

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

type PITRType added in v0.6.0

type PITRType string

PITRType represents type of Point-in-time recovery.

const (
	// PITRTypeDate is Point-in-time recovery type based on the specific date.
	PITRTypeDate PITRType = "date"
	// PITRTypeLatest is Point-in-time recovery type based on the latest date.
	PITRTypeLatest PITRType = "latest"
)

type PMMConfig added in v0.0.8

type PMMConfig struct {
	// URL is url to the monitoring instance.
	URL string `json:"url"`
	// Image is a Docker image name to use for deploying PMM client. Defaults to using the latest version.
	Image string `json:"image"`
}

PMMConfig is configuration of the PMM monitoring type.

func (*PMMConfig) DeepCopy added in v0.0.8

func (in *PMMConfig) DeepCopy() *PMMConfig

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

func (*PMMConfig) DeepCopyInto added in v0.0.8

func (in *PMMConfig) DeepCopyInto(out *PMMConfig)

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

type Proxy added in v0.0.3

type Proxy struct {
	// Type is the proxy type
	// +kubebuilder:validation:Enum:=mongos;haproxy;proxysql;pgbouncer
	Type ProxyType `json:"type,omitempty"`
	// Replicas is the number of proxy replicas
	// +kubebuilder:validation:Minimum:=1
	Replicas *int32 `json:"replicas,omitempty"`
	// Config is the proxy configuration
	Config string `json:"config,omitempty"`
	// Expose is the proxy expose configuration
	Expose Expose `json:"expose,omitempty"`
	// Resources are the resource limits for each proxy replica.
	// If not set, resource limits are not imposed
	Resources Resources `json:"resources,omitempty"`
}

Proxy is the proxy configuration.

func (*Proxy) DeepCopy added in v0.0.3

func (in *Proxy) DeepCopy() *Proxy

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

func (*Proxy) DeepCopyInto added in v0.0.3

func (in *Proxy) DeepCopyInto(out *Proxy)

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

type ProxyType added in v0.0.3

type ProxyType string

ProxyType is the proxy type.

type Resources added in v0.0.3

type Resources struct {
	// CPU is the CPU resource requirements
	CPU resource.Quantity `json:"cpu,omitempty"`
	// Memory is the memory resource requirements
	Memory resource.Quantity `json:"memory,omitempty"`
}

Resources are the resource requirements.

func (*Resources) DeepCopy added in v0.0.3

func (in *Resources) DeepCopy() *Resources

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

func (*Resources) DeepCopyInto added in v0.0.3

func (in *Resources) DeepCopyInto(out *Resources)

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

type RestoreDate added in v0.6.0

type RestoreDate struct {
	metav1.Time `json:",inline"`
}

RestoreDate is a data type for better time.Time support, the same approach as used in psmdb. +kubebuilder:validation:Type=string

func (*RestoreDate) DeepCopy added in v0.6.0

func (in *RestoreDate) DeepCopy() *RestoreDate

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

func (*RestoreDate) DeepCopyInto added in v0.6.0

func (in *RestoreDate) DeepCopyInto(out *RestoreDate)

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

func (RestoreDate) MarshalJSON added in v0.6.0

func (t RestoreDate) MarshalJSON() ([]byte, error)

MarshalJSON marshals JSON.

func (RestoreDate) OpenAPISchemaFormat added in v0.6.0

func (RestoreDate) OpenAPISchemaFormat() string

OpenAPISchemaFormat returns a format for OperAPI specification.

func (RestoreDate) OpenAPISchemaType added in v0.6.0

func (RestoreDate) OpenAPISchemaType() []string

OpenAPISchemaType returns a schema type for OperAPI specification.

func (*RestoreDate) UnmarshalJSON added in v0.6.0

func (t *RestoreDate) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals JSON.

type RestoreState

type RestoreState string

RestoreState represents state of restoration.

type Storage added in v0.0.3

type Storage struct {
	// Size is the size of the persistent volume claim
	Size resource.Quantity `json:"size"`
	// Class is the storage class to use for the persistent volume claim
	Class *string `json:"class,omitempty"`
}

Storage is the storage configuration.

func (*Storage) DeepCopy added in v0.0.3

func (in *Storage) DeepCopy() *Storage

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

func (*Storage) DeepCopyInto added in v0.0.3

func (in *Storage) DeepCopyInto(out *Storage)

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

type Versions

type Versions struct {
	Engine ComponentsMap               `json:"engine,omitempty"`
	Backup ComponentsMap               `json:"backup,omitempty"`
	Proxy  map[ProxyType]ComponentsMap `json:"proxy,omitempty"`
	Tools  map[string]ComponentsMap    `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.

Jump to

Keyboard shortcuts

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