v1alpha1

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 29 Imported by: 2

Documentation

Overview

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

Index

Constants

View Source
const (
	ConditionTypeReady           string = "Ready"
	ConditionTypeBackupRestored  string = "BackupRestored"
	ConditionTypePrimarySwitched string = "PrimarySwitched"
	// ConditionTypeGaleraReady indicates that the cluster is healthy.
	ConditionTypeGaleraReady string = "GaleraReady"
	// ConditionTypeGaleraConfigured indicates that the cluster has been successfully configured.
	ConditionTypeGaleraConfigured string = "GaleraConfigured"
	ConditionTypeComplete         string = "Complete"
	// ConditionTypeStorageResized indicates that the storage has been successfully resized.
	ConditionTypeStorageResized string = "StorageResized"

	ConditionReasonStatefulSetNotReady string = "StatefulSetNotReady"
	ConditionReasonStatefulSetReady    string = "StatefulSetReady"
	ConditionReasonRestoreBackup       string = "RestoreBackup"
	ConditionReasonSwitchPrimary       string = "SwitchPrimary"
	ConditionReasonGaleraReady         string = "GaleraReady"
	ConditionReasonGaleraNotReady      string = "GaleraNotReady"
	ConditionReasonGaleraConfigured    string = "GaleraConfigured"
	ConditionReasonResizingStorage     string = "ResizingStorage"
	ConditionReasonWaitStorageResize   string = "WaitStorageResize"
	ConditionReasonStorageResized      string = "StorageResized"
	ConditionReasonInitializing        string = "Initializing"
	ConditionReasonInitialized         string = "Initialized"

	ConditionReasonMaxScaleNotReady string = "MaxScaleNotReady"
	ConditionReasonMaxScaleReady    string = "MaxScaleReady"

	ConditionReasonRestoreNotComplete string = "RestoreNotComplete"
	ConditionReasonRestoreComplete    string = "RestoreComplete"

	ConditionReasonJobComplete  string = "JobComplete"
	ConditionReasonJobSuspended string = "JobSuspended"
	ConditionReasonJobFailed    string = "JobFailed"
	ConditionReasonJobRunning   string = "JobRunning"

	ConditionReasonCronJobScheduled string = "CronJobScheduled"
	ConditionReasonCronJobFailed    string = "CronJobScheduled"
	ConditionReasonCronJobRunning   string = "CronJobRunning"
	ConditionReasonCronJobSuccess   string = "CronJobSucess"

	ConditionReasonConnectionFailed string = "ConnectionFailed"

	ConditionReasonCreated string = "Created"
	ConditionReasonHealthy string = "Healthy"
	ConditionReasonFailed  string = "Failed"
)
View Source
const (
	// ReasonReplicationConfiguring indicates that replication is being configured.
	ReasonReplicationConfiguring = "ReplicationConfiguring"
	// ReasonReplicationConfigured indicates that replication has been configured.
	ReasonReplicationConfigured = "ReplicationConfigured"
	// ReasonReplicationPrimaryLock indicates that primary tables have a read lock.
	ReasonReplicationPrimaryLock = "PrimaryLock"
	// ReasonReplicationPrimaryReadonly indicates that primary is being changed to readonly mode.
	ReasonReplicationPrimaryReadonly = "PrimaryReadonly"
	// ReasonReplicationReplicaSync indicates that replicas are being synced with primary.
	ReasonReplicationReplicaSync = "ReplicaSync"
	// ReasonReplicationReplicaSyncErr indicates that an error has happened while replicas were being synced with primary.
	ReasonReplicationReplicaSyncErr = "ReplicaSyncErr"
	// ReasonReplicationPrimaryNew indicates that a new primary is being configured.
	ReasonReplicationPrimaryNew = "PrimaryNew"
	// ReasonReplicationReplicaConn indicates that replicas are connecting to the new primary.
	ReasonReplicationReplicaConn = "ReplicaConn"
	// ReasonReplicationPrimaryToReplica indicates that current primary is being unlocked to become a replica.
	ReasonReplicationPrimaryToReplica = "PrimaryToReplica"

	// ReasonGaleraClusterHealthy indicates that the cluster is healthy,
	ReasonGaleraClusterHealthy = "GaleraClusterHealthy"
	// ReasonGaleraClusterNotHealthy indicates that the cluster is not healthy.
	ReasonGaleraClusterNotHealthy = "GaleraClusterNotHealthy"
	// ReasonGaleraClusterBootstrap indicates that the cluster is being bootstrapped.
	ReasonGaleraClusterBootstrap = "GaleraClusterBootstrap"
	// ReasonGaleraClusterBootstrapTimeout indicates that the cluster bootstrap has timed out.
	ReasonGaleraClusterBootstrapTimeout = "GaleraClusterBootstrapTimeout"
	// ReasonGaleraPodStateFetched indicates that the Pod state has been fetched successfully.
	ReasonGaleraPodStateFetched = "GaleraPodStateFetched"
	// ReasonGaleraPodRecovered indicates that the Pod has successfully recovered the sequence.
	ReasonGaleraPodRecovered = "GaleraPodRecovered"
	// ReasonGaleraPodSyncTimeout indicates that the Pod has timed out reaching the Sync state.
	ReasonGaleraPodSyncTimeout = "GaleraPodSyncTimeout"

	// ReasonPrimarySwitching indicates that primary is being switched.
	ReasonPrimarySwitching = "PrimarySwitching"
	// ReasonPrimarySwitched indicates that primary has been switched.
	ReasonPrimarySwitched = "PrimarySwitched"

	// ReasonMaxScalePrimaryServerChanged indicates that the primary server managed by MaxScale has changed.
	ReasonMaxScalePrimaryServerChanged = "MaxScalePrimaryServerChanged"

	// ReasonWebhookUpdateFailed indicates that the webhook configuration update failed.
	ReasonWebhookUpdateFailed = "WebhookUpdateFailed"

	// ReasonCRDNotFound indicates that a third party CRD is not present in the cluster.
	ReasonCRDNotFound = "CRDNotFound"
)

Variables

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

	// DefaultReplicationSpec provides sensible defaults for the ReplicationSpec.
	DefaultReplicationSpec = ReplicationSpec{
		Primary: &PrimaryReplication{
			PodIndex:          ptr.To(0),
			AutomaticFailover: ptr.To(true),
		},
		Replica: &ReplicaReplication{
			WaitPoint:         ptr.To(WaitPointAfterSync),
			Gtid:              ptr.To(GtidCurrentPos),
			ConnectionTimeout: ptr.To(tenSeconds),
			ConnectionRetries: ptr.To(10),
			SyncTimeout:       ptr.To(tenSeconds),
		},
		SyncBinlog:    ptr.To(true),
		ProbesEnabled: ptr.To(false),
	}
)

Functions

func InternalServiceName added in v0.0.26

func InternalServiceName(mariadbName string) string

InternalServiceName defines the name for the internal headless Service

Types

type AffinityConfig added in v0.0.26

type AffinityConfig struct {
	// Affinity to be used in the Pod.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	corev1.Affinity `json:",inline"`
	// EnableAntiAffinity configures PodAntiAffinity so each Pod is scheduled in a different Node, enabling HA.
	// Make sure you have at least as many Nodes available as the replicas to not end up with unscheduled Pods.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	EnableAntiAffinity *bool `json:"enableAntiAffinity,omitempty" webhook:"inmutable"`
}

AffinityConfig defines policies to schedule Pods in Nodes.

func (*AffinityConfig) DeepCopy added in v0.0.26

func (in *AffinityConfig) DeepCopy() *AffinityConfig

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

func (*AffinityConfig) DeepCopyInto added in v0.0.26

func (in *AffinityConfig) DeepCopyInto(out *AffinityConfig)

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

func (*AffinityConfig) SetDefaults added in v0.0.26

func (a *AffinityConfig) SetDefaults(objMeta metav1.ObjectMeta)

SetDefaults sets reasonable defaults.

type Backup

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

	Spec   BackupSpec   `json:"spec,omitempty"`
	Status BackupStatus `json:"status,omitempty"`
}

Backup is the Schema for the backups API. It is used to define backup jobs and its storage.

func (*Backup) DeepCopy

func (in *Backup) DeepCopy() *Backup

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

func (*Backup) DeepCopyInto

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

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

func (*Backup) DeepCopyObject

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

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

func (*Backup) IsComplete

func (b *Backup) IsComplete() bool

func (*Backup) SetDefaults added in v0.0.24

func (b *Backup) SetDefaults()

func (*Backup) SetupWebhookWithManager

func (r *Backup) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Backup) Validate added in v0.0.24

func (b *Backup) Validate() error

func (*Backup) ValidateCreate

func (r *Backup) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Backup) ValidateDelete

func (r *Backup) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Backup) ValidateUpdate

func (r *Backup) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

func (*Backup) Volume

func (b *Backup) Volume() (*corev1.VolumeSource, error)

type BackupList

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

BackupList contains a list of Backup

func (*BackupList) DeepCopy

func (in *BackupList) DeepCopy() *BackupList

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

func (*BackupList) DeepCopyInto

func (in *BackupList) DeepCopyInto(out *BackupList)

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

func (*BackupList) DeepCopyObject

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

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

type BackupSpec

type BackupSpec struct {
	// ContainerTemplate defines templates to configure Container objects.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ContainerTemplate `json:",inline"`
	// PodTemplate defines templates to configure Pod objects.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PodTemplate `json:",inline"`
	// MariaDBRef is a reference to a MariaDB object.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MariaDBRef MariaDBRef `json:"mariaDbRef" webhook:"inmutable"`
	// Storage to be used in the Backup.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Storage BackupStorage `json:"storage" webhook:"inmutable"`
	// Schedule defines when the Backup will be taken.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Schedule *Schedule `json:"schedule,omitempty"`
	// MaxRetention defines the retention policy for backups. Old backups will be cleaned up by the Backup Job.
	// It defaults to 30 days.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MaxRetention metav1.Duration `json:"maxRetention,omitempty" webhook:"inmutableinit"`
	// LogLevel to be used n the Backup Job. It defaults to 'info'.
	// +optional
	// +kubebuilder:default=info
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	LogLevel string `json:"logLevel,omitempty"`
	// BackoffLimit defines the maximum number of attempts to successfully take a Backup.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"}
	BackoffLimit int32 `json:"backoffLimit,omitempty"`
	// RestartPolicy to be added to the Backup Pod.
	// +optional
	// +kubebuilder:default=OnFailure
	// +kubebuilder:validation:Enum=Always;OnFailure;Never
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	RestartPolicy corev1.RestartPolicy `json:"restartPolicy,omitempty" webhook:"inmutable"`
	// InheritMetadata defines the metadata to be inherited by children resources.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	InheritMetadata *Metadata `json:"inheritMetadata,omitempty"`
}

BackupSpec defines the desired state of Backup

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 BackupStatus

type BackupStatus struct {
	// Conditions for the Backup object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors={"urn:alm:descriptor:io.kubernetes.conditions"}
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

BackupStatus defines the observed state of Backup

func (*BackupStatus) DeepCopy

func (in *BackupStatus) DeepCopy() *BackupStatus

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

func (*BackupStatus) DeepCopyInto

func (in *BackupStatus) DeepCopyInto(out *BackupStatus)

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

func (*BackupStatus) SetCondition

func (b *BackupStatus) SetCondition(condition metav1.Condition)

type BackupStorage

type BackupStorage struct {
	// S3 defines the configuration to store backups in a S3 compatible storage.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	S3 *S3 `json:"s3,omitempty"`
	// PersistentVolumeClaim is a Kubernetes PVC specification.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PersistentVolumeClaim *corev1.PersistentVolumeClaimSpec `json:"persistentVolumeClaim,omitempty"`
	// Volume is a Kubernetes volume specification.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Volume *corev1.VolumeSource `json:"volume,omitempty"`
}

BackupStorage defines the storage for a Backup.

func (*BackupStorage) DeepCopy

func (in *BackupStorage) DeepCopy() *BackupStorage

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

func (*BackupStorage) DeepCopyInto

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) Validate

func (b *BackupStorage) Validate() error

type Connection

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

	Spec   ConnectionSpec   `json:"spec,omitempty"`
	Status ConnectionStatus `json:"status,omitempty"`
}

Connection is the Schema for the connections API. It is used to configure connection strings for the applications connecting to MariaDB.

func (*Connection) DeepCopy

func (in *Connection) DeepCopy() *Connection

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

func (*Connection) DeepCopyInto

func (in *Connection) DeepCopyInto(out *Connection)

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

func (*Connection) DeepCopyObject

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

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

func (*Connection) IsReady

func (c *Connection) IsReady() bool

func (*Connection) SecretKey

func (c *Connection) SecretKey() string

func (*Connection) SecretName

func (c *Connection) SecretName() string

func (*Connection) SetDefaults added in v0.0.25

func (c *Connection) SetDefaults(refs *ConnectionRefs) error

func (*Connection) SetupWebhookWithManager

func (r *Connection) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Connection) ValidateCreate

func (r *Connection) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Connection) ValidateDelete

func (r *Connection) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Connection) ValidateUpdate

func (r *Connection) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type ConnectionList

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

ConnectionList contains a list of Connection

func (*ConnectionList) DeepCopy

func (in *ConnectionList) DeepCopy() *ConnectionList

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

func (*ConnectionList) DeepCopyInto

func (in *ConnectionList) DeepCopyInto(out *ConnectionList)

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

func (*ConnectionList) DeepCopyObject

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

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

type ConnectionRefs added in v0.0.25

type ConnectionRefs struct {
	MariaDB  *MariaDB
	MaxScale *MaxScale
}

ConnectionRefs contains the resolved references of a Connection.

func (*ConnectionRefs) DeepCopy added in v0.0.25

func (in *ConnectionRefs) DeepCopy() *ConnectionRefs

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

func (*ConnectionRefs) DeepCopyInto added in v0.0.25

func (in *ConnectionRefs) DeepCopyInto(out *ConnectionRefs)

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

func (*ConnectionRefs) Host added in v0.0.25

func (r *ConnectionRefs) Host(c *Connection) (*string, error)

Host returns the host address to connect to.

func (*ConnectionRefs) Port added in v0.0.25

func (r *ConnectionRefs) Port() (*int32, error)

Port returns the port to connect to.

type ConnectionSpec

type ConnectionSpec struct {
	// ContainerTemplate defines templates to configure Container objects.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ConnectionTemplate `json:",inline"`
	// MariaDBRef is a reference to the MariaDB to connect to. Either MariaDBRef or MaxScaleRef must be provided.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MariaDBRef *MariaDBRef `json:"mariaDbRef,omitempty" webhook:"inmutable"`
	// MaxScaleRef is a reference to the MaxScale to connect to. Either MariaDBRef or MaxScaleRef must be provided.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MaxScaleRef *corev1.ObjectReference `json:"maxScaleRef,omitempty"`
	// Username to use for configuring the Connection.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Username string `json:"username" webhook:"inmutable"`
	// PasswordSecretKeyRef is a reference to the password to use for configuring the Connection.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PasswordSecretKeyRef corev1.SecretKeySelector `json:"passwordSecretKeyRef" webhook:"inmutable"`
	// Host to connect to. If not provided, it defaults to the MariaDB host or to the MaxScale host.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number","urn:alm:descriptor:com.tectonic.ui:advanced"}
	Host string `json:"host,omitempty"`
	// Database to use when configuring the Connection.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Database *string `json:"database,omitempty" webhook:"inmutable"`
}

ConnectionSpec defines the desired state of Connection

func (*ConnectionSpec) DeepCopy

func (in *ConnectionSpec) DeepCopy() *ConnectionSpec

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

func (*ConnectionSpec) DeepCopyInto

func (in *ConnectionSpec) DeepCopyInto(out *ConnectionSpec)

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

type ConnectionStatus

type ConnectionStatus struct {
	// Conditions for the Connection object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors={"urn:alm:descriptor:io.kubernetes.conditions"}
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

ConnectionStatus defines the observed state of Connection

func (*ConnectionStatus) DeepCopy

func (in *ConnectionStatus) DeepCopy() *ConnectionStatus

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

func (*ConnectionStatus) DeepCopyInto

func (in *ConnectionStatus) DeepCopyInto(out *ConnectionStatus)

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

func (*ConnectionStatus) SetCondition

func (c *ConnectionStatus) SetCondition(condition metav1.Condition)

type ConnectionTemplate

type ConnectionTemplate struct {
	// SecretName to be used in the Connection.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	SecretName *string `json:"secretName,omitempty" webhook:"inmutableinit"`
	// SecretTemplate to be used in the Connection.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	SecretTemplate *SecretTemplate `json:"secretTemplate,omitempty" webhook:"inmutableinit"`
	// HealthCheck to be used in the Connection.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	HealthCheck *HealthCheck `json:"healthCheck,omitempty"`
	// Params to be used in the Connection.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Params map[string]string `json:"params,omitempty" webhook:"inmutable"`
	// ServiceName to be used in the Connection.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ServiceName *string `json:"serviceName,omitempty" webhook:"inmutable"`
	// Port to connect to. If not provided, it defaults to the MariaDB port or to the first MaxScale listener.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number","urn:alm:descriptor:com.tectonic.ui:advanced"}
	Port int32 `json:"port,omitempty"`
}

ConnectionTemplate defines a template to customize Connection objects.

func (*ConnectionTemplate) DeepCopy

func (in *ConnectionTemplate) DeepCopy() *ConnectionTemplate

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

func (*ConnectionTemplate) DeepCopyInto

func (in *ConnectionTemplate) DeepCopyInto(out *ConnectionTemplate)

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

type Container added in v0.0.24

type Container struct {
	// ContainerTemplate defines a template to configure Container objects.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ContainerTemplate `json:",inline"`
	// Image name to be used by the MariaDB instances. The supported format is `<image>:<tag>`.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Image string `json:"image"`
	// ImagePullPolicy is the image pull policy. One of `Always`, `Never` or `IfNotPresent`. If not defined, it defaults to `IfNotPresent`.
	// +optional
	// +kubebuilder:validation:Enum=Always;Never;IfNotPresent
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:imagePullPolicy"}
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
}

Container object definition.

func (*Container) DeepCopy added in v0.0.24

func (in *Container) DeepCopy() *Container

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

func (*Container) DeepCopyInto added in v0.0.24

func (in *Container) DeepCopyInto(out *Container)

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

type ContainerTemplate added in v0.0.16

type ContainerTemplate struct {
	// Command to be used in the Container.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Command []string `json:"command,omitempty"`
	// Args to be used in the Container.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Args []string `json:"args,omitempty"`
	// Env represents the environment variables to be injected in a container.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Env []corev1.EnvVar `json:"env,omitempty"`
	// EnvFrom represents the references (via ConfigMap and Secrets) to environment variables to be injected in the container.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`
	// VolumeMounts to be used in the Container.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty" webhook:"inmutable"`
	// LivenessProbe to be used in the Container.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty"`
	// ReadinessProbe to be used in the Container.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty"`
	// Resouces describes the compute resource requirements.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:resourceRequirements"}
	Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
	// SecurityContext holds security configuration that will be applied to a container.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
}

ContainerTemplate defines a template to configure Container objects.

func (*ContainerTemplate) DeepCopy added in v0.0.16

func (in *ContainerTemplate) DeepCopy() *ContainerTemplate

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

func (*ContainerTemplate) DeepCopyInto added in v0.0.16

func (in *ContainerTemplate) DeepCopyInto(out *ContainerTemplate)

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

type CooperativeMonitoring added in v0.0.25

type CooperativeMonitoring string

CooperativeMonitoring enables coordination between multiple MaxScale instances running monitors. See: https://mariadb.com/docs/server/architecture/components/maxscale/monitors/mariadbmon/use-cooperative-locking-ha-maxscale-mariadb-monitor/

const (
	// CooperativeMonitoringMajorityOfAll requires a lock from the majority of the MariaDB servers, even the ones that are down.
	CooperativeMonitoringMajorityOfAll CooperativeMonitoring = "majority_of_all"
	// CooperativeMonitoringMajorityOfRunning requires a lock from the majority of the MariaDB servers.
	CooperativeMonitoringMajorityOfRunning CooperativeMonitoring = "majority_of_running"
)

type Database

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

	Spec   DatabaseSpec   `json:"spec,omitempty"`
	Status DatabaseStatus `json:"status,omitempty"`
}

Database is the Schema for the databases API. It is used to define a logical database as if you were running a 'CREATE DATABASE' statement.

func (*Database) DatabaseNameOrDefault added in v0.0.20

func (d *Database) DatabaseNameOrDefault() string

func (*Database) DeepCopy

func (in *Database) DeepCopy() *Database

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

func (*Database) DeepCopyInto

func (in *Database) DeepCopyInto(out *Database)

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

func (*Database) DeepCopyObject

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

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

func (*Database) IsBeingDeleted

func (d *Database) IsBeingDeleted() bool

func (*Database) IsReady

func (d *Database) IsReady() bool

func (*Database) MariaDBRef

func (d *Database) MariaDBRef() *MariaDBRef

func (*Database) RequeueInterval added in v0.0.24

func (d *Database) RequeueInterval() *metav1.Duration

func (*Database) RetryInterval added in v0.0.21

func (d *Database) RetryInterval() *metav1.Duration

func (*Database) SetupWebhookWithManager

func (r *Database) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Database) ValidateCreate

func (r *Database) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Database) ValidateDelete

func (r *Database) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Database) ValidateUpdate

func (r *Database) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type DatabaseList

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

DatabaseList contains a list of Database

func (*DatabaseList) DeepCopy

func (in *DatabaseList) DeepCopy() *DatabaseList

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

func (*DatabaseList) DeepCopyInto

func (in *DatabaseList) DeepCopyInto(out *DatabaseList)

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

func (*DatabaseList) DeepCopyObject

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

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

type DatabaseSpec

type DatabaseSpec struct {
	// SQLTemplate defines templates to configure SQL objects.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	SQLTemplate `json:",inline"`
	// MariaDBRef is a reference to a MariaDB object.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MariaDBRef MariaDBRef `json:"mariaDbRef" webhook:"inmutable"`
	// CharacterSet to use in the Database.
	// +optional
	// +kubebuilder:default=utf8
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	CharacterSet string `json:"characterSet,omitempty" webhook:"inmutable"`
	// CharacterSet to use in the Database.
	// +optional
	// +kubebuilder:default=utf8_general_ci
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Collate string `json:"collate,omitempty" webhook:"inmutable"`
	// Name overrides the default Database name provided by metadata.name.
	// +optional
	// +kubebuilder:validation:MaxLength=80
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Name string `json:"name,omitempty" webhook:"inmutable"`
}

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 DatabaseStatus

type DatabaseStatus struct {
	// Conditions for the Database object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors={"urn:alm:descriptor:io.kubernetes.conditions"}
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

DatabaseStatus defines the observed state of Database

func (*DatabaseStatus) DeepCopy

func (in *DatabaseStatus) DeepCopy() *DatabaseStatus

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

func (*DatabaseStatus) DeepCopyInto

func (in *DatabaseStatus) DeepCopyInto(out *DatabaseStatus)

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

func (*DatabaseStatus) SetCondition

func (d *DatabaseStatus) SetCondition(condition metav1.Condition)

type Exporter

type Exporter struct {
	// ContainerTemplate defines a template to configure Container objects.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ContainerTemplate `json:",inline"`
	// PodTemplate defines templates to configure Pod objects.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PodTemplate `json:",inline"`
	// Image name to be used as metrics exporter. The supported format is `<image>:<tag>`.
	// Only mysqld-exporter >= v0.15.0 is supported: https://github.com/prometheus/mysqld_exporter
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Image string `json:"image,omitempty"`
	// ImagePullPolicy is the image pull policy. One of `Always`, `Never` or `IfNotPresent`. If not defined, it defaults to `IfNotPresent`.
	// +optional
	// +kubebuilder:validation:Enum=Always;Never;IfNotPresent
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:imagePullPolicy"}
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
	// Port where the exporter will be listening for connections.
	// +optional
	// +kubebuilder:default=9104
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"}
	Port int32 `json:"port,omitempty"`
}

Exporter defines a metrics exporter container.

func (*Exporter) DeepCopy

func (in *Exporter) DeepCopy() *Exporter

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

func (*Exporter) DeepCopyInto

func (in *Exporter) DeepCopyInto(out *Exporter)

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

type Galera added in v0.0.16

type Galera struct {
	// GaleraSpec is the Galera desired state specification.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	GaleraSpec `json:",inline"`
	// Enabled is a flag to enable Galera.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
	Enabled bool `json:"enabled,omitempty"`
}

Galera allows you to enable multi-master HA via Galera in your MariaDB cluster.

func (*Galera) DeepCopy added in v0.0.16

func (in *Galera) DeepCopy() *Galera

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

func (*Galera) DeepCopyInto added in v0.0.16

func (in *Galera) DeepCopyInto(out *Galera)

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

func (*Galera) SetDefaults added in v0.0.26

func (g *Galera) SetDefaults(mdb *MariaDB, env *environment.OperatorEnv)

SetDefaults sets reasonable defaults.

type GaleraAgent added in v0.0.16

type GaleraAgent struct {
	// ContainerTemplate defines a template to configure Container objects.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ContainerTemplate `json:",inline"`
	// Image name to be used by the MariaDB instances. The supported format is `<image>:<tag>`.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Image string `json:"image,omitempty"`
	// ImagePullPolicy is the image pull policy. One of `Always`, `Never` or `IfNotPresent`. If not defined, it defaults to `IfNotPresent`.
	// +optional
	// +kubebuilder:validation:Enum=Always;Never;IfNotPresent
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:imagePullPolicy"}
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
	// Port where the agent will be listening for connections.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Port int32 `json:"port,omitempty"`
	// KubernetesAuth to be used by the agent container
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	KubernetesAuth *KubernetesAuth `json:"kubernetesAuth,omitempty"`
	// GracefulShutdownTimeout is the time we give to the agent container in order to gracefully terminate in-flight requests.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	GracefulShutdownTimeout *metav1.Duration `json:"gracefulShutdownTimeout,omitempty"`
}

GaleraAgent is a sidecar agent that co-operates with mariadb-operator.

func (*GaleraAgent) DeepCopy added in v0.0.16

func (in *GaleraAgent) DeepCopy() *GaleraAgent

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

func (*GaleraAgent) DeepCopyInto added in v0.0.16

func (in *GaleraAgent) DeepCopyInto(out *GaleraAgent)

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

func (*GaleraAgent) SetDefaults added in v0.0.26

func (r *GaleraAgent) SetDefaults(env *environment.OperatorEnv)

SetDefaults sets reasonable defaults.

type GaleraConfig added in v0.0.26

type GaleraConfig struct {
	// ReuseStorageVolume indicates that storage volume used by MariaDB should be reused to store the Galera configuration files.
	// It defaults to false, which implies that a dedicated volume for the Galera configuration files is provisioned.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ReuseStorageVolume *bool `json:"reuseStorageVolume,omitempty" webhook:"inmutableinit"`
	// VolumeClaimTemplate is a template for the PVC that will contain the Galera configuration files shared between the InitContainer, Agent and MariaDB.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	VolumeClaimTemplate *VolumeClaimTemplate `json:"volumeClaimTemplate,omitempty" webhook:"inmutableinit"`
}

GaleraConfig defines storage options for the Galera configuration files.

func (*GaleraConfig) DeepCopy added in v0.0.26

func (in *GaleraConfig) DeepCopy() *GaleraConfig

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

func (*GaleraConfig) DeepCopyInto added in v0.0.26

func (in *GaleraConfig) DeepCopyInto(out *GaleraConfig)

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

func (*GaleraConfig) SetDefaults added in v0.0.26

func (g *GaleraConfig) SetDefaults()

SetDefaults sets reasonable defaults.

type GaleraRecovery added in v0.0.16

type GaleraRecovery struct {
	// Enabled is a flag to enable GaleraRecovery.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
	Enabled bool `json:"enabled"`
	// MinClusterSize is the minimum number of replicas to consider the cluster healthy. It can be either a number of replicas (3) or a percentage (50%).
	// If Galera consistently reports less replicas than this value for the given 'ClusterHealthyTimeout' interval, a cluster recovery is iniated.
	// It defaults to '50%' of the replicas specified by the MariaDB object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MinClusterSize *intstr.IntOrString `json:"minClusterSize,omitempty"`
	// ClusterHealthyTimeout represents the duration at which a Galera cluster, that consistently failed health checks,
	// is considered unhealthy, and consequently the Galera recovery process will be initiated by the operator.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ClusterHealthyTimeout *metav1.Duration `json:"clusterHealthyTimeout,omitempty"`
	// ClusterBootstrapTimeout is the time limit for bootstrapping a cluster.
	// Once this timeout is reached, the Galera recovery state is reset and a new cluster bootstrap will be attempted.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ClusterBootstrapTimeout *metav1.Duration `json:"clusterBootstrapTimeout,omitempty"`
	// PodRecoveryTimeout is the time limit for recevorying the sequence of a Pod during the cluster recovery.
	// Once this timeout is reached, the Pod is restarted.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PodRecoveryTimeout *metav1.Duration `json:"podRecoveryTimeout,omitempty"`
	// PodSyncTimeout is the time limit for a Pod to join the cluster after having performed a cluster bootstrap during the cluster recovery.
	// Once this timeout is reached, the Pod is restarted.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PodSyncTimeout *metav1.Duration `json:"podSyncTimeout,omitempty"`
}

GaleraRecovery is the recovery process performed by the operator whenever the Galera cluster is not healthy. More info: https://galeracluster.com/library/documentation/crash-recovery.html.

func (*GaleraRecovery) DeepCopy added in v0.0.16

func (in *GaleraRecovery) DeepCopy() *GaleraRecovery

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

func (*GaleraRecovery) DeepCopyInto added in v0.0.16

func (in *GaleraRecovery) DeepCopyInto(out *GaleraRecovery)

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

func (*GaleraRecovery) HasMinClusterSize added in v0.0.26

func (g *GaleraRecovery) HasMinClusterSize(currentSize int, mdb *MariaDB) (bool, error)

HasMinClusterSize returns whether the current cluster has the minimum number of replicas. If not, a cluster recovery will be performed.

func (*GaleraRecovery) SetDefaults added in v0.0.26

func (g *GaleraRecovery) SetDefaults(mdb *MariaDB)

SetDefaults sets reasonable defaults.

func (*GaleraRecovery) Validate added in v0.0.26

func (g *GaleraRecovery) Validate(mdb *MariaDB) error

Validate determines whether a GaleraRecovery is valid.

type GaleraRecoveryBootstrap added in v0.0.16

type GaleraRecoveryBootstrap struct {
	Time *metav1.Time `json:"time,omitempty"`
	Pod  *string      `json:"pod,omitempty"`
}

GaleraRecoveryBootstrap indicates when and in which Pod the cluster bootstrap process has been performed.

func (*GaleraRecoveryBootstrap) DeepCopy added in v0.0.16

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

func (*GaleraRecoveryBootstrap) DeepCopyInto added in v0.0.16

func (in *GaleraRecoveryBootstrap) DeepCopyInto(out *GaleraRecoveryBootstrap)

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

type GaleraRecoveryStatus added in v0.0.16

type GaleraRecoveryStatus struct {
	// State is a per Pod representation of the Galera state file (grastate.dat).
	State map[string]*recovery.GaleraState `json:"state,omitempty"`
	// State is a per Pod representation of the sequence recovery process.
	Recovered map[string]*recovery.Bootstrap `json:"recovered,omitempty"`
	// Bootstrap indicates when and in which Pod the cluster bootstrap process has been performed.
	Bootstrap *GaleraRecoveryBootstrap `json:"bootstrap,omitempty"`
	// PodsRestarted that the Pods have been restarted after the cluster bootstrap.
	PodsRestarted *bool `json:"podsRestarted,omitempty"`
}

GaleraRecoveryStatus is the current state of the Galera recovery process.

func (*GaleraRecoveryStatus) DeepCopy added in v0.0.16

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

func (*GaleraRecoveryStatus) DeepCopyInto added in v0.0.16

func (in *GaleraRecoveryStatus) DeepCopyInto(out *GaleraRecoveryStatus)

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

type GaleraSpec added in v0.0.16

type GaleraSpec struct {
	// Primary is the Galera configuration for the primary node.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Primary PrimaryGalera `json:"primary,omitempty"`
	// SST is the Snapshot State Transfer used when new Pods join the cluster.
	// More info: https://galeracluster.com/library/documentation/sst.html.
	// +optional
	// +kubebuilder:validation:Enum=rsync;mariabackup;mysqldump
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	SST SST `json:"sst,omitempty"`
	// AvailableWhenDonor indicates whether a donor node should be responding to queries. It defaults to false.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	AvailableWhenDonor *bool `json:"availableWhenDonor,omitempty"`
	// GaleraLibPath is a path inside the MariaDB image to the wsrep provider plugin. It is defaulted if not provided.
	// More info: https://galeracluster.com/library/documentation/mysql-wsrep-options.html#wsrep-provider.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	GaleraLibPath string `json:"galeraLibPath,omitempty"`
	// ReplicaThreads is the number of replica threads used to apply Galera write sets in parallel.
	// More info: https://mariadb.com/kb/en/galera-cluster-system-variables/#wsrep_slave_threads.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ReplicaThreads int `json:"replicaThreads,omitempty"`
	// GaleraAgent is a sidecar agent that co-operates with mariadb-operator.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Agent GaleraAgent `json:"agent,omitempty"`
	// GaleraRecovery is the recovery process performed by the operator whenever the Galera cluster is not healthy.
	// More info: https://galeracluster.com/library/documentation/crash-recovery.html.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Recovery *GaleraRecovery `json:"recovery,omitempty"`
	// InitContainer is an init container that co-operates with mariadb-operator.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	InitContainer Container `json:"initContainer,omitempty"`
	// InitJob defines metadata to the passed to the initialization Job.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	InitJob *Metadata `json:"initJob,omitempty"`
	// GaleraConfig defines storage options for the Galera configuration files.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Config GaleraConfig `json:"config,omitempty"`
}

GaleraSpec is the Galera desired state specification.

func (*GaleraSpec) DeepCopy added in v0.0.16

func (in *GaleraSpec) DeepCopy() *GaleraSpec

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

func (*GaleraSpec) DeepCopyInto added in v0.0.16

func (in *GaleraSpec) DeepCopyInto(out *GaleraSpec)

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

type Grant

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

	Spec   GrantSpec   `json:"spec,omitempty"`
	Status GrantStatus `json:"status,omitempty"`
}

Grant is the Schema for the grants API. It is used to define grants as if you were running a 'GRANT' statement.

func (*Grant) AccountName added in v0.0.20

func (g *Grant) AccountName() string

func (*Grant) DeepCopy

func (in *Grant) DeepCopy() *Grant

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

func (*Grant) DeepCopyInto

func (in *Grant) DeepCopyInto(out *Grant)

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

func (*Grant) DeepCopyObject

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

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

func (*Grant) HostnameOrDefault added in v0.0.20

func (g *Grant) HostnameOrDefault() string

func (*Grant) IsBeingDeleted

func (g *Grant) IsBeingDeleted() bool

func (*Grant) IsReady

func (m *Grant) IsReady() bool

func (*Grant) MariaDBRef

func (g *Grant) MariaDBRef() *MariaDBRef

func (*Grant) RequeueInterval added in v0.0.24

func (d *Grant) RequeueInterval() *metav1.Duration

func (*Grant) RetryInterval added in v0.0.21

func (g *Grant) RetryInterval() *metav1.Duration

func (*Grant) SetupWebhookWithManager

func (r *Grant) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Grant) ValidateCreate

func (r *Grant) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Grant) ValidateDelete

func (r *Grant) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Grant) ValidateUpdate

func (r *Grant) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type GrantList

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

GrantList contains a list of Grant

func (*GrantList) DeepCopy

func (in *GrantList) DeepCopy() *GrantList

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

func (*GrantList) DeepCopyInto

func (in *GrantList) DeepCopyInto(out *GrantList)

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

func (*GrantList) DeepCopyObject

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

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

type GrantSpec

type GrantSpec struct {
	// SQLTemplate defines templates to configure SQL objects.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	SQLTemplate `json:",inline"`
	// MariaDBRef is a reference to a MariaDB object.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MariaDBRef MariaDBRef `json:"mariaDbRef" webhook:"inmutable"`
	// Privileges to use in the Grant.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinItems=1
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Privileges []string `json:"privileges" webhook:"inmutable"`
	// Database to use in the Grant.
	// +optional
	// +kubebuilder:default=*
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Database string `json:"database,omitempty" webhook:"inmutable"`
	// Table to use in the Grant.
	// +optional
	// +kubebuilder:default=*
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Table string `json:"table,omitempty" webhook:"inmutable"`
	// Username to use in the Grant.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Username string `json:"username" webhook:"inmutable"`
	// Host to use in the Grant.
	// +optional
	// +kubebuilder:MaxLength=255
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Host *string `json:"host,omitempty" webhook:"inmutable"`
	// GrantOption to use in the Grant.
	// +optional
	// +kubebuilder:default=false
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	GrantOption bool `json:"grantOption,omitempty" webhook:"inmutable"`
}

GrantSpec defines the desired state of Grant

func (*GrantSpec) DeepCopy

func (in *GrantSpec) DeepCopy() *GrantSpec

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

func (*GrantSpec) DeepCopyInto

func (in *GrantSpec) DeepCopyInto(out *GrantSpec)

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

type GrantStatus

type GrantStatus struct {
	// Conditions for the Grant object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors={"urn:alm:descriptor:io.kubernetes.conditions"}
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

GrantStatus defines the observed state of Grant

func (*GrantStatus) DeepCopy

func (in *GrantStatus) DeepCopy() *GrantStatus

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

func (*GrantStatus) DeepCopyInto

func (in *GrantStatus) DeepCopyInto(out *GrantStatus)

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

func (*GrantStatus) SetCondition

func (g *GrantStatus) SetCondition(condition metav1.Condition)

type Gtid added in v0.0.15

type Gtid string

Gtid indicates which Global Transaction ID should be used when connecting a replica to the master. See: https://mariadb.com/kb/en/gtid/#using-current_pos-vs-slave_pos.

const (
	// GtidCurrentPos indicates the union of gtid_binlog_pos and gtid_slave_pos will be used when replicating from master.
	// This is the default Gtid mode.
	GtidCurrentPos Gtid = "CurrentPos"
	// GtidSlavePos indicates that gtid_slave_pos will be used when replicating from master.
	GtidSlavePos Gtid = "SlavePos"
)

func (Gtid) MariaDBFormat added in v0.0.15

func (g Gtid) MariaDBFormat() (string, error)

MariaDBFormat formats the Gtid so it can be used in MariaDB config files.

func (Gtid) Validate added in v0.0.15

func (g Gtid) Validate() error

Validate returns an error if the Gtid is not valid.

type HealthCheck

type HealthCheck struct {
	// Interval used to perform health checks.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Interval *metav1.Duration `json:"interval,omitempty"`
	// RetryInterval is the intervañ used to perform health check retries.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	RetryInterval *metav1.Duration `json:"retryInterval,omitempty"`
}

HealthCheck defines intervals for performing health checks.

func (*HealthCheck) DeepCopy

func (in *HealthCheck) DeepCopy() *HealthCheck

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

func (*HealthCheck) DeepCopyInto

func (in *HealthCheck) DeepCopyInto(out *HealthCheck)

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

type KubernetesAuth added in v0.0.16

type KubernetesAuth struct {
	// Enabled is a flag to enable KubernetesAuth
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
	Enabled bool `json:"enabled,omitempty"`
	// AuthDelegatorRoleName is the name of the ClusterRoleBinding that is associated with the "system:auth-delegator" ClusterRole.
	// It is necessary for creating TokenReview objects in order for the agent to validate the service account token.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	AuthDelegatorRoleName string `json:"authDelegatorRoleName,omitempty"`
}

KubernetesAuth refers to the Kubernetes authentication mechanism utilized for establishing a connection from the operator to the agent. The agent validates the legitimacy of the service account token provided as an Authorization header by creating a TokenReview resource.

func (*KubernetesAuth) AuthDelegatorRoleNameOrDefault added in v0.0.16

func (k *KubernetesAuth) AuthDelegatorRoleNameOrDefault(mariadb *MariaDB) string

AuthDelegatorRoleNameOrDefault defines the ClusterRoleBinding name bound to system:auth-delegator. It falls back to the MariaDB name if AuthDelegatorRoleName is not set.

func (*KubernetesAuth) DeepCopy added in v0.0.16

func (in *KubernetesAuth) DeepCopy() *KubernetesAuth

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

func (*KubernetesAuth) DeepCopyInto added in v0.0.16

func (in *KubernetesAuth) DeepCopyInto(out *KubernetesAuth)

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

type MariaDB

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

	Spec   MariaDBSpec   `json:"spec"`
	Status MariaDBStatus `json:"status,omitempty"`
}

MariaDB is the Schema for the mariadbs API. It is used to define MariaDB clusters.

func (*MariaDB) AreMetricsEnabled added in v0.0.24

func (m *MariaDB) AreMetricsEnabled() bool

AreMetricsEnabled indicates whether the MariaDB instance has metrics enabled

func (*MariaDB) DeepCopy

func (in *MariaDB) DeepCopy() *MariaDB

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

func (*MariaDB) DeepCopyInto

func (in *MariaDB) DeepCopyInto(out *MariaDB)

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

func (*MariaDB) DeepCopyObject

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

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

func (*MariaDB) Default added in v0.0.16

func (r *MariaDB) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*MariaDB) HasGaleraConfiguredCondition added in v0.0.16

func (m *MariaDB) HasGaleraConfiguredCondition() bool

HasGaleraConfiguredCondition indicates whether the MariaDB object has a GaleraConfigured status condition. This means that the cluster has been successfully configured the first time.

func (*MariaDB) HasGaleraNotReadyCondition added in v0.0.16

func (m *MariaDB) HasGaleraNotReadyCondition() bool

HasGaleraNotReadyCondition indicates whether the MariaDB object has a non GaleraReady status condition. This means that the Galera cluster is not healthy.

func (*MariaDB) HasGaleraReadyCondition added in v0.0.16

func (m *MariaDB) HasGaleraReadyCondition() bool

HasGaleraReadyCondition indicates whether the MariaDB object has a GaleraReady status condition. This means that the Galera cluster is healthy.

func (*MariaDB) HasRestoredBackup added in v0.0.14

func (m *MariaDB) HasRestoredBackup() bool

HasRestoredBackup indicates whether the MariaDB instance has restored a Backup

func (*MariaDB) InitKey added in v0.0.26

func (m *MariaDB) InitKey() types.NamespacedName

InitKey defines the keys for the init objects.

func (*MariaDB) InternalServiceKey added in v0.0.24

func (m *MariaDB) InternalServiceKey() types.NamespacedName

InternalServiceKey defines the key for the internal headless Service

func (*MariaDB) IsEphemeralStorageEnabled added in v0.0.25

func (m *MariaDB) IsEphemeralStorageEnabled() bool

IsEphemeralStorageEnabled indicates whether the MariaDB instance has ephemeral storage enabled

func (*MariaDB) IsGaleraEnabled added in v0.0.26

func (m *MariaDB) IsGaleraEnabled() bool

IsHAEnabled indicates whether the MariaDB instance has Galera enabled

func (*MariaDB) IsHAEnabled added in v0.0.16

func (m *MariaDB) IsHAEnabled() bool

IsHAEnabled indicates whether the MariaDB instance has HA enabled

func (*MariaDB) IsInitialDataEnabled added in v0.0.24

func (m *MariaDB) IsInitialDataEnabled() bool

IsInitialDataEnabled indicates whether the MariaDB instance has initial data enabled

func (*MariaDB) IsMaxScaleEnabled added in v0.0.25

func (m *MariaDB) IsMaxScaleEnabled() bool

IsMaxScaleEnabled indicates that a MaxScale instance is forwarding traffic to this MariaDB instance

func (*MariaDB) IsReady

func (m *MariaDB) IsReady() bool

IsReady indicates whether the MariaDB instance is ready

func (*MariaDB) IsReplicationConfigured added in v0.0.25

func (m *MariaDB) IsReplicationConfigured() bool

IsReplicationConfigured indicates whether replication has been configured.

func (*MariaDB) IsResizingStorage added in v0.0.26

func (m *MariaDB) IsResizingStorage() bool

IsResizingStorage indicates whether the MariaDB instance is resizing storage

func (*MariaDB) IsRestoringBackup added in v0.0.12

func (m *MariaDB) IsRestoringBackup() bool

IsRestoringBackup indicates whether the MariaDB instance is restoring backup

func (*MariaDB) IsRootPasswordDefined added in v0.0.25

func (m *MariaDB) IsRootPasswordDefined() bool

IsRootPasswordDefined indicates whether the MariaDB instance has a root password defined

func (*MariaDB) IsRootPasswordEmpty added in v0.0.25

func (m *MariaDB) IsRootPasswordEmpty() bool

IsRootPasswordEmpty indicates whether the MariaDB instance has an empty root password

func (*MariaDB) IsSwitchingPrimary added in v0.0.12

func (m *MariaDB) IsSwitchingPrimary() bool

IsSwitchingPrimary indicates whether the primary is being switched.

func (*MariaDB) IsWaitingForStorageResize added in v0.0.26

func (m *MariaDB) IsWaitingForStorageResize() bool

IsResizingStorage indicates whether the MariaDB instance is waiting for storage resize

func (*MariaDB) MaxScaleKey added in v0.0.25

func (m *MariaDB) MaxScaleKey() types.NamespacedName

MaxScaleKey defines the key for the MaxScale resource.

func (*MariaDB) MetricsConfigSecretKeyRef added in v0.0.24

func (m *MariaDB) MetricsConfigSecretKeyRef() corev1.SecretKeySelector

MetricsConfigSecretKeyRef defines the key selector for the metrics Secret configuration

func (*MariaDB) MetricsKey added in v0.0.24

func (m *MariaDB) MetricsKey() types.NamespacedName

MetricsKey defines the key for the metrics related resources

func (*MariaDB) MetricsPasswordSecretKeyRef added in v0.0.24

func (m *MariaDB) MetricsPasswordSecretKeyRef() corev1.SecretKeySelector

MetricsPasswordSecretKeyRef defines the key selector for for the password to be used by the metrics user

func (*MariaDB) MyCnfConfigMapKeyRef added in v0.0.24

func (m *MariaDB) MyCnfConfigMapKeyRef() corev1.ConfigMapKeySelector

MyCnfConfigMapKeyRef defines the key selector for the my.cnf ConfigMap.

func (*MariaDB) PVCKey added in v0.0.26

func (m *MariaDB) PVCKey(name string, index int) types.NamespacedName

PVCKey defines the PVC keys.

func (*MariaDB) PasswordSecretKeyRef added in v0.0.24

func (m *MariaDB) PasswordSecretKeyRef() corev1.SecretKeySelector

PasswordSecretKeyRef defines the key selector for the initial user password Secret.

func (*MariaDB) PrimaryConnectioneKey added in v0.0.24

func (m *MariaDB) PrimaryConnectioneKey() types.NamespacedName

PrimaryConnectioneKey defines the key for the primary Connection

func (*MariaDB) PrimaryServiceKey added in v0.0.24

func (m *MariaDB) PrimaryServiceKey() types.NamespacedName

PrimaryServiceKey defines the key for the primary Service

func (*MariaDB) ReplConfigMapKeyRef added in v0.0.25

func (m *MariaDB) ReplConfigMapKeyRef() corev1.ConfigMapKeySelector

ConfigMapKeySelector defines the key selector for the ConfigMap used for replication healthchecks.

func (*MariaDB) Replication added in v0.0.20

func (m *MariaDB) Replication() Replication

Replication with defaulting accessor

func (*MariaDB) RestoreKey added in v0.0.24

func (m *MariaDB) RestoreKey() types.NamespacedName

RestoreKey defines the key for the Restore resource used to bootstrap.

func (*MariaDB) RootPasswordSecretKeyRef added in v0.0.24

func (m *MariaDB) RootPasswordSecretKeyRef() corev1.SecretKeySelector

RootPasswordSecretKeyRef defines the key selector for the root password Secret.

func (*MariaDB) SecondaryConnectioneKey added in v0.0.24

func (m *MariaDB) SecondaryConnectioneKey() types.NamespacedName

SecondaryConnectioneKey defines the key for the secondary Connection

func (*MariaDB) SecondaryServiceKey added in v0.0.24

func (m *MariaDB) SecondaryServiceKey() types.NamespacedName

SecondaryServiceKey defines the key for the secondary Service

func (*MariaDB) SetDefaults added in v0.0.24

func (m *MariaDB) SetDefaults(env *environment.OperatorEnv)

SetDefaults sets reasonable defaults.

func (*MariaDB) SetupWebhookWithManager

func (r *MariaDB) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*MariaDB) ValidateCreate

func (r *MariaDB) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*MariaDB) ValidateDelete

func (r *MariaDB) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*MariaDB) ValidateUpdate

func (r *MariaDB) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type MariaDBList

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

MariaDBList contains a list of MariaDB

func (*MariaDBList) DeepCopy

func (in *MariaDBList) DeepCopy() *MariaDBList

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

func (*MariaDBList) DeepCopyInto

func (in *MariaDBList) DeepCopyInto(out *MariaDBList)

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

func (*MariaDBList) DeepCopyObject

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

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

type MariaDBMaxScaleSpec added in v0.0.25

type MariaDBMaxScaleSpec struct {
	// Enabled is a flag to enable a MaxScale instance to be used with the current MariaDB.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
	Enabled bool `json:"enabled,omitempty"`
	// ContainerTemplate defines templates to configure Container objects.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ContainerTemplate `json:",inline"`
	// PodTemplate defines templates to configure Pod objects.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PodTemplate `json:",inline"`
	// Image name to be used by the MaxScale instances. The supported format is `<image>:<tag>`.
	// Only MaxScale official images are supported.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced"}
	Image string `json:"image,omitempty"`
	// ImagePullPolicy is the image pull policy. One of `Always`, `Never` or `IfNotPresent`. If not defined, it defaults to `IfNotPresent`.
	// +optional
	// +kubebuilder:validation:Enum=Always;Never;IfNotPresent
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:imagePullPolicy","urn:alm:descriptor:com.tectonic.ui:advanced"}
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
	// ImagePullSecrets is the list of pull Secrets to be used to pull the image.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty" webhook:"inmutable"`
	// Services define how the traffic is forwarded to the MariaDB servers.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Services []MaxScaleService `json:"services,omitempty"`
	// Monitor monitors MariaDB server instances.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Monitor *MaxScaleMonitor `json:"monitor,omitempty"`
	// Admin configures the admin REST API and GUI.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Admin *MaxScaleAdmin `json:"admin,omitempty"`
	// Config defines the MaxScale configuration.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Config *MaxScaleConfig `json:"config,omitempty"`
	// Auth defines the credentials required for MaxScale to connect to MariaDB.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Auth *MaxScaleAuth `json:"auth,omitempty"`
	// Connection provides a template to define the Connection for MaxScale.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Connection *ConnectionTemplate `json:"connection,omitempty"`
	// Replicas indicates the number of desired instances.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:podCount"}
	Replicas *int32 `json:"replicas,omitempty"`
	// PodDisruptionBudget defines the budget for replica availability.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PodDisruptionBudget *PodDisruptionBudget `json:"podDisruptionBudget,omitempty"`
	// UpdateStrategy defines the update strategy for the StatefulSet object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:updateStrategy"}
	UpdateStrategy *appsv1.StatefulSetUpdateStrategy `json:"updateStrategy,omitempty"`
	// Service defines templates to configure the Kubernetes Service object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	KubernetesService *ServiceTemplate `json:"kubernetesService,omitempty"`
	// RequeueInterval is used to perform requeue reconcilizations.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	RequeueInterval *metav1.Duration `json:"requeueInterval,omitempty"`
}

MariaDBMaxScaleSpec defines a MaxScale resources to be used with the current MariaDB.

func (*MariaDBMaxScaleSpec) DeepCopy added in v0.0.25

func (in *MariaDBMaxScaleSpec) DeepCopy() *MariaDBMaxScaleSpec

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

func (*MariaDBMaxScaleSpec) DeepCopyInto added in v0.0.25

func (in *MariaDBMaxScaleSpec) DeepCopyInto(out *MariaDBMaxScaleSpec)

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

type MariaDBRef

type MariaDBRef struct {
	// ObjectReference is a reference to a object.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	corev1.ObjectReference `json:",inline"`
	// WaitForIt indicates whether the controller using this reference should wait for MariaDB to be ready.
	// +optional
	// +kubebuilder:default=true
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	WaitForIt bool `json:"waitForIt"`
}

MariaDBRef is a reference to a MariaDB object.

func (*MariaDBRef) DeepCopy

func (in *MariaDBRef) DeepCopy() *MariaDBRef

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

func (*MariaDBRef) DeepCopyInto

func (in *MariaDBRef) DeepCopyInto(out *MariaDBRef)

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

type MariaDBSpec

type MariaDBSpec struct {
	// ContainerTemplate defines templates to configure Container objects.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ContainerTemplate `json:",inline"`
	// PodTemplate defines templates to configure Pod objects.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PodTemplate `json:",inline"`
	// Image name to be used by the MariaDB instances. The supported format is `<image>:<tag>`.
	// Only MariaDB official images are supported.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced"}
	Image string `json:"image,omitempty"`
	// ImagePullPolicy is the image pull policy. One of `Always`, `Never` or `IfNotPresent`. If not defined, it defaults to `IfNotPresent`.
	// +optional
	// +kubebuilder:validation:Enum=Always;Never;IfNotPresent
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:imagePullPolicy","urn:alm:descriptor:com.tectonic.ui:advanced"}
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
	// ImagePullSecrets is the list of pull Secrets to be used to pull the image.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty" webhook:"inmutable"`
	// InheritMetadata defines the metadata to be inherited by children resources.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	InheritMetadata *Metadata `json:"inheritMetadata,omitempty"`
	// PodAnnotations to add to the Pods metadata.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PodAnnotations map[string]string `json:"podAnnotations,omitempty"`
	// RootPasswordSecretKeyRef is a reference to a Secret key containing the root password.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced"}
	RootPasswordSecretKeyRef corev1.SecretKeySelector `json:"rootPasswordSecretKeyRef,omitempty" webhook:"inmutableinit"`
	// RootEmptyPassword indicates if the root password should be empty.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced"}
	RootEmptyPassword *bool `json:"rootEmptyPassword,omitempty" webhook:"inmutableinit"`
	// Database is the database to be created on bootstrap.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Database *string `json:"database,omitempty" webhook:"inmutable"`
	// Username is the username of the user to be created on bootstrap.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Username *string `json:"username,omitempty" webhook:"inmutable"`
	// PasswordSecretKeyRef is a reference to the password of the initial user provided via a Secret.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PasswordSecretKeyRef *corev1.SecretKeySelector `json:"passwordSecretKeyRef,omitempty" webhook:"inmutableinit"`
	// MyCnf allows to specify the my.cnf file mounted by Mariadb.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MyCnf *string `json:"myCnf,omitempty" webhook:"inmutable"`
	// MyCnfConfigMapKeyRef is a reference to the my.cnf config file provided via a ConfigMap.
	// If not provided, it will be defaulted with reference to a ConfigMap with the contents of the MyCnf field.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MyCnfConfigMapKeyRef *corev1.ConfigMapKeySelector `json:"myCnfConfigMapKeyRef,omitempty" webhook:"inmutableinit"`
	// BootstrapFrom defines a source to bootstrap from.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	BootstrapFrom *RestoreSource `json:"bootstrapFrom,omitempty"`
	// Storage defines the storage options to be used for provisioning the PVCs mounted by MariaDB.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Storage Storage `json:"storage"`
	// Metrics configures metrics and how to scrape them.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Metrics *Metrics `json:"metrics,omitempty"`
	// Replication configures high availability via replication.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Replication *Replication `json:"replication,omitempty"`
	// Replication configures high availability via Galera.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Galera *Galera `json:"galera,omitempty"`
	// MaxScaleRef is a reference to a MaxScale resource to be used with the current MariaDB.
	// Providing this field implies delegating high availability tasks such as primary failover to MaxScale.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MaxScaleRef *corev1.ObjectReference `json:"maxScaleRef,omitempty"`
	// MaxScale is the MaxScale specification that defines the MaxScale resource to be used with the current MariaDB.
	// When enabling this field, MaxScaleRef is automatically set.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MaxScale *MariaDBMaxScaleSpec `json:"maxScale,omitempty"`
	// Replicas indicates the number of desired instances.
	// +kubebuilder:default=1
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:podCount"}
	Replicas int32 `json:"replicas,omitempty"`
	// Port where the instances will be listening for connections.
	// +optional
	// +kubebuilder:default=3306
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number","urn:alm:descriptor:com.tectonic.ui:advanced"}
	Port int32 `json:"port,omitempty"`
	// PodDisruptionBudget defines the budget for replica availability.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PodDisruptionBudget *PodDisruptionBudget `json:"podDisruptionBudget,omitempty"`
	// PodDisruptionBudget defines the update strategy for the StatefulSet object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:updateStrategy"}
	UpdateStrategy *appsv1.StatefulSetUpdateStrategy `json:"updateStrategy,omitempty"`
	// Service defines templates to configure the general Service object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Service *ServiceTemplate `json:"service,omitempty"`
	// Connection defines templates to configure the general Connection object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Connection *ConnectionTemplate `json:"connection,omitempty" webhook:"inmutable"`
	// PrimaryService defines templates to configure the primary Service object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PrimaryService *ServiceTemplate `json:"primaryService,omitempty"`
	// PrimaryConnection defines templates to configure the primary Connection object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PrimaryConnection *ConnectionTemplate `json:"primaryConnection,omitempty" webhook:"inmutable"`
	// SecondaryService defines templates to configure the secondary Service object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	SecondaryService *ServiceTemplate `json:"secondaryService,omitempty"`
	// SecondaryConnection defines templates to configure the secondary Connection object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	SecondaryConnection *ConnectionTemplate `json:"secondaryConnection,omitempty" webhook:"inmutable"`
}

MariaDBSpec defines the desired state of MariaDB

func (*MariaDBSpec) DeepCopy

func (in *MariaDBSpec) DeepCopy() *MariaDBSpec

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

func (*MariaDBSpec) DeepCopyInto

func (in *MariaDBSpec) DeepCopyInto(out *MariaDBSpec)

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

type MariaDBStatus

type MariaDBStatus struct {
	// Conditions for the Mariadb object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors={"urn:alm:descriptor:io.kubernetes.conditions"}
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	// Replicas indicates the number of current instances.
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:podCount"}
	Replicas int32 `json:"replicas,omitempty"`
	// CurrentPrimaryPodIndex is the primary Pod index.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	CurrentPrimaryPodIndex *int `json:"currentPrimaryPodIndex,omitempty"`
	// CurrentPrimary is the primary Pod.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors={"urn:alm:descriptor:io.kubernetes:Pod"}
	CurrentPrimary *string `json:"currentPrimary,omitempty"`
	// GaleraRecovery is the Galera recovery current state.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	GaleraRecovery *GaleraRecoveryStatus `json:"galeraRecovery,omitempty"`
	// ReplicationStatus is the replication current state for each Pod.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	ReplicationStatus ReplicationStatus `json:"replicationStatus,omitempty"`
}

MariaDBStatus defines the observed state of MariaDB

func (*MariaDBStatus) DeepCopy

func (in *MariaDBStatus) DeepCopy() *MariaDBStatus

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

func (*MariaDBStatus) DeepCopyInto

func (in *MariaDBStatus) DeepCopyInto(out *MariaDBStatus)

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

func (*MariaDBStatus) SetCondition

func (s *MariaDBStatus) SetCondition(condition metav1.Condition)

SetCondition sets a status condition to MariaDB

func (*MariaDBStatus) UpdateCurrentPrimary added in v0.0.12

func (s *MariaDBStatus) UpdateCurrentPrimary(mariadb *MariaDB, index int)

UpdateCurrentPrimary updates the current primary status.

type MaxScale added in v0.0.25

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

	Spec   MaxScaleSpec   `json:"spec,omitempty"`
	Status MaxScaleStatus `json:"status,omitempty"`
}

MaxScale is the Schema for the maxscales API. It is used to define MaxScale clusters.

func (*MaxScale) APIUrl added in v0.0.25

func (m *MaxScale) APIUrl() string

APIUrl returns the URL of the admin API pointing to the Kubernetes Service.

func (*MaxScale) AdminPasswordSecretKeyRef added in v0.0.25

func (m *MaxScale) AdminPasswordSecretKeyRef() corev1.SecretKeySelector

AdminPasswordSecretKeyRef defines the Secret key selector for the admin password

func (*MaxScale) AuthClientPasswordSecretKeyRef added in v0.0.25

func (m *MaxScale) AuthClientPasswordSecretKeyRef() corev1.SecretKeySelector

AuthClientPasswordSecretKeyRef defines the Secret key selector for the client password

func (*MaxScale) AuthClientUserKey added in v0.0.25

func (m *MaxScale) AuthClientUserKey() corev1.LocalObjectReference

AuthClientUserKey defines the key for the client User

func (*MaxScale) AuthMonitorPasswordSecretKeyRef added in v0.0.25

func (m *MaxScale) AuthMonitorPasswordSecretKeyRef() corev1.SecretKeySelector

AuthClientPasswordSecretKeyRef defines the Secret key selector for the monitor password

func (*MaxScale) AuthMonitorUserKey added in v0.0.25

func (m *MaxScale) AuthMonitorUserKey() corev1.LocalObjectReference

AuthClientUserKey defines the key for the monitor User

func (*MaxScale) AuthServerPasswordSecretKeyRef added in v0.0.25

func (m *MaxScale) AuthServerPasswordSecretKeyRef() corev1.SecretKeySelector

AuthClientPasswordSecretKeyRef defines the Secret key selector for the server password

func (*MaxScale) AuthServerUserKey added in v0.0.25

func (m *MaxScale) AuthServerUserKey() corev1.LocalObjectReference

AuthClientUserKey defines the key for the monitor User

func (*MaxScale) AuthSyncPasswordSecretKeyRef added in v0.0.25

func (m *MaxScale) AuthSyncPasswordSecretKeyRef() corev1.SecretKeySelector

AuthSyncPasswordSecretKeyRef defines the Secret key selector for the config sync password

func (*MaxScale) AuthSyncUserKey added in v0.0.25

func (m *MaxScale) AuthSyncUserKey() corev1.LocalObjectReference

AuthSyncUserKey defines the key for the config sync User

func (*MaxScale) ConfigSecretKeyRef added in v0.0.25

func (m *MaxScale) ConfigSecretKeyRef() corev1.SecretKeySelector

ConfigSecretKeyRef defines the Secret key selector for the configuration

func (*MaxScale) ConnectionKey added in v0.0.25

func (m *MaxScale) ConnectionKey() types.NamespacedName

ConnectionKey defines the key for the Connection

func (*MaxScale) DeepCopy added in v0.0.25

func (in *MaxScale) DeepCopy() *MaxScale

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

func (*MaxScale) DeepCopyInto added in v0.0.25

func (in *MaxScale) DeepCopyInto(out *MaxScale)

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

func (*MaxScale) DeepCopyObject added in v0.0.25

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

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

func (*MaxScale) DefaultPort added in v0.0.25

func (m *MaxScale) DefaultPort() (*int32, error)

DefaultPort returns the default port.

func (*MaxScale) InternalServiceKey added in v0.0.25

func (m *MaxScale) InternalServiceKey() types.NamespacedName

InternalServiceKey defines the key for the internal headless Service

func (*MaxScale) IsHAEnabled added in v0.0.25

func (m *MaxScale) IsHAEnabled() bool

IsHAEnabled indicated whether high availability is enabled.

func (*MaxScale) IsReady added in v0.0.25

func (m *MaxScale) IsReady() bool

IsReady indicates whether the Maxscale instance is ready.

func (*MaxScale) ListenerIDs added in v0.0.25

func (m *MaxScale) ListenerIDs() []string

ListenerIDs returns the IDs of the listeners.

func (*MaxScale) ListenerIndex added in v0.0.25

func (m *MaxScale) ListenerIndex() ds.Index[MaxScaleListener]

ListenerIndex returns the listeners indexed by ID.

func (*MaxScale) Listeners added in v0.0.25

func (m *MaxScale) Listeners() []MaxScaleListener

Listeners returns the listeners

func (*MaxScale) PodAPIUrl added in v0.0.25

func (m *MaxScale) PodAPIUrl(podIndex int) string

PodAPIUrl returns the URL of the admin API pointing to a Pod.

func (*MaxScale) ServerIDs added in v0.0.25

func (m *MaxScale) ServerIDs() []string

ServerIDs returns the IDs of the servers.

func (*MaxScale) ServerIndex added in v0.0.25

func (m *MaxScale) ServerIndex() ds.Index[MaxScaleServer]

ServerIDs returns the servers indexed by ID.

func (*MaxScale) ServiceForListener added in v0.0.25

func (m *MaxScale) ServiceForListener(listener string) (string, error)

ServiceForListener finds the service for a given listener

func (*MaxScale) ServiceIDs added in v0.0.25

func (m *MaxScale) ServiceIDs() []string

ServiceIDs returns the IDs of the services.

func (*MaxScale) ServiceIndex added in v0.0.25

func (m *MaxScale) ServiceIndex() ds.Index[MaxScaleService]

ServiceIndex returns the services indexed by ID.

func (*MaxScale) SetDefaults added in v0.0.25

func (m *MaxScale) SetDefaults(env *environment.OperatorEnv)

SetDefaults sets default values.

func (*MaxScale) SetupWebhookWithManager added in v0.0.25

func (r *MaxScale) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*MaxScale) ValidateCreate added in v0.0.25

func (r *MaxScale) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*MaxScale) ValidateDelete added in v0.0.25

func (r *MaxScale) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*MaxScale) ValidateUpdate added in v0.0.25

func (r *MaxScale) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type MaxScaleAdmin added in v0.0.25

type MaxScaleAdmin struct {
	// Port where the admin REST API and GUI will be exposed.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"}
	Port int32 `json:"port"`
	// GuiEnabled indicates whether the admin GUI should be enabled.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	GuiEnabled *bool `json:"guiEnabled,omitempty"`
}

MaxScaleAdmin configures the admin REST API and GUI.

func (*MaxScaleAdmin) DeepCopy added in v0.0.25

func (in *MaxScaleAdmin) DeepCopy() *MaxScaleAdmin

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

func (*MaxScaleAdmin) DeepCopyInto added in v0.0.25

func (in *MaxScaleAdmin) DeepCopyInto(out *MaxScaleAdmin)

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

func (*MaxScaleAdmin) SetDefaults added in v0.0.25

func (m *MaxScaleAdmin) SetDefaults(mxs *MaxScale)

SetDefaults sets default values.

type MaxScaleAuth added in v0.0.25

type MaxScaleAuth struct {
	// Generate  defies whether the operator should generate users and grants for MaxScale to work.
	// It only supports MariaDBs specified via spec.mariaDbRef.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Generate *bool `json:"generate,omitempty" webhook:"inmutableinit"`
	// AdminUsername is an admin username to call the admin REST API. It is defaulted if not provided.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	AdminUsername string `json:"adminUsername,omitempty" webhook:"inmutableinit"`
	// AdminPasswordSecretKeyRef is Secret key reference to the admin password to call the admib REST API. It is defaulted if not provided.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	AdminPasswordSecretKeyRef corev1.SecretKeySelector `json:"adminPasswordSecretKeyRef,omitempty" webhook:"inmutableinit"`
	// DeleteDefaultAdmin determines whether the default admin user should be deleted after the initial configuration. If not provided, it defaults to true.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	DeleteDefaultAdmin *bool `json:"deleteDefaultAdmin,omitempty" webhook:"inmutableinit"`
	// ClientUsername is the user to connect to MaxScale. It is defaulted if not provided.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ClientUsername string `json:"clientUsername,omitempty" webhook:"inmutableinit"`
	// ClientPasswordSecretKeyRef is Secret key reference to the password to connect to MaxScale. It is defaulted if not provided.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ClientPasswordSecretKeyRef corev1.SecretKeySelector `json:"clientPasswordSecretKeyRef,omitempty" webhook:"inmutableinit"`
	// ClientMaxConnections defines the maximum number of connections that the client can establish.
	// If HA is enabled, make sure to increase this value, as more MaxScale replicas implies more connections.
	// It defaults to 30 times the number of MaxScale replicas.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"}
	ClientMaxConnections int32 `json:"clientMaxConnections,omitempty" webhook:"inmutableinit"`
	// ServerUsername is the user used by MaxScale to connect to MariaDB server. It is defaulted if not provided.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ServerUsername string `json:"serverUsername,omitempty" webhook:"inmutableinit"`
	// ServerPasswordSecretKeyRef is Secret key reference to the password used by MaxScale to connect to MariaDB server. It is defaulted if not provided.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ServerPasswordSecretKeyRef corev1.SecretKeySelector `json:"serverPasswordSecretKeyRef,omitempty" webhook:"inmutableinit"`
	// ServerMaxConnections defines the maximum number of connections that the server can establish.
	// If HA is enabled, make sure to increase this value, as more MaxScale replicas implies more connections.
	// It defaults to 30 times the number of MaxScale replicas.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"}
	ServerMaxConnections int32 `json:"serverMaxConnections,omitempty" webhook:"inmutableinit"`
	// MonitorUsername is the user used by MaxScale monitor to connect to MariaDB server. It is defaulted if not provided.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MonitorUsername string `json:"monitorUsername,omitempty" webhook:"inmutableinit"`
	// MonitorPasswordSecretKeyRef is Secret key reference to the password used by MaxScale monitor to connect to MariaDB server. It is defaulted if not provided.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MonitorPasswordSecretKeyRef corev1.SecretKeySelector `json:"monitorPasswordSecretKeyRef,omitempty" webhook:"inmutableinit"`
	// MonitorMaxConnections defines the maximum number of connections that the monitor can establish.
	// If HA is enabled, make sure to increase this value, as more MaxScale replicas implies more connections.
	// It defaults to 30 times the number of MaxScale replicas.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"}
	MonitorMaxConnections int32 `json:"monitorMaxConnections,omitempty" webhook:"inmutableinit"`
	// MonitoSyncUsernamerUsername is the user used by MaxScale config sync to connect to MariaDB server. It is defaulted when HA is enabled.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	SyncUsername *string `json:"syncUsername,omitempty" webhook:"inmutableinit"`
	// SyncPasswordSecretKeyRef is Secret key reference to the password used by MaxScale config to connect to MariaDB server. It is defaulted when HA is enabled.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	SyncPasswordSecretKeyRef *corev1.SecretKeySelector `json:"syncPasswordSecretKeyRef,omitempty" webhook:"inmutableinit"`
	// SyncMaxConnections defines the maximum number of connections that the sync can establish.
	// If HA is enabled, make sure to increase this value, as more MaxScale replicas implies more connections.
	// It defaults to 30 times the number of MaxScale replicas.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"}
	SyncMaxConnections *int32 `json:"syncMaxConnections,omitempty" webhook:"inmutableinit"`
}

MaxScaleAuth defines the credentials required for MaxScale to connect to MariaDB.

func (*MaxScaleAuth) DeepCopy added in v0.0.25

func (in *MaxScaleAuth) DeepCopy() *MaxScaleAuth

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

func (*MaxScaleAuth) DeepCopyInto added in v0.0.25

func (in *MaxScaleAuth) DeepCopyInto(out *MaxScaleAuth)

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

func (*MaxScaleAuth) SetDefaults added in v0.0.25

func (m *MaxScaleAuth) SetDefaults(mxs *MaxScale)

SetDefaults sets default values.

type MaxScaleConfig added in v0.0.25

type MaxScaleConfig struct {
	// Params is a key value pair of parameters to be used in the MaxScale static configuration file.
	// Any parameter supported by MaxScale may be specified here. See reference:
	// https://mariadb.com/kb/en/mariadb-maxscale-2308-mariadb-maxscale-configuration-guide/#global-settings.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Params map[string]string `json:"params,omitempty"`
	// VolumeClaimTemplate provides a template to define the PVCs for storing MaxScale runtime configuration files. It is defaulted if not provided.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	VolumeClaimTemplate VolumeClaimTemplate `json:"volumeClaimTemplate"`
	// Sync defines how to replicate configuration across MaxScale replicas. It is defaulted when HA is enabled.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Sync *MaxScaleConfigSync `json:"sync,omitempty"`
}

MaxScaleConfig defines the MaxScale configuration.

func (*MaxScaleConfig) DeepCopy added in v0.0.25

func (in *MaxScaleConfig) DeepCopy() *MaxScaleConfig

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

func (*MaxScaleConfig) DeepCopyInto added in v0.0.25

func (in *MaxScaleConfig) DeepCopyInto(out *MaxScaleConfig)

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

func (*MaxScaleConfig) SetDefaults added in v0.0.25

func (m *MaxScaleConfig) SetDefaults(mxs *MaxScale)

type MaxScaleConfigSync added in v0.0.25

type MaxScaleConfigSync struct {
	// Database is the MariaDB logical database where the 'maxscale_config' table will be created in order to persist and synchronize config changes. If not provided, it defaults to 'mysql'.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Database string `json:"database,omitempty"`
	// Interval defines the config synchronization interval. It is defaulted if not provided.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Interval metav1.Duration `json:"interval,omitempty"`
	// Interval defines the config synchronization timeout. It is defaulted if not provided.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Timeout metav1.Duration `json:"timeout,omitempty"`
}

MaxScaleConfigSync defines how the config changes are replicated across replicas.

func (*MaxScaleConfigSync) DeepCopy added in v0.0.25

func (in *MaxScaleConfigSync) DeepCopy() *MaxScaleConfigSync

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

func (*MaxScaleConfigSync) DeepCopyInto added in v0.0.25

func (in *MaxScaleConfigSync) DeepCopyInto(out *MaxScaleConfigSync)

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

type MaxScaleConfigSyncStatus added in v0.0.25

type MaxScaleConfigSyncStatus struct {
	MaxScaleVersion int `json:"maxScaleVersion"`
	DatabaseVersion int `json:"databaseVersion"`
}

func (*MaxScaleConfigSyncStatus) DeepCopy added in v0.0.25

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

func (*MaxScaleConfigSyncStatus) DeepCopyInto added in v0.0.25

func (in *MaxScaleConfigSyncStatus) DeepCopyInto(out *MaxScaleConfigSyncStatus)

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

type MaxScaleList added in v0.0.25

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

MaxScaleList contains a list of MaxScale

func (*MaxScaleList) DeepCopy added in v0.0.25

func (in *MaxScaleList) DeepCopy() *MaxScaleList

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

func (*MaxScaleList) DeepCopyInto added in v0.0.25

func (in *MaxScaleList) DeepCopyInto(out *MaxScaleList)

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

func (*MaxScaleList) DeepCopyObject added in v0.0.25

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

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

type MaxScaleListener added in v0.0.25

type MaxScaleListener struct {
	SuspendTemplate `json:",inline"`
	// Name is the identifier of the listener. It is defaulted if not provided
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Name string `json:"name"`
	// Port is the network port where the MaxScale server will listen.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"}
	Port int32 `json:"port,omitempty" webhook:"inmutable"`
	// Protocol is the MaxScale protocol to use when communicating with the client. If not provided, it defaults to MariaDBProtocol.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Protocol string `json:"protocol,omitempty"`
	// Params defines extra parameters to pass to the listener.
	// Any parameter supported by MaxScale may be specified here. See reference:
	// https://mariadb.com/kb/en/mariadb-maxscale-2308-mariadb-maxscale-configuration-guide/#listener_1.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Params map[string]string `json:"params,omitempty"`
}

MaxScaleListener defines how the MaxScale server will listen for connections.

func (*MaxScaleListener) DeepCopy added in v0.0.25

func (in *MaxScaleListener) DeepCopy() *MaxScaleListener

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

func (*MaxScaleListener) DeepCopyInto added in v0.0.25

func (in *MaxScaleListener) DeepCopyInto(out *MaxScaleListener)

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

func (*MaxScaleListener) SetDefaults added in v0.0.25

func (m *MaxScaleListener) SetDefaults(svc *MaxScaleService)

SetDefaults sets default values.

type MaxScaleMonitor added in v0.0.25

type MaxScaleMonitor struct {
	SuspendTemplate `json:",inline"`
	// Name is the identifier of the monitor. It is defaulted if not provided.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Name string `json:"name"`
	// Module is the module to use to monitor MariaDB servers. It is mandatory when no MariaDB reference is provided.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Module MonitorModule `json:"module" webhook:"inmutableinit"`
	// Interval used to monitor MariaDB servers. It is defaulted if not provided.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Interval metav1.Duration `json:"interval,omitempty"`
	// CooperativeMonitoring enables coordination between multiple MaxScale instances running monitors. It is defaulted when HA is enabled.
	// +optional
	// +kubebuilder:validation:Enum=majority_of_all;majority_of_running
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	CooperativeMonitoring *CooperativeMonitoring `json:"cooperativeMonitoring,omitempty"`
	// Params defines extra parameters to pass to the monitor.
	// Any parameter supported by MaxScale may be specified here. See reference:
	// https://mariadb.com/kb/en/mariadb-maxscale-2308-common-monitor-parameters/.
	// Monitor specific parameter are also suported:
	// https://mariadb.com/kb/en/mariadb-maxscale-2308-galera-monitor/#galera-monitor-optional-parameters.
	// https://mariadb.com/kb/en/mariadb-maxscale-2308-mariadb-monitor/#configuration.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Params map[string]string `json:"params,omitempty"`
}

MaxScaleMonitor monitors MariaDB server instances

func (*MaxScaleMonitor) DeepCopy added in v0.0.25

func (in *MaxScaleMonitor) DeepCopy() *MaxScaleMonitor

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

func (*MaxScaleMonitor) DeepCopyInto added in v0.0.25

func (in *MaxScaleMonitor) DeepCopyInto(out *MaxScaleMonitor)

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

func (*MaxScaleMonitor) SetDefaults added in v0.0.25

func (m *MaxScaleMonitor) SetDefaults(mxs *MaxScale)

SetCondition sets a status condition to MaxScale

type MaxScaleResourceStatus added in v0.0.25

type MaxScaleResourceStatus struct {
	Name  string `json:"name"`
	State string `json:"state"`
}

MaxScaleResourceStatus indicates whether the resource is in a given state.

func (*MaxScaleResourceStatus) DeepCopy added in v0.0.25

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

func (*MaxScaleResourceStatus) DeepCopyInto added in v0.0.25

func (in *MaxScaleResourceStatus) DeepCopyInto(out *MaxScaleResourceStatus)

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

type MaxScaleServer added in v0.0.25

type MaxScaleServer struct {
	// Name is the identifier of the MariaDB server.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Name string `json:"name"`
	// Address is the network address of the MariaDB server.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Address string `json:"address"`
	// Port is the network port of the MariaDB server. If not provided, it defaults to 3306.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"}
	Port int32 `json:"port,omitempty"`
	// Protocol is the MaxScale protocol to use when communicating with this MariaDB server. If not provided, it defaults to MariaDBBackend.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Protocol string `json:"protocol,omitempty"`
	// Maintenance indicates whether the server is in maintenance mode.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Maintenance bool `json:"maintenance,omitempty"`
	// Params defines extra parameters to pass to the server.
	// Any parameter supported by MaxScale may be specified here. See reference:
	// https://mariadb.com/kb/en/mariadb-maxscale-2308-mariadb-maxscale-configuration-guide/#server_1.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Params map[string]string `json:"params,omitempty"`
}

MaxScaleServer defines a MariaDB server to forward traffic to.

func (*MaxScaleServer) DeepCopy added in v0.0.25

func (in *MaxScaleServer) DeepCopy() *MaxScaleServer

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

func (*MaxScaleServer) DeepCopyInto added in v0.0.25

func (in *MaxScaleServer) DeepCopyInto(out *MaxScaleServer)

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

func (*MaxScaleServer) SetDefaults added in v0.0.25

func (m *MaxScaleServer) SetDefaults()

SetDefaults sets default values.

type MaxScaleServerStatus added in v0.0.25

type MaxScaleServerStatus struct {
	Name  string `json:"name"`
	State string `json:"state"`
}

MaxScaleAPIStatus is the state of the servers in the MaxScale API.

func (*MaxScaleServerStatus) DeepCopy added in v0.0.25

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

func (*MaxScaleServerStatus) DeepCopyInto added in v0.0.25

func (in *MaxScaleServerStatus) DeepCopyInto(out *MaxScaleServerStatus)

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

func (*MaxScaleServerStatus) InMaintenance added in v0.0.25

func (s *MaxScaleServerStatus) InMaintenance() bool

InMaintenance indicates whether the current server is in maintenance state.

func (*MaxScaleServerStatus) IsMaster added in v0.0.25

func (s *MaxScaleServerStatus) IsMaster() bool

IsMaster indicates whether the current server is in Master state.

func (*MaxScaleServerStatus) IsReady added in v0.0.25

func (s *MaxScaleServerStatus) IsReady() bool

IsReady indicates whether the current server is in ready state.

type MaxScaleService added in v0.0.25

type MaxScaleService struct {
	SuspendTemplate `json:",inline"`
	// Name is the identifier of the MaxScale service.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Name string `json:"name"`
	// Router is the type of router to use.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Enum=readwritesplit;readconnroute
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Router ServiceRouter `json:"router" webhook:"inmutable"`
	// MaxScaleListener defines how the MaxScale server will listen for connections.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Listener MaxScaleListener `json:"listener"`
	// Params defines extra parameters to pass to the monitor.
	// Any parameter supported by MaxScale may be specified here. See reference:
	// https://mariadb.com/kb/en/mariadb-maxscale-2308-mariadb-maxscale-configuration-guide/#service_1.
	// Router specific parameter are also suported:
	// https://mariadb.com/kb/en/mariadb-maxscale-2308-readwritesplit/#configuration.
	// https://mariadb.com/kb/en/mariadb-maxscale-2308-readconnroute/#configuration.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Params map[string]string `json:"params,omitempty"`
}

Services define how the traffic is forwarded to the MariaDB servers.

func (*MaxScaleService) DeepCopy added in v0.0.25

func (in *MaxScaleService) DeepCopy() *MaxScaleService

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

func (*MaxScaleService) DeepCopyInto added in v0.0.25

func (in *MaxScaleService) DeepCopyInto(out *MaxScaleService)

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

func (*MaxScaleService) SetDefaults added in v0.0.25

func (m *MaxScaleService) SetDefaults()

SetDefaults sets default values.

type MaxScaleSpec added in v0.0.25

type MaxScaleSpec struct {
	// ContainerTemplate defines templates to configure Container objects.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ContainerTemplate `json:",inline"`
	// PodTemplate defines templates to configure Pod objects.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PodTemplate `json:",inline"`
	// MariaDBRef is a reference to the MariaDB that MaxScale points to. It is used to initialize the servers field.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MariaDBRef *MariaDBRef `json:"mariaDbRef,omitempty" webhook:"inmutable"`
	// Servers are the MariaDB servers to forward traffic to. It is required if 'spec.mariaDbRef' is not provided.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Servers []MaxScaleServer `json:"servers"`
	// Image name to be used by the MaxScale instances. The supported format is `<image>:<tag>`.
	// Only MaxScale official images are supported.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced"}
	Image string `json:"image,omitempty"`
	// ImagePullPolicy is the image pull policy. One of `Always`, `Never` or `IfNotPresent`. If not defined, it defaults to `IfNotPresent`.
	// +optional
	// +kubebuilder:validation:Enum=Always;Never;IfNotPresent
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:imagePullPolicy","urn:alm:descriptor:com.tectonic.ui:advanced"}
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
	// ImagePullSecrets is the list of pull Secrets to be used to pull the image.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty" webhook:"inmutable"`
	// Services define how the traffic is forwarded to the MariaDB servers. It is defaulted if not provided.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Services []MaxScaleService `json:"services,omitempty"`
	// Monitor monitors MariaDB server instances. It is required if 'spec.mariaDbRef' is not provided.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Monitor MaxScaleMonitor `json:"monitor,omitempty"`
	// Admin configures the admin REST API and GUI.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Admin MaxScaleAdmin `json:"admin,omitempty"`
	// Config defines the MaxScale configuration.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Config MaxScaleConfig `json:"config,omitempty"`
	// Auth defines the credentials required for MaxScale to connect to MariaDB.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Auth MaxScaleAuth `json:"auth,omitempty"`
	// Connection provides a template to define the Connection for MaxScale.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Connection *ConnectionTemplate `json:"connection,omitempty"`
	// Replicas indicates the number of desired instances.
	// +kubebuilder:default=1
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:podCount"}
	Replicas int32 `json:"replicas,omitempty"`
	// PodDisruptionBudget defines the budget for replica availability.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PodDisruptionBudget *PodDisruptionBudget `json:"podDisruptionBudget,omitempty"`
	// UpdateStrategy defines the update strategy for the StatefulSet object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:updateStrategy"}
	UpdateStrategy *appsv1.StatefulSetUpdateStrategy `json:"updateStrategy,omitempty"`
	// Service defines templates to configure the Kubernetes Service object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	KubernetesService *ServiceTemplate `json:"kubernetesService,omitempty"`
	// RequeueInterval is used to perform requeue reconcilizations. If not defined, it defaults to 10s.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	RequeueInterval *metav1.Duration `json:"requeueInterval,omitempty"`
}

MaxScaleSpec defines the desired state of MaxScale.

func (*MaxScaleSpec) DeepCopy added in v0.0.25

func (in *MaxScaleSpec) DeepCopy() *MaxScaleSpec

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

func (*MaxScaleSpec) DeepCopyInto added in v0.0.25

func (in *MaxScaleSpec) DeepCopyInto(out *MaxScaleSpec)

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

type MaxScaleStatus added in v0.0.25

type MaxScaleStatus struct {
	// Conditions for the MaxScale object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors={"urn:alm:descriptor:io.kubernetes.conditions"}
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	// Replicas indicates the number of current instances.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:podCount"}
	Replicas int32 `json:"replicas,omitempty"`
	// PrimaryServer is the primary server in the MaxScale API.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	PrimaryServer *string `json:"primaryServer,omitempty"`
	// Servers is the state of the servers in the MaxScale API.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Servers []MaxScaleServerStatus `json:"servers,omitempty"`
	// Monitor is the state of the monitor in the MaxScale API.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Monitor *MaxScaleResourceStatus `json:"monitor,omitempty"`
	// Services is the state of the services in the MaxScale API.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Services []MaxScaleResourceStatus `json:"services,omitempty"`
	// Listeners is the state of the listeners in the MaxScale API.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Listeners []MaxScaleResourceStatus `json:"listeners,omitempty"`
	// ConfigSync is the state of config sync.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	ConfigSync *MaxScaleConfigSyncStatus `json:"configSync,omitempty"`
}

MaxScaleStatus defines the observed state of MaxScale

func (*MaxScaleStatus) DeepCopy added in v0.0.25

func (in *MaxScaleStatus) DeepCopy() *MaxScaleStatus

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

func (*MaxScaleStatus) DeepCopyInto added in v0.0.25

func (in *MaxScaleStatus) DeepCopyInto(out *MaxScaleStatus)

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

func (*MaxScaleStatus) GetPrimaryServer added in v0.0.25

func (s *MaxScaleStatus) GetPrimaryServer() *string

GetPrimaryServer obtains the current primary server.

func (*MaxScaleStatus) SetCondition added in v0.0.25

func (s *MaxScaleStatus) SetCondition(condition metav1.Condition)

SetCondition sets a status condition to MaxScale

type Metadata added in v0.0.27

type Metadata struct {
	// Labels to be added to children resources.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations to be added to children resources.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Annotations map[string]string `json:"annotations,omitempty"`
}

Metadata defines the metadata to added to resources.

func (*Metadata) DeepCopy added in v0.0.27

func (in *Metadata) DeepCopy() *Metadata

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

func (*Metadata) DeepCopyInto added in v0.0.27

func (in *Metadata) DeepCopyInto(out *Metadata)

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

type Metrics

type Metrics struct {
	// Enabled is a flag to enable Metrics
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
	Enabled bool `json:"enabled,omitempty"`
	// Exporter defines the metrics exporter container.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Exporter Exporter `json:"exporter"`
	// ServiceMonitor defines the ServiceMonior object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ServiceMonitor ServiceMonitor `json:"serviceMonitor"`
	// Username is the username of the monitoring user used by the exporter.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Username string `json:"username,omitempty" webhook:"inmutableinit"`
	// PasswordSecretKeyRef is a reference to the password of the monitoring user used by the exporter.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PasswordSecretKeyRef corev1.SecretKeySelector `json:"passwordSecretKeyRef,omitempty" webhook:"inmutableinit"`
}

Metrics defines the metrics for a MariaDB.

func (*Metrics) DeepCopy

func (in *Metrics) DeepCopy() *Metrics

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

func (*Metrics) DeepCopyInto

func (in *Metrics) DeepCopyInto(out *Metrics)

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

type MonitorModule added in v0.0.25

type MonitorModule string

MonitorModule defines the type of monitor module

const (
	// MonitorModuleMariadb is a monitor to be used with MariaDB servers.
	MonitorModuleMariadb MonitorModule = "mariadbmon"
	// MonitorModuleGalera is a monitor to be used with Galera servers.
	MonitorModuleGalera MonitorModule = "galeramon"
)

func (MonitorModule) Validate added in v0.0.25

func (m MonitorModule) Validate() error

Validate determines whether a MonitorModule is valid.

type PodDisruptionBudget added in v0.0.12

type PodDisruptionBudget struct {
	// MinAvailable defines the number of minimum available Pods.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty"`
	// MaxUnavailable defines the number of maximum unavailable Pods.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
}

PodDisruptionBudget is the Pod availability bundget for a MariaDB

func (*PodDisruptionBudget) DeepCopy added in v0.0.12

func (in *PodDisruptionBudget) DeepCopy() *PodDisruptionBudget

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

func (*PodDisruptionBudget) DeepCopyInto added in v0.0.12

func (in *PodDisruptionBudget) DeepCopyInto(out *PodDisruptionBudget)

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

func (*PodDisruptionBudget) Validate added in v0.0.12

func (p *PodDisruptionBudget) Validate() error

type PodTemplate added in v0.0.20

type PodTemplate struct {
	// InitContainers to be used in the Pod.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	InitContainers []Container `json:"initContainers,omitempty"`
	// SidecarContainers to be used in the Pod.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	SidecarContainers []Container `json:"sidecarContainers,omitempty"`
	// SecurityContext holds pod-level security attributes and common container settings.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`
	// ServiceAccountName is the name of the ServiceAccount to be used by the Pods.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ServiceAccountName *string `json:"serviceAccountName,omitempty" webhook:"inmutableinit"`
	// Affinity to be used in the Pod.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Affinity *AffinityConfig `json:"affinity,omitempty"`
	// NodeSelector to be used in the Pod.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// Tolerations to be used in the Pod.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
	// Volumes to be used in the Pod.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Volumes []corev1.Volume `json:"volumes,omitempty" webhook:"inmutable"`
	// PriorityClassName to be used in the Pod.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PriorityClassName *string `json:"priorityClassName,omitempty" webhook:"inmutable"`
	// TopologySpreadConstraints to be used in the Pod.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
}

PodTemplate defines a template to configure Container objects.

func (*PodTemplate) DeepCopy added in v0.0.20

func (in *PodTemplate) DeepCopy() *PodTemplate

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

func (*PodTemplate) DeepCopyInto added in v0.0.20

func (in *PodTemplate) DeepCopyInto(out *PodTemplate)

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

func (*PodTemplate) ServiceAccountKey added in v0.0.26

func (p *PodTemplate) ServiceAccountKey(objMeta metav1.ObjectMeta) types.NamespacedName

ServiceAccountKey defines the key for the ServiceAccount object.

func (*PodTemplate) SetDefaults added in v0.0.26

func (p *PodTemplate) SetDefaults(objMeta metav1.ObjectMeta)

SetDefaults sets reasonable defaults.

type PrimaryGalera added in v0.0.20

type PrimaryGalera struct {
	// PodIndex is the StatefulSet index of the primary node. The user may change this field to perform a manual switchover.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PodIndex *int `json:"podIndex,omitempty"`
	// AutomaticFailover indicates whether the operator should automatically update PodIndex to perform an automatic primary failover.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
	AutomaticFailover *bool `json:"automaticFailover,omitempty"`
}

PrimaryGalera is the Galera configuration for the primary node.

func (*PrimaryGalera) DeepCopy added in v0.0.20

func (in *PrimaryGalera) DeepCopy() *PrimaryGalera

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

func (*PrimaryGalera) DeepCopyInto added in v0.0.20

func (in *PrimaryGalera) DeepCopyInto(out *PrimaryGalera)

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

func (*PrimaryGalera) SetDefaults added in v0.0.26

func (r *PrimaryGalera) SetDefaults()

SetDefaults sets reasonable defaults.

type PrimaryReplication added in v0.0.12

type PrimaryReplication struct {
	// PodIndex is the StatefulSet index of the primary node. The user may change this field to perform a manual switchover.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PodIndex *int `json:"podIndex,omitempty"`
	// AutomaticFailover indicates whether the operator should automatically update PodIndex to perform an automatic primary failover.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
	AutomaticFailover *bool `json:"automaticFailover,omitempty"`
}

PrimaryReplication is the replication configuration for the primary node.

func (*PrimaryReplication) DeepCopy added in v0.0.12

func (in *PrimaryReplication) DeepCopy() *PrimaryReplication

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

func (*PrimaryReplication) DeepCopyInto added in v0.0.12

func (in *PrimaryReplication) DeepCopyInto(out *PrimaryReplication)

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

func (*PrimaryReplication) FillWithDefaults added in v0.0.20

func (r *PrimaryReplication) FillWithDefaults()

FillWithDefaults fills the current PrimaryReplication object with DefaultReplicationSpec. This enables having minimal PrimaryReplication objects and provides sensible defaults.

type ReplicaReplication added in v0.0.12

type ReplicaReplication struct {
	// WaitPoint defines whether the transaction should wait for ACK before committing to the storage engine.
	// More info: https://mariadb.com/kb/en/semisynchronous-replication/#rpl_semi_sync_master_wait_point.
	// +optional
	// +kubebuilder:validation:Enum=AfterSync;AfterCommit
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	WaitPoint *WaitPoint `json:"waitPoint,omitempty"`
	// Gtid indicates which Global Transaction ID should be used when connecting a replica to the master.
	// See: https://mariadb.com/kb/en/gtid/#using-current_pos-vs-slave_pos.
	// +optional
	// +kubebuilder:validation:Enum=CurrentPos;SlavePos
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Gtid *Gtid `json:"gtid,omitempty"`
	// ReplPasswordSecretKeyRef provides a reference to the Secret to use as password for the replication user.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ReplPasswordSecretKeyRef *corev1.SecretKeySelector `json:"replPasswordSecretKeyRef,omitempty"`
	// ConnectionTimeout to be used when the replica connects to the primary.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ConnectionTimeout *metav1.Duration `json:"connectionTimeout,omitempty"`
	// ConnectionRetries to be used when the replica connects to the primary.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"}
	ConnectionRetries *int `json:"connectionRetries,omitempty"`
	// SyncTimeout defines the timeout for a replica to be synced with the primary when performing a primary switchover.
	// If the timeout is reached, the replica GTID will be reset and the switchover will continue.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	SyncTimeout *metav1.Duration `json:"syncTimeout,omitempty"`
}

ReplicaReplication is the replication configuration for the replica nodes.

func (*ReplicaReplication) DeepCopy added in v0.0.12

func (in *ReplicaReplication) DeepCopy() *ReplicaReplication

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

func (*ReplicaReplication) DeepCopyInto added in v0.0.12

func (in *ReplicaReplication) DeepCopyInto(out *ReplicaReplication)

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

func (*ReplicaReplication) FillWithDefaults added in v0.0.20

func (r *ReplicaReplication) FillWithDefaults()

FillWithDefaults fills the current ReplicaReplication object with DefaultReplicationSpec. This enables having minimal ReplicaReplication objects and provides sensible defaults.

func (*ReplicaReplication) Validate added in v0.0.12

func (r *ReplicaReplication) Validate() error

Validate returns an error if the ReplicaReplication is not valid.

type Replication added in v0.0.12

type Replication struct {
	// ReplicationSpec is the Replication desired state specification.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ReplicationSpec `json:",inline"`
	// Enabled is a flag to enable Replication.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
	Enabled bool `json:"enabled,omitempty"`
}

Replication allows you to enable single-master HA via semi-synchronours replication in your MariaDB cluster.

func (*Replication) DeepCopy added in v0.0.12

func (in *Replication) DeepCopy() *Replication

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

func (*Replication) DeepCopyInto added in v0.0.12

func (in *Replication) DeepCopyInto(out *Replication)

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

type ReplicationSpec added in v0.0.20

type ReplicationSpec struct {
	// Primary is the replication configuration for the primary node.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Primary *PrimaryReplication `json:"primary,omitempty"`
	// ReplicaReplication is the replication configuration for the replica nodes.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Replica *ReplicaReplication `json:"replica,omitempty"`
	// SyncBinlog indicates whether the binary log should be synchronized to the disk after every event.
	// It trades off performance for consistency.
	// See: https://mariadb.com/kb/en/replication-and-binary-log-system-variables/#sync_binlog.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
	SyncBinlog *bool `json:"syncBinlog,omitempty"`
	// ProbesEnabled indicates to use replication specific liveness and readiness probes.
	// This probes check that the primary can receive queries and that the replica has the replication thread running.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
	ProbesEnabled *bool `json:"probesEnabled,omitempty"`
}

ReplicationSpec is the Replication desired state specification.

func (*ReplicationSpec) DeepCopy added in v0.0.20

func (in *ReplicationSpec) DeepCopy() *ReplicationSpec

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

func (*ReplicationSpec) DeepCopyInto added in v0.0.20

func (in *ReplicationSpec) DeepCopyInto(out *ReplicationSpec)

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

func (*ReplicationSpec) FillWithDefaults added in v0.0.20

func (r *ReplicationSpec) FillWithDefaults()

FillWithDefaults fills the current ReplicationSpec object with DefaultReplicationSpec. This enables having minimal ReplicationSpec objects and provides sensible defaults.

type ReplicationState added in v0.0.25

type ReplicationState string
const (
	ReplicationStateMaster        ReplicationState = "Master"
	ReplicationStateSlave         ReplicationState = "Slave"
	ReplicationStateNotConfigured ReplicationState = "NotConfigured"
)

type ReplicationStatus added in v0.0.25

type ReplicationStatus map[string]ReplicationState

func (ReplicationStatus) DeepCopy added in v0.0.25

func (in ReplicationStatus) DeepCopy() ReplicationStatus

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

func (ReplicationStatus) DeepCopyInto added in v0.0.25

func (in ReplicationStatus) DeepCopyInto(out *ReplicationStatus)

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

func (ReplicationStatus) IsReplicationConfigured added in v0.0.25

func (r ReplicationStatus) IsReplicationConfigured() bool

type Restore

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

	Spec   RestoreSpec   `json:"spec,omitempty"`
	Status RestoreStatus `json:"status,omitempty"`
}

Restore is the Schema for the restores API. It is used to define restore jobs and its restoration source.

func (*Restore) DeepCopy

func (in *Restore) DeepCopy() *Restore

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

func (*Restore) DeepCopyInto

func (in *Restore) DeepCopyInto(out *Restore)

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

func (*Restore) DeepCopyObject

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

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

func (*Restore) IsComplete

func (r *Restore) IsComplete() bool

func (*Restore) SetDefaults added in v0.0.26

func (b *Restore) SetDefaults()

func (*Restore) SetupWebhookWithManager

func (r *Restore) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Restore) ValidateCreate

func (r *Restore) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Restore) ValidateDelete

func (r *Restore) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Restore) ValidateUpdate

func (r *Restore) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type RestoreList

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

RestoreList contains a list of restore

func (*RestoreList) DeepCopy

func (in *RestoreList) DeepCopy() *RestoreList

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

func (*RestoreList) DeepCopyInto

func (in *RestoreList) DeepCopyInto(out *RestoreList)

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

func (*RestoreList) DeepCopyObject

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

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

type RestoreSource

type RestoreSource struct {
	// BackupRef is a reference to a Backup object. It has priority over S3 and Volume.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	BackupRef *corev1.LocalObjectReference `json:"backupRef,omitempty" webhook:"inmutableinit"`
	// S3 defines the configuration to restore backups from a S3 compatible storage. It has priority over Volume.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	S3 *S3 `json:"s3,omitempty" webhook:"inmutableinit"`
	// Volume is a Kubernetes Volume object that contains a backup.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Volume *corev1.VolumeSource `json:"volume,omitempty" webhook:"inmutableinit"`
	// TargetRecoveryTime is a RFC3339 (1970-01-01T00:00:00Z) date and time that defines the point in time recovery objective.
	// It is used to determine the closest restoration source in time.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	TargetRecoveryTime *metav1.Time `json:"targetRecoveryTime,omitempty" webhook:"inmutable"`
}

RestoreSource defines a source for restoring a MariaDB.

func (*RestoreSource) DeepCopy

func (in *RestoreSource) DeepCopy() *RestoreSource

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

func (*RestoreSource) DeepCopyInto

func (in *RestoreSource) DeepCopyInto(out *RestoreSource)

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

func (*RestoreSource) IsDefaulted added in v0.0.24

func (r *RestoreSource) IsDefaulted() bool

func (*RestoreSource) SetDefaults added in v0.0.24

func (r *RestoreSource) SetDefaults()

func (*RestoreSource) SetDefaultsWithBackup added in v0.0.24

func (r *RestoreSource) SetDefaultsWithBackup(backup *Backup) error

func (*RestoreSource) TargetRecoveryTimeOrDefault added in v0.0.24

func (r *RestoreSource) TargetRecoveryTimeOrDefault() time.Time

func (*RestoreSource) Validate

func (r *RestoreSource) Validate() error

type RestoreSpec

type RestoreSpec struct {
	// ContainerTemplate defines templates to configure Container objects.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ContainerTemplate `json:",inline"`
	// PodTemplate defines templates to configure Pod objects.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PodTemplate `json:",inline"`
	// RestoreSource defines a source for restoring a MariaDB.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	RestoreSource `json:",inline"`
	// MariaDBRef is a reference to a MariaDB object.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MariaDBRef MariaDBRef `json:"mariaDbRef" webhook:"inmutable"`
	// LogLevel to be used n the Backup Job. It defaults to 'info'.
	// +optional
	// +kubebuilder:default=info
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	LogLevel string `json:"logLevel,omitempty"`
	// BackoffLimit defines the maximum number of attempts to successfully perform a Backup.
	// +optional
	// +kubebuilder:default=5
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"}
	BackoffLimit int32 `json:"backoffLimit,omitempty"`
	// RestartPolicy to be added to the Backup Job.
	// +optional
	// +kubebuilder:default=OnFailure
	// +kubebuilder:validation:Enum=Always;OnFailure;Never
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	RestartPolicy corev1.RestartPolicy `json:"restartPolicy,omitempty" webhook:"inmutable"`
	// InheritMetadata defines the metadata to be inherited by children resources.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	InheritMetadata *Metadata `json:"inheritMetadata,omitempty"`
}

RestoreSpec defines the desired state of restore

func (*RestoreSpec) DeepCopy

func (in *RestoreSpec) DeepCopy() *RestoreSpec

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

func (*RestoreSpec) DeepCopyInto

func (in *RestoreSpec) DeepCopyInto(out *RestoreSpec)

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

type RestoreStatus

type RestoreStatus struct {
	// Conditions for the Restore object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors={"urn:alm:descriptor:io.kubernetes.conditions"}
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

RestoreStatus defines the observed state of restore

func (*RestoreStatus) DeepCopy

func (in *RestoreStatus) DeepCopy() *RestoreStatus

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

func (*RestoreStatus) DeepCopyInto

func (in *RestoreStatus) DeepCopyInto(out *RestoreStatus)

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

func (*RestoreStatus) SetCondition

func (r *RestoreStatus) SetCondition(condition metav1.Condition)

type S3 added in v0.0.24

type S3 struct {
	// Bucket is the name Name of the bucket to store backups.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Bucket string `json:"bucket" webhook:"inmutable"`
	// Endpoint is the S3 API endpoint without scheme.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Endpoint string `json:"endpoint" webhook:"inmutable"`
	// Region is the S3 region name to use.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Region string `json:"region" webhook:"inmutable"`
	// Prefix allows backups to be placed under a specific prefix in the bucket. A trailing slash '/' is added if not provided.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Prefix string `json:"prefix" webhook:"inmutable"`
	// AccessKeyIdSecretKeyRef is a reference to a Secret key containing the S3 access key id.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	AccessKeyIdSecretKeyRef corev1.SecretKeySelector `json:"accessKeyIdSecretKeyRef"`
	// AccessKeyIdSecretKeyRef is a reference to a Secret key containing the S3 secret key.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	SecretAccessKeySecretKeyRef corev1.SecretKeySelector `json:"secretAccessKeySecretKeyRef"`
	// SessionTokenSecretKeyRef is a reference to a Secret key containing the S3 session token.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	SessionTokenSecretKeyRef *corev1.SecretKeySelector `json:"sessionTokenSecretKeyRef,omitempty"`
	// TLS provides the configuration required to establish TLS connections with S3.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	TLS *TLS `json:"tls,omitempty"`
}

func (*S3) DeepCopy added in v0.0.24

func (in *S3) DeepCopy() *S3

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

func (*S3) DeepCopyInto added in v0.0.24

func (in *S3) DeepCopyInto(out *S3)

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

type SQLTemplate added in v0.0.21

type SQLTemplate struct {
	// RequeueInterval is used to perform requeue reconcilizations.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	RequeueInterval *metav1.Duration `json:"requeueInterval,omitempty"`
	// RetryInterval is the interval used to perform retries.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	RetryInterval *metav1.Duration `json:"retryInterval,omitempty"`
}

SQLTemplate defines a template to customize SQL objects.

func (*SQLTemplate) DeepCopy added in v0.0.21

func (in *SQLTemplate) DeepCopy() *SQLTemplate

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

func (*SQLTemplate) DeepCopyInto added in v0.0.21

func (in *SQLTemplate) DeepCopyInto(out *SQLTemplate)

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

type SST added in v0.0.16

type SST string

SST is the Snapshot State Transfer used when new Pods join the cluster. More info: https://galeracluster.com/library/documentation/sst.html.

const (
	// SSTRsync is an SST based on rsync.
	SSTRsync SST = "rsync"
	// SSTMariaBackup is an SST based on mariabackup. It is the recommended SST.
	SSTMariaBackup SST = "mariabackup"
	// SSTMysqldump is an SST based on mysqldump.
	SSTMysqldump SST = "mysqldump"
)

func (SST) MariaDBFormat added in v0.0.16

func (s SST) MariaDBFormat() (string, error)

MariaDBFormat formats the SST so it can be used in Galera config files.

func (SST) Validate added in v0.0.16

func (s SST) Validate() error

Validate returns an error if the SST is not valid.

type Schedule added in v0.0.14

type Schedule struct {
	// Cron is a cron expression that defines the schedule.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Cron string `json:"cron"`
	// Suspend defines whether the schedule is active or not.
	// +optional
	// +kubebuilder:default=false
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Suspend bool `json:"suspend"`
}

Schedule contains parameters to define a schedule

func (*Schedule) DeepCopy added in v0.0.14

func (in *Schedule) DeepCopy() *Schedule

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

func (*Schedule) DeepCopyInto added in v0.0.14

func (in *Schedule) DeepCopyInto(out *Schedule)

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

func (*Schedule) Validate added in v0.0.14

func (s *Schedule) Validate() error

type SecretTemplate

type SecretTemplate struct {
	// Labels to be added to the Secret object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations to be added to the Secret object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Annotations map[string]string `json:"annotations,omitempty"`
	// Key to be used in the Secret.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Key *string `json:"key,omitempty"`
	// Format to be used in the Secret.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Format *string `json:"format,omitempty"`
	// UsernameKey to be used in the Secret.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	UsernameKey *string `json:"usernameKey,omitempty"`
	// PasswordKey to be used in the Secret.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PasswordKey *string `json:"passwordKey,omitempty"`
	// HostKey to be used in the Secret.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	HostKey *string `json:"hostKey,omitempty"`
	// PortKey to be used in the Secret.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PortKey *string `json:"portKey,omitempty"`
	// DatabaseKey to be used in the Secret.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	DatabaseKey *string `json:"databaseKey,omitempty"`
}

SecretTemplate defines a template to customize Secret objects.

func (*SecretTemplate) DeepCopy

func (in *SecretTemplate) DeepCopy() *SecretTemplate

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

func (*SecretTemplate) DeepCopyInto

func (in *SecretTemplate) DeepCopyInto(out *SecretTemplate)

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

type ServiceMonitor

type ServiceMonitor struct {
	// PrometheusRelease is the release label to add to the ServiceMonitor object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PrometheusRelease string `json:"prometheusRelease,omitempty"`
	// JobLabel to add to the ServiceMonitor object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	JobLabel string `json:"jobLabel,omitempty"`
	// Interval for scraping metrics.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Interval string `json:"interval,omitempty"`
	// ScrapeTimeout defines the timeout for scraping metrics.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ScrapeTimeout string `json:"scrapeTimeout,omitempty"`
}

ServiceMonitor defines a prometheus ServiceMonitor object.

func (*ServiceMonitor) DeepCopy

func (in *ServiceMonitor) DeepCopy() *ServiceMonitor

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

func (*ServiceMonitor) DeepCopyInto

func (in *ServiceMonitor) DeepCopyInto(out *ServiceMonitor)

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

type ServiceRouter added in v0.0.25

type ServiceRouter string

ServiceRouter defines the type of service router.

const (
	// ServiceRouterReadWriteSplit splits the load based on the queries. Write queries are performed on master and read queries on the replicas.
	ServiceRouterReadWriteSplit ServiceRouter = "readwritesplit"
	// ServiceRouterReadConnRoute splits the load based on the connections. Each connection is assigned to a server.
	ServiceRouterReadConnRoute ServiceRouter = "readconnroute"
)

type ServiceTemplate added in v0.0.20

type ServiceTemplate struct {
	// Type is the Service type. One of `ClusterIP`, `NodePort` or `LoadBalancer`. If not defined, it defaults to `ClusterIP`.
	// +optional
	// +kubebuilder:default=ClusterIP
	// +kubebuilder:validation:Enum=ClusterIP;NodePort;LoadBalancer
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Type corev1.ServiceType `json:"type,omitempty"`
	// Labels to add to the Service metadata.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations to add to the Service metadata.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Annotations map[string]string `json:"annotations,omitempty"`
	// LoadBalancerIP Service field.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	LoadBalancerIP *string `json:"loadBalancerIP,omitempty"`
	// LoadBalancerSourceRanges Service field.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty"`
	// ExternalTrafficPolicy Service field.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ExternalTrafficPolicy *corev1.ServiceExternalTrafficPolicyType `json:"externalTrafficPolicy,omitempty"`
	// SessionAffinity Service field.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	SessionAffinity *corev1.ServiceAffinity `json:"sessionAffinity,omitempty"`
	// AllocateLoadBalancerNodePorts Service field.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	AllocateLoadBalancerNodePorts *bool `json:"allocateLoadBalancerNodePorts,omitempty"`
}

ServiceTemplate defines a template to customize Service objects.

func (*ServiceTemplate) DeepCopy added in v0.0.20

func (in *ServiceTemplate) DeepCopy() *ServiceTemplate

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

func (*ServiceTemplate) DeepCopyInto added in v0.0.20

func (in *ServiceTemplate) DeepCopyInto(out *ServiceTemplate)

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

type SqlJob

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

	Spec   SqlJobSpec   `json:"spec,omitempty"`
	Status SqlJobStatus `json:"status,omitempty"`
}

SqlJob is the Schema for the sqljobs API. It is used to run sql scripts as jobs.

func (*SqlJob) DeepCopy

func (in *SqlJob) DeepCopy() *SqlJob

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

func (*SqlJob) DeepCopyInto

func (in *SqlJob) DeepCopyInto(out *SqlJob)

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

func (*SqlJob) DeepCopyObject

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

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

func (*SqlJob) IsComplete

func (s *SqlJob) IsComplete() bool

func (*SqlJob) SetDefaults added in v0.0.26

func (s *SqlJob) SetDefaults()

func (*SqlJob) SetupWebhookWithManager

func (r *SqlJob) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*SqlJob) ValidateCreate

func (s *SqlJob) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*SqlJob) ValidateDelete

func (r *SqlJob) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*SqlJob) ValidateUpdate

func (s *SqlJob) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type SqlJobList

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

SqlJobList contains a list of SqlJob

func (*SqlJobList) DeepCopy

func (in *SqlJobList) DeepCopy() *SqlJobList

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

func (*SqlJobList) DeepCopyInto

func (in *SqlJobList) DeepCopyInto(out *SqlJobList)

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

func (*SqlJobList) DeepCopyObject

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

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

type SqlJobSpec

type SqlJobSpec struct {
	// ContainerTemplate defines templates to configure Container objects.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	ContainerTemplate `json:",inline"`
	// PodTemplate defines templates to configure Pod objects.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PodTemplate `json:",inline"`
	// MariaDBRef is a reference to a MariaDB object.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MariaDBRef MariaDBRef `json:"mariaDbRef" webhook:"inmutable"`
	// Schedule defines when the SqlJob will be executed.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Schedule *Schedule `json:"schedule,omitempty"`
	// Username to be impersonated when executing the SqlJob.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Username string `json:"username" webhook:"inmutable"`
	// UserPasswordSecretKeyRef is a reference to the impersonated user's password to be used when executing the SqlJob.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PasswordSecretKeyRef corev1.SecretKeySelector `json:"passwordSecretKeyRef" webhook:"inmutable"`
	// Username to be used when executing the SqlJob.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Database *string `json:"database,omitempty" webhook:"inmutable"`
	// DependsOn defines dependencies with other SqlJob objectecs.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	DependsOn []corev1.LocalObjectReference `json:"dependsOn,omitempty" webhook:"inmutable"`
	// Sql is the script to be executed by the SqlJob.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Sql *string `json:"sql,omitempty" webhook:"inmutable"`
	// SqlConfigMapKeyRef is a reference to a ConfigMap containing the Sql script.
	// It is defaulted to a ConfigMap with the contents of the Sql field.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	SqlConfigMapKeyRef *corev1.ConfigMapKeySelector `json:"sqlConfigMapKeyRef,omitempty" webhook:"inmutableinit"`
	// BackoffLimit defines the maximum number of attempts to successfully execute a SqlJob.
	// +optional
	// +kubebuilder:default=5
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"}
	BackoffLimit int32 `json:"backoffLimit,omitempty"`
	// RestartPolicy to be added to the SqlJob Pod.
	// +optional
	// +kubebuilder:default=OnFailure
	// +kubebuilder:validation:Enum=Always;OnFailure;Never
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	RestartPolicy corev1.RestartPolicy `json:"restartPolicy,omitempty" webhook:"inmutable"`
	// InheritMetadata defines the metadata to be inherited by children resources.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	InheritMetadata *Metadata `json:"inheritMetadata,omitempty"`
}

SqlJobSpec defines the desired state of SqlJob

func (*SqlJobSpec) DeepCopy

func (in *SqlJobSpec) DeepCopy() *SqlJobSpec

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

func (*SqlJobSpec) DeepCopyInto

func (in *SqlJobSpec) DeepCopyInto(out *SqlJobSpec)

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

type SqlJobStatus

type SqlJobStatus struct {
	// Conditions for the SqlJob object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors={"urn:alm:descriptor:io.kubernetes.conditions"}
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

SqlJobStatus defines the observed state of SqlJob

func (*SqlJobStatus) DeepCopy

func (in *SqlJobStatus) DeepCopy() *SqlJobStatus

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

func (*SqlJobStatus) DeepCopyInto

func (in *SqlJobStatus) DeepCopyInto(out *SqlJobStatus)

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

func (*SqlJobStatus) SetCondition

func (s *SqlJobStatus) SetCondition(condition metav1.Condition)

type Storage added in v0.0.26

type Storage struct {
	// Ephemeral indicates whether to use ephemeral storage in the PVCs. It is only compatible with non HA MariaDBs.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
	Ephemeral *bool `json:"ephemeral,omitempty" webhook:"inmutableinit"`
	// Size of the PVCs to be mounted by MariaDB. Required if not provided in 'VolumeClaimTemplate'. It superseeds the storage size specified in 'VolumeClaimTemplate'.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Size *resource.Quantity `json:"size,omitempty"`
	// StorageClassName to be used to provision the PVCS. It superseeds the 'StorageClassName' specified in 'VolumeClaimTemplate'.
	// If not provided, the default 'StorageClass' configured in the cluster is used.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	StorageClassName string `json:"storageClassName,omitempty" webhook:"inmutable"`
	// ResizeInUseVolumes indicates whether the PVCs can be resized. The 'StorageClassName' used should have 'allowVolumeExpansion' set to 'true' to allow resizing.
	// It defaults to true.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
	ResizeInUseVolumes *bool `json:"resizeInUseVolumes,omitempty"`
	// WaitForVolumeResize indicates whether to wait for the PVCs to be resized before marking the MariaDB object as ready. This will block other operations such as cluster recovery while the resize is in progress.
	// It defaults to true.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
	WaitForVolumeResize *bool `json:"waitForVolumeResize,omitempty"`
	// VolumeClaimTemplate provides a template to define the PVCs.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	VolumeClaimTemplate *VolumeClaimTemplate `json:"volumeClaimTemplate,omitempty"`
}

Storage defines the storage options to be used for provisioning the PVCs mounted by MariaDB.

func (*Storage) DeepCopy added in v0.0.26

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

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

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

func (*Storage) GetSize added in v0.0.26

func (s *Storage) GetSize() *resource.Quantity

GetSize obtains the size of the PVC.

func (*Storage) SetDefaults added in v0.0.26

func (s *Storage) SetDefaults()

SetDefaults sets reasonable defaults.

func (*Storage) Validate added in v0.0.26

func (s *Storage) Validate(mdb *MariaDB) error

Storate determines whether a Storage object is valid.

type SuspendTemplate added in v0.0.25

type SuspendTemplate struct {
	// Suspend indicates whether the current resource should be suspended or not. Feature flag --feature-maxscale-suspend is required in the controller to enable this.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Suspend bool `json:"suspend,omitempty"`
}

SuspendTemplate indicates whether the current resource should be suspended or not. Feature flag --feature-maxscale-suspend is required in the controller to enable this.

func (*SuspendTemplate) DeepCopy added in v0.0.25

func (in *SuspendTemplate) DeepCopy() *SuspendTemplate

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

func (*SuspendTemplate) DeepCopyInto added in v0.0.25

func (in *SuspendTemplate) DeepCopyInto(out *SuspendTemplate)

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

type TLS added in v0.0.24

type TLS struct {
	// Enabled is a flag to enable TLS.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
	Enabled bool `json:"enabled"`
	// CASecretKeyRef is a reference to a Secret key containing a CA bundle in PEM format used to establish TLS connections with S3.
	// By default, the system trust chain will be used, but you can use this field to add more CAs to the bundle.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	CASecretKeyRef *corev1.SecretKeySelector `json:"caSecretKeyRef,omitempty"`
}

func (*TLS) DeepCopy added in v0.0.24

func (in *TLS) DeepCopy() *TLS

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

func (*TLS) DeepCopyInto added in v0.0.24

func (in *TLS) DeepCopyInto(out *TLS)

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

type User

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

	Spec   UserSpec   `json:"spec,omitempty"`
	Status UserStatus `json:"status,omitempty"`
}

User is the Schema for the users API. It is used to define grants as if you were running a 'CREATE USER' statement.

func (*User) AccountName added in v0.0.20

func (u *User) AccountName() string

func (*User) DeepCopy

func (in *User) DeepCopy() *User

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

func (*User) DeepCopyInto

func (in *User) DeepCopyInto(out *User)

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

func (*User) DeepCopyObject

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

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

func (*User) IsBeingDeleted

func (u *User) IsBeingDeleted() bool

func (*User) IsReady

func (u *User) IsReady() bool

func (*User) MariaDBRef

func (u *User) MariaDBRef() *MariaDBRef

func (*User) RequeueInterval added in v0.0.24

func (d *User) RequeueInterval() *metav1.Duration

func (*User) RetryInterval added in v0.0.21

func (u *User) RetryInterval() *metav1.Duration

func (*User) SetupWebhookWithManager

func (r *User) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*User) ValidateCreate

func (r *User) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*User) ValidateDelete

func (r *User) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*User) ValidateUpdate

func (r *User) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type UserList

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

UserList contains a list of User

func (*UserList) DeepCopy

func (in *UserList) DeepCopy() *UserList

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

func (*UserList) DeepCopyInto

func (in *UserList) DeepCopyInto(out *UserList)

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

func (*UserList) DeepCopyObject

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

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

type UserSpec

type UserSpec struct {
	// SQLTemplate defines templates to configure SQL objects.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	SQLTemplate `json:",inline"`
	// MariaDBRef is a reference to a MariaDB object.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	MariaDBRef MariaDBRef `json:"mariaDbRef" webhook:"inmutable"`
	// PasswordSecretKeyRef is a reference to the password to be used by the User.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PasswordSecretKeyRef corev1.SecretKeySelector `json:"passwordSecretKeyRef" webhook:"inmutable"`
	// MaxUserConnections defines the maximum number of connections that the User can establish.
	// +optional
	// +kubebuilder:default=10
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"}
	MaxUserConnections int32 `json:"maxUserConnections,omitempty" webhook:"inmutable"`
	// Name overrides the default name provided by metadata.name.
	// +optional
	// +kubebuilder:validation:MaxLength=80
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Name string `json:"name,omitempty" webhook:"inmutable"`
	// Host related to the User.
	// +optional
	// +kubebuilder:validation:MaxLength=255
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Host string `json:"host,omitempty" webhook:"inmutable"`
}

UserSpec defines the desired state of User

func (*UserSpec) DeepCopy

func (in *UserSpec) DeepCopy() *UserSpec

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

func (*UserSpec) DeepCopyInto

func (in *UserSpec) DeepCopyInto(out *UserSpec)

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

type UserStatus

type UserStatus struct {
	// Conditions for the User object.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors={"urn:alm:descriptor:io.kubernetes.conditions"}
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

UserStatus defines the observed state of User

func (*UserStatus) DeepCopy

func (in *UserStatus) DeepCopy() *UserStatus

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

func (*UserStatus) DeepCopyInto

func (in *UserStatus) DeepCopyInto(out *UserStatus)

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

func (*UserStatus) SetCondition

func (u *UserStatus) SetCondition(condition metav1.Condition)

type VolumeClaimTemplate added in v0.0.20

type VolumeClaimTemplate struct {
	// PersistentVolumeClaimSpec is the specification of a PVC.
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	corev1.PersistentVolumeClaimSpec `json:",inline"`
	// Labels to be used in the PVC.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations to be used in the PVC.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Annotations map[string]string `json:"annotations,omitempty"`
}

VolumeClaimTemplate defines a template to customize PVC objects.

func (*VolumeClaimTemplate) DeepCopy added in v0.0.20

func (in *VolumeClaimTemplate) DeepCopy() *VolumeClaimTemplate

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

func (*VolumeClaimTemplate) DeepCopyInto added in v0.0.20

func (in *VolumeClaimTemplate) DeepCopyInto(out *VolumeClaimTemplate)

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

type WaitPoint added in v0.0.12

type WaitPoint string

WaitPoint defines whether the transaction should wait for ACK before committing to the storage engine. More info: https://mariadb.com/kb/en/semisynchronous-replication/#rpl_semi_sync_master_wait_point.

const (
	// WaitPointAfterSync indicates that the primary waits for the replica ACK before committing the transaction to the storage engine.
	// This is the default WaitPoint. It trades off performance for consistency.
	WaitPointAfterSync WaitPoint = "AfterSync"
	// WaitPointAfterCommit indicates that the primary commits the transaction to the storage engine and waits for the replica ACK afterwards.
	// It trades off consistency for performance.
	WaitPointAfterCommit WaitPoint = "AfterCommit"
)

func (WaitPoint) MariaDBFormat added in v0.0.12

func (w WaitPoint) MariaDBFormat() (string, error)

MariaDBFormat formats the WaitPoint so it can be used in MariaDB config files.

func (WaitPoint) Validate added in v0.0.12

func (w WaitPoint) Validate() error

Validate returns an error if the WaitPoint is not valid.

Jump to

Keyboard shortcuts

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