v1alpha1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the pxc v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=pxc.percona.com

Package v1alpha1 contains API Schema definitions for the pxc v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=pxc.percona.com

Index

Constants

View Source
const (
	BackupStarting  PXCBackupState = "Starting"
	BackupRunning                  = "Running"
	BackupFailed                   = "Failed"
	BackupSucceeded                = "Succeeded"
)
View Source
const (
	PlatformUndef      Platform = ""
	PlatformKubernetes          = "kubernetes"
	PlatformOpenshift           = "openshift"
)

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "pxc.percona.com", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
)
View Source
var ErrClusterNameOverflow = fmt.Errorf("cluster (pxc) name too long, must be no more than %d characters", clusterNameMaxLen)

ErrClusterNameOverflow upspring when the cluster name is longer than acceptable

Functions

This section is empty.

Types

type App

type App interface {
	AppContainer(spec *PodSpec, secrets string) corev1.Container
	PMMContainer(spec *PMMSpec, secrets string) corev1.Container
	PVCs(spec *VolumeSpec) []corev1.PersistentVolumeClaim
	Resources(spec *PodResources) (corev1.ResourceRequirements, error)
	Lables() map[string]string
}

type ClusterState

type ClusterState string
const (
	ClusterStateInit    ClusterState = ""
	ClusterStateRunning              = "running"
)

type PMMSpec

type PMMSpec struct {
	Enabled    bool   `json:"enabled,omitempty"`
	ServerHost string `json:"serverHost,omitempty"`
	Image      string `json:"image,omitempty"`
	ServerUser string `json:"serverUser,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 PXCBackupSpec added in v0.2.0

type PXCBackupSpec struct {
	PXCCluster string     `json:"pxcCluster"`
	Volume     VolumeSpec `json:"volume,omitempty"`
}

func (*PXCBackupSpec) DeepCopy added in v0.2.0

func (in *PXCBackupSpec) DeepCopy() *PXCBackupSpec

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

func (*PXCBackupSpec) DeepCopyInto added in v0.2.0

func (in *PXCBackupSpec) DeepCopyInto(out *PXCBackupSpec)

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

type PXCBackupState added in v0.2.0

type PXCBackupState string

type PXCBackupStatus added in v0.2.0

type PXCBackupStatus struct {
	State         PXCBackupState `json:"state,omitempty"`
	CompletedAt   *metav1.Time   `json:"completed,omitempty"`
	LastScheduled *metav1.Time   `json:"lastscheduled,omitempty"`
	Volume        string         `json:"volume,omitempty"`
}

func (*PXCBackupStatus) DeepCopy added in v0.2.0

func (in *PXCBackupStatus) DeepCopy() *PXCBackupStatus

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

func (*PXCBackupStatus) DeepCopyInto added in v0.2.0

func (in *PXCBackupStatus) DeepCopyInto(out *PXCBackupStatus)

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

type PXCScheduledBackup added in v0.2.0

type PXCScheduledBackup struct {
	Image            string                        `json:"image,omitempty"`
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	Schedule         []PXCScheduledBackupSchedule  `json:"schedule,omitempty"`
}

func (*PXCScheduledBackup) DeepCopy added in v0.2.0

func (in *PXCScheduledBackup) DeepCopy() *PXCScheduledBackup

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

func (*PXCScheduledBackup) DeepCopyInto added in v0.2.0

func (in *PXCScheduledBackup) DeepCopyInto(out *PXCScheduledBackup)

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

type PXCScheduledBackupSchedule added in v0.2.0

type PXCScheduledBackupSchedule struct {
	Name     string      `json:"name,omitempty"`
	Schedule string      `json:"schedule,omitempty"`
	Keep     int         `json:"keep,omitempty"`
	Volume   *VolumeSpec `json:"volume,omitempty"`
}

func (*PXCScheduledBackupSchedule) DeepCopy added in v0.2.0

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

func (*PXCScheduledBackupSchedule) DeepCopyInto added in v0.2.0

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

type PerconaXtraDBBackup added in v0.2.0

type PerconaXtraDBBackup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              PXCBackupSpec   `json:"spec"`
	Status            PXCBackupStatus `json:"status,omitempty"`
}

func (*PerconaXtraDBBackup) CheckNSetDefaults added in v0.2.0

func (cr *PerconaXtraDBBackup) CheckNSetDefaults() error

CheckNSetDefaults sets defaults options and overwrites wrong settings and checks if other options' values are allowable

func (*PerconaXtraDBBackup) DeepCopy added in v0.2.0

func (in *PerconaXtraDBBackup) DeepCopy() *PerconaXtraDBBackup

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

func (*PerconaXtraDBBackup) DeepCopyInto added in v0.2.0

func (in *PerconaXtraDBBackup) DeepCopyInto(out *PerconaXtraDBBackup)

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

func (*PerconaXtraDBBackup) DeepCopyObject added in v0.2.0

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

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

func (*PerconaXtraDBBackup) OwnerRef added in v0.2.0

func (cr *PerconaXtraDBBackup) OwnerRef(scheme *runtime.Scheme) (metav1.OwnerReference, error)

OwnerRef returns OwnerReference to object

type PerconaXtraDBBackupList added in v0.2.0

type PerconaXtraDBBackupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []PerconaXtraDBBackup `json:"items"`
}

func (*PerconaXtraDBBackupList) DeepCopy added in v0.2.0

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

func (*PerconaXtraDBBackupList) DeepCopyInto added in v0.2.0

func (in *PerconaXtraDBBackupList) DeepCopyInto(out *PerconaXtraDBBackupList)

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

func (*PerconaXtraDBBackupList) DeepCopyObject added in v0.2.0

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

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

type PerconaXtraDBCluster

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

	Spec   PerconaXtraDBClusterSpec   `json:"spec,omitempty"`
	Status PerconaXtraDBClusterStatus `json:"status,omitempty"`
}

PerconaXtraDBCluster is the Schema for the perconaxtradbclusters API +k8s:openapi-gen=true

func (*PerconaXtraDBCluster) CheckNSetDefaults added in v0.2.0

func (cr *PerconaXtraDBCluster) CheckNSetDefaults() error

CheckNSetDefaults sets defaults options and overwrites wrong settings and checks if other options' values are allowable

func (*PerconaXtraDBCluster) DeepCopy

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

func (*PerconaXtraDBCluster) DeepCopyInto

func (in *PerconaXtraDBCluster) DeepCopyInto(out *PerconaXtraDBCluster)

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

func (*PerconaXtraDBCluster) DeepCopyObject

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

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

func (*PerconaXtraDBCluster) OwnerRef added in v0.2.0

func (cr *PerconaXtraDBCluster) OwnerRef(scheme *runtime.Scheme) (metav1.OwnerReference, error)

OwnerRef returns OwnerReference to object

type PerconaXtraDBClusterList

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

PerconaXtraDBClusterList contains a list of PerconaXtraDBCluster

func (*PerconaXtraDBClusterList) DeepCopy

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

func (*PerconaXtraDBClusterList) DeepCopyInto

func (in *PerconaXtraDBClusterList) DeepCopyInto(out *PerconaXtraDBClusterList)

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

func (*PerconaXtraDBClusterList) DeepCopyObject

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

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

type PerconaXtraDBClusterSpec

type PerconaXtraDBClusterSpec struct {
	Platform    *Platform           `json:"platform,omitempty"`
	SecretsName string              `json:"secretsName,omitempty"`
	PXC         *PodSpec            `json:"pxc,omitempty"`
	ProxySQL    *PodSpec            `json:"proxysql,omitempty"`
	PMM         *PMMSpec            `json:"pmm,omitempty"`
	Backup      *PXCScheduledBackup `json:"backup,omitempty"`
}

PerconaXtraDBClusterSpec defines the desired state of PerconaXtraDBCluster

func (*PerconaXtraDBClusterSpec) DeepCopy

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

func (*PerconaXtraDBClusterSpec) DeepCopyInto

func (in *PerconaXtraDBClusterSpec) DeepCopyInto(out *PerconaXtraDBClusterSpec)

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

type PerconaXtraDBClusterStatus

type PerconaXtraDBClusterStatus struct {
	State ClusterState
}

PerconaXtraDBClusterStatus defines the observed state of PerconaXtraDBCluster

func (*PerconaXtraDBClusterStatus) DeepCopy

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

func (*PerconaXtraDBClusterStatus) DeepCopyInto

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

type Platform

type Platform string

type PodAffinity added in v0.2.0

type PodAffinity struct {
	TopologyKey *string          `json:"topologyKey,omitempty"`
	Advanced    *corev1.Affinity `json:"advanced,omitempty"`
}

func (*PodAffinity) DeepCopy added in v0.2.0

func (in *PodAffinity) DeepCopy() *PodAffinity

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

func (*PodAffinity) DeepCopyInto added in v0.2.0

func (in *PodAffinity) DeepCopyInto(out *PodAffinity)

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

type PodResources

type PodResources struct {
	Requests *ResourcesList `json:"requests,omitempty"`
	Limits   *ResourcesList `json:"limits,omitempty"`
}

func (*PodResources) DeepCopy

func (in *PodResources) DeepCopy() *PodResources

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

func (*PodResources) DeepCopyInto

func (in *PodResources) DeepCopyInto(out *PodResources)

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

type PodSpec

type PodSpec struct {
	Enabled           bool                          `json:"enabled,omitempty"`
	Size              int32                         `json:"size,omitempty"`
	Image             string                        `json:"image,omitempty"`
	Resources         *PodResources                 `json:"resources,omitempty"`
	VolumeSpec        VolumeSpec                    `json:"volumeSpec,omitempty"`
	Affinity          *PodAffinity                  `json:"affinity,omitempty"`
	NodeSelector      map[string]string             `json:"nodeSelector,omitempty"`
	Tolerations       []corev1.Toleration           `json:"tolerations,omitempty"`
	PriorityClassName string                        `json:"priorityClassName,omitempty"`
	Annotations       map[string]string             `json:"annotations,omitempty"`
	Labels            map[string]string             `json:"labels,omitempty"`
	ImagePullSecrets  []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
}

func (*PodSpec) DeepCopy

func (in *PodSpec) DeepCopy() *PodSpec

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

func (*PodSpec) DeepCopyInto

func (in *PodSpec) DeepCopyInto(out *PodSpec)

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

type ResourcesList

type ResourcesList struct {
	Memory string `json:"memory,omitempty"`
	CPU    string `json:"cpu,omitempty"`
}

func (*ResourcesList) DeepCopy

func (in *ResourcesList) DeepCopy() *ResourcesList

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

func (*ResourcesList) DeepCopyInto

func (in *ResourcesList) DeepCopyInto(out *ResourcesList)

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

type ServerVersion

type ServerVersion struct {
	Platform Platform
	Info     k8sversion.Info
}

ServerVersion represents info about k8s / openshift server version

func (*ServerVersion) DeepCopy

func (in *ServerVersion) DeepCopy() *ServerVersion

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

func (*ServerVersion) DeepCopyInto

func (in *ServerVersion) DeepCopyInto(out *ServerVersion)

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

type StatefulApp

type StatefulApp interface {
	App
	StatefulSet() *appsv1.StatefulSet
}

type VolumeSpec added in v0.2.0

type VolumeSpec struct {
	AccessModes  []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty"`
	Size         string                              `json:"size,omitempty"`
	SizeParsed   resource.Quantity                   `json:"-"`
	StorageClass *string                             `json:"storageClass,omitempty"`
}

func (*VolumeSpec) DeepCopy added in v0.2.0

func (in *VolumeSpec) DeepCopy() *VolumeSpec

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

func (*VolumeSpec) DeepCopyInto added in v0.2.0

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