v1

package
v0.0.18 Latest Latest
Warning

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

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

Documentation

Overview

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

Index

Constants

View Source
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

View Source
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 AppState

type AppState string

type BackupSchedule added in v0.0.18

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  pbm.CompressionType `json:"compressionType,omitempty"`
	CompressionLevel *int                `json:"compressionLevel,omitempty"`
}

func (*BackupSchedule) DeepCopy added in v0.0.18

func (in *BackupSchedule) DeepCopy() *BackupSchedule

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

func (*BackupSchedule) DeepCopyInto added in v0.0.18

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

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

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 BackupStorageProviderSpec added in v0.0.18

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

func (*BackupStorageProviderSpec) DeepCopy added in v0.0.18

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

func (*BackupStorageProviderSpec) DeepCopyInto added in v0.0.18

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

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              resource.Quantity `json:"cpu,omitempty"`
	Memory           resource.Quantity `json:"memory,omitempty"`
	DiskSize         resource.Quantity `json:"diskSize,omitempty"`
	StorageClassName *string           `json:"storageClassName,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"`
	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 added in v0.0.18

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

func (in *DatabaseEngine) DeepCopy() *DatabaseEngine

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

func (*DatabaseEngine) DeepCopyInto added in v0.0.18

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

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

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

type DatabaseEngineList added in v0.0.18

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

func (in *DatabaseEngineList) DeepCopy() *DatabaseEngineList

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

func (*DatabaseEngineList) DeepCopyInto added in v0.0.18

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

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

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

type DatabaseEngineSpec added in v0.0.18

type DatabaseEngineSpec struct {
	Type EngineType `json:"type"`
}

func (*DatabaseEngineSpec) DeepCopy added in v0.0.18

func (in *DatabaseEngineSpec) DeepCopy() *DatabaseEngineSpec

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

func (*DatabaseEngineSpec) DeepCopyInto added in v0.0.18

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

type DatabaseEngineStatus struct {
	State   EngineState `json:"status,omitempty"`
	Version string      `json:"version,omitempty"`
}

DatabaseEngineStatus defines the observed state of DatabaseEngine

func (*DatabaseEngineStatus) DeepCopy added in v0.0.18

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

func (*DatabaseEngineStatus) DeepCopyInto added in v0.0.18

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    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 EngineState added in v0.0.18

type EngineState string
const (
	DBEngineStateNotInstalled EngineState = "not installed"
	DBEngineStateInstalling   EngineState = "installing"
	DBEngineStateInstalled    EngineState = "installed"
)

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

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

Jump to

Keyboard shortcuts

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